ChatGPT Prompt Engineering Guide-How to Ask AI the Right Way

ChatGPT Prompt Engineering Guide

Everyone knows how to use ChatGPT, but not everyone knows how to use ChatGPT in the right way to get their work done. Well, you must be thinking what’s the right way… It’s simple, just give a prompt to GPT and it will generate a response. But how you give the prompt matters; this is where the role of ChatGPT prompt engineering comes in.

​It’s not just about giving prompts, but giving the right prompts. Often, we see that ChatGPT does not give us our desired results, this is because we have given it vague prompt. When you have not given it the correct prompt, then you can not blame it for giving wrong results. Give it the correct prompt and get your desired results; it is as simple as that.

​To give the correct prompts, it is necessary to learn GPT prompt engineering. But what is GPT prompt engineering?

​Well, ChatGPT prompt engineering is all about crafting and refining the text prompts to guide ChatGPT to get more accurate results. It plays a very important role in getting the relevant and desired output. When you are giving a prompt to GPT, you are actually asking to produce certain outputs.

​So in simple words, ChatGPT prompt engineering is all about guiding the AI model to get the desired, accurate outputs.

​A well written prompt improves the response quality and accuracy. It saves your time by making prompts simpler and easier for GPT to understand. Instead of giving prompts again and again, why not give just one complete prompt that ChatGPT can easily understand?

​In this ChatGPT prompt engineering guide, we will see what the key elements of a good prompt are and how to give to ChatCPT in the right way.

​Key Elements of a Good Prompt

In order to write good prompts, it’s important to first know the key elements of a good prompt:

  1. Context: Giving the complete purpose and background in the prompt.
  2. Clarity: Giving clear prompts in simple words that are easy for ChatGPT to understand.
  3. Role: Assigning a role, e.g, “Act as a copywriter and write…”, “Act as an academic writing expert and write…”, “Act as a C++ programmer and write a code…”, etc.
  4. Format: Specify the structure of the output, e.g, “output should be in tabular form”, “mention in bullet points…”
  5. Constraints: Specifying the limits or constraints that it has to follow when generating output, e.g., “word limit is 800″, “tone should be beginner friendly”.
prompt engineering gpt

Chat GPT Prompt Engineering Guide

Here are some of the main points that you need to know for learning ChatGPT Prompt Engineering. Writing your prompts by keeping these points in mind will save your time, and you will get quick, personalized, and accurate outputs.

Let’s have a look at what those points are:

1. ​Be Clear and Specific

The first and most important thing for ChatGPT prompt engineering is to write clear and specific prompts. And this can only happen when you have clarity about what you are asking from GPT.

Be clear with your prompts. Ensure that you write  prompts in a clear way so that it can understand what you actually want from it.

Be specific in writing the prompts to get the accurate results because when your prompts are not specific you will get generic results.

Sometimes we give simple instructions without specifying what we actually want. In such a case, GPT will give generic results. If you are not giving the exact prompt, then don’t expect ChatGPT to give you accurate results.

Example : Suppose you want GPT to write an article of 800 words related to Content Marketing  for your new blog.

Vague Prompt: Write an SEO article of 800 words on “Proven Content Marketing Strategies”  for my new blogging site.

Clear & Specific Prompt: Act as a content marketer expert and write a 800 words SEO article on “Proven Content Marketing” Strategies for a new blogging site by precisely explaining the basic strategies like SEO, SMM, E-mail marketing, Video marketing etc. Write by incorporating the SEO practices like short paragraphs, keywords, use of active voice, and one concluding paragraph. The focus keyword of the article is content marketing strategies.

2. Provide Sufficient Context

The next thing in  ChatGPT prompt engineering is to provide sufficient context. Make sure that you give a full context that is enough for ChatGPT to understand  and generate the exact response. By doing so, you will get more personalized responses. In some cases, like if you want ChatGPT to generate an image, you can give a sample image by attaching it with your prompt and then explain in your prompt that you want an image similar to this. When you give exact and sufficient prompts, it will generate high quality responses that are what you actually want. If you don’t give complete context, then GPT fails to understand what you actually want.

Example: Suppose you want ChatGPT to review your CV and help you write a summary.

Vague Prompt: Generate a short summary of the CV attached below.

Right Prompt: I am attaching my CV, review  it carefully, and generate a summary for it that emphasizes my unique selling points and projects, that sets me apart from other potential candidates.

3. Be Concise

Be concise with your prompts. While providing all the necessary details is important, it is also important to keep your prompts concise. You should know the difference between unnecessary, lengthy, and necessary concise prompts. Don’t mention the things that are not important. If you overload ChatGPT with too much text, you will end up getting an irrelevant response because it confuses ChatGPT.

Example: Suppose you want ChatGPT to write a blog post about how AI is changing the way students learn.

