1. Introduction

In this tutorial, we’ll explore effective strategies for crafting prompts that improve interaction with ChatGPT.

By mastering these prompt formulas, we can guide ChatGPT to produce more accurate and contextually relevant responses, improving our overall experience.

2. What Is Prompt Engineering?

Prompt engineering means designing and refining input queries to optimize the output of AI models like ChatGPT. It involves crafting clear, specific, and structured prompts that guide the AI to deliver accurate and contextually relevant responses. By defining the task, providing context, or even assigning roles, prompt engineering helps users shape the AI’s understanding and improve the quality of its outputs.

The importance of prompt engineering is evident in the rise of the “prompt engineer” role, a position focused on optimizing interactions with AI systems. We’ll briefly cover the most important rules that prompt engineers use to write perfect prompts.

3. How to Write Perfect ChatGPT Prompts?

3.1. Clear Task

The most important thing is to write clear prompts and tasks. The more specific the prompt is, the better answer we’ll get. Vague prompts might lead to generic results.

Also, it’s recommended to start the task sentence with action verbs like “summarize”, “write”, “generate” and similar. For example:

“Write a song about a cat who goes on an adventure.”

3.2. Context Is Key

It’s important to provide context to help ChatGPT understand the goal.

For instance, if we want ChatGPT to draft a speech for a formal event, we need to explain the occasion, audience, and tone we’re aiming for. For example:

“Write a 5-minute keynote speech for a business conference. The audience includes young entrepreneurs and the tone should be inspiring yet professional.”

3.3. Assign a Role

One trick we can use is assigning a specific role in our prompts. This method produces results aligned with the desired expertise. For example:

“Pretend to be a motivational coach. Provide tips for overcoming procrastination.”

3.4. Use Examples and Formats

Demonstrating a preferred style or format can significantly improve ChatGPT’s output. In addition to that, it’s recommended to include short examples or templates in our prompts. For instance:

“Draft a formal letter to request a meeting. Example opening: ‘Dear [Recipient], I hope this message finds you well. I am writing to request a meeting to discuss…'”

3.5. Refine Through Iteration

After receiving an initial response, we can tweak our prompt to address shortcomings or add more details. For example:

  1. Initial Prompt: “Write a summary of this book.”
  2. Follow-up: “Make it more concise and include key plot twists.”

Back-and-forth interaction ensures we get a response closer to our ideal outcome.

4. Bad ChatGPT Prompt VS Good ChatGPT Prompt

To demonstrate the steps above, we’ll show one example. Let’s say we want to ask ChatGPT about AI.

The basic prompt could look like this:

“Tell me about AI.”

A more advanced prompt follows the mentioned rules:

“Pretend to be a technology journalist writing an informative article for a general audience. Summarize the key advancements in AI over the past decade, focusing on applications in healthcare and finance. Keep the tone accessible and engaging. Organize the response into two sections: 1) Advancements and 2) Applications.”

In the second prompt, we defined a clear task, which is to summarize the key advancements in AI over the past decade. Also, we gave the context of an informative article for a general audience and defined the role as a technology journalist with an accessible and engaging tone. We also defined how the response should be formatted.

The response to the first prompt looks like:

ChatGPT simple prompt

The response to the second prompt is:

ChatGPT advanced prompt

The first response is too general. With bullet points and short sentences, ChatGPT mentioned key concepts, types, and applications of AI.

The second prompt has two sections. It focuses on AI applications in healthcare and finance. Also, it looks like an article for a general audience and has a more engaging tone.

5. Conclusion

In this article, we introduced prompt engineering and some rules that can help to write a perfect prompt.

By combining clarity, context, role assignment, examples, and iterative refinement, we can achieve incredible results with ChatGPT. Whether we’re crafting a professional email, writing code, or brainstorming ideas, mastering these techniques unlocks ChatGPT’s full potential.


原始标题:Mastering ChatGPT Prompt Formulas in 5 Steps