Vague Prompt: I want you to write something like a blog post of 800 words about how AI is changing the way students learn, but I don’t want it to be too formal or too casual, and it should sound kind of friendly, but not overly friendly, and also please make sure you include some tips on how to use AI for learning, but not too many, maybe around three to five, and make sure you write a good introduction and conclusion, but don’t make them too long.

Concise Prompt: Write an 800-word friendly blog post on how AI is changing the way students learn. Also include 3-5 tips on how to use AI for learning. Write a short  and clear intro and conclusion.

ChatGPT Prompt Engineering

4. Use Chained Prompting

Chained Prompting is another important part of ChatGPT prompt engineering. If you want GPT to solve a large, complex problem, then break your problem into small parts and then ask it to solve that problem. This approach is known as chained prompting. It allows GPT to focus on one thing at a time, and you will get more relevant responses.

Example: Suppose you want ChatGPT to write a Python program to remove duplicates from a list of numbers and then sort it.

Vague Prompt: Write a complete Python code that takes a list of numbers, removes duplicates, and sorts it.

Correct Prompt: 1. Write a Python function that removes duplicates  from a list of numbers and returns a list sorted in ascending order.

When the first task is complete, give the second prompt.

  1. Now show how to test this function with an example list.

When this task is complete, give the next prompt if you want to add other functions in this code.

5. Use Examples

When giving a prompt to ChatGPT for any task, also give examples to it so it can better understand what you actually want. Then you will get more accurate responses and save your time from giving prompts again and again.

Example: Suppose you want ChatGPT to write a catchy intro para for your blog post.

Vague Prompt: Write a catchy intro para for a blog post on “How to remove coffee stains from mugs”.

Correct Prompt: Write a catchy intro for a blog post on How to remove coffee stains from mugs.

“Coffee stains can be as stubborn as the last bit of toothpaste in the tube. Just as that last bit of toothpaste refuses to come out of the tube, coffee stains refuse to come out of the mugs…”

Intro para should be something like, make sure to include the focus keyword coffee stains on mugs.

Other Ways of Prompt Engineering

Here are some of the other ways of ChatGPT prompt engineering  that you should know in order to write good prompts.

1.Specify the Output Format

Clearly tell ChatGPT the desired output format you want it, i.e, table, list view, bullet point information, etc. It saves your time and ensures that you get in output exactly what you want.

Example:Differentiate between the different types of trading volatility strategies by drawing a table. There should be 4 rows in the table named Strategy, Market Situation, Best For, and Benefits.

2. Iterate and Refine

If you don’t get your desired output, then don’t give that prompt again and again; instead, refine your prompt. Also, try to write prompts in different ways.

Example: Prompt 1:Write a summary of the given paragraph.

Prompt 2: Make it more precise, up to 150 words only.

Prompt 3:Don’t use jargon words; use simple words.

3. Ask for Reasoning

When solving any maths sum or computation algorithms, or code, ask GPT for reasoning. In this way, you will be able to understand how GPT has solved the problem, and also, if there are errors in any step, you can spot them.

Example: Tell with each step why you solved it this way. How did you find this solution?

4. Specify the Keywords’ Placement

When asking ChatGPT to write SEO content, give the keywords in the prompt and ask it to include them in the content. This will make sure the written content is aligned with SEO goals.

Example: “Trading strategies for beginners”, use it naturally throughout the article. Do not forget to use it at the following places:

  • Intro para
  • Sub heading
  • Concluding para

5. Ask for Different Versions

Ask ChatGPT to create different versions of a paragraph/sentence. In this way, you will get multiple versions of the same text, and you can find which fits best with the context.

Example: Give me 4 alternatives of this paragraph, one formal, one casual, one persuasive, and one funny.

6. Ask to Mention the Sources

When taking any information, stats, or data from GPT, ask it to mention the sources or any supporting information. It helps to verify the information and ensure its accuracy.

Example :What are the current stats of the number of users doing online shopping? Do mention the sources from which you collect the data.

prompt engineering chat gpt

Along with practicing these point to write perfect prompts, there are also some tools available that help you to write prompts for ChatGPT. PromptPerfect,  ChatGPT Playground, and PromptHero are some of  the tools popularly used for GPT prompt engineering.

ChatGPT prompt engineering not only helps you to get more accurate and personalized outputs but also saves your time and reduces rewriting. The AI models heavily depend on clarity and context, the more clear your prompts are the more relevant will be the output. It is not just a one time skill, whether giving specific context, examples, or using chain prompting, it is an evolving process. Keep testing and refining your prompts until you find what actually works for you.

So start practicing  today by following the above-mentioned ways of giving prompts and unlock ChatGPT’s full potential.

Read Also: AI for Writers-How to Use AI Tools for Writing

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top