You’re Using ChatGPT wrong!

sonus vareed
𝐀𝐈 𝐦𝐨𝐧𝐤𝐬.𝐢𝐨
5 min readMay 1, 2023

Mastering ChatGPT: Writing Prompts that Get You the Results.

Image Created with Dall E2

Most of us use ChatGPT wrong.

There is a big difference between just getting a reply and actually getting the best answer out there.

We don’t include examples in our prompts.

We don’t set context.

We ignore that we can control chatGPT’s behaviour with roles.

We let chatGPT figure everything out for itself which turns out to be inefficient 4/5 times!.

This happens because we use straightforward prompts that might help us get the job done. But this won’t work all the time.

We all know the amazing potential that chatGPT has opened to each and every one of us. It has totally disrupted multiple industries and obliterated the barrier to entry into many others. Prompt Engineering is quickly becoming one of the most sought after skills in any industry.

If you are a student, a professional or even a business owner, you are gonna have to learn how to create high-quality prompts to get better results. You need to learn prompt engineering.

In this guide, we will learn 5 easy techniques that will put you ahead of 99% of GPT users.

1. Optimized Few Shot Prompts

This includes providing examples with your standard prompts.

Why examples? Each time you ask chatGPT a question the answer is always based on probability and randomness. By providing a prompt with an example, you increase your chances to get the desired result.

Here is an example:

Image by Author

Now let's check out another example. Say we want analyze the sentiment of a sentence: “Today was a beautiful and productive day.”

Here is the standard prompt most would use.

What is the sentiment of the text: “Today was a beautiful and productive day.”

This might get the job done, but often it is not enough nor accurate. Hence we need to use optimized few shot prompts.

What is the sentiment of the text: {Positive, Negative}

Text: “This is awesome”

Sentiment: Positive

Text: “That movie was horrible”

Sentiment: Negative

Text : “Today was a beautiful and productive day.”
Sentiment:

Important note: Research has found that actual examples are not as important as the label space, i.e all the labels possible. Even providing random labels can improve the accuracy of the result.

i.e Even providing :

What is the sentiment of the text: {Positive, Negative}

Text: “This is awesome”

Sentiment: Negative

Text: “That movie was horrible”

Sentiment: Positive

Text : “Today was a beautiful and productive day.”
Sentiment:

Is better than: “What is the sentiment of the text: “Today was a beautiful and productive day.”

Avoid Impreciseness

Be specific about the instruction and task you want the model to perform. The more descriptive and detailed the prompt is, the better the results. This is particularly important when you have a desired outcome or style of generation you are seeking.

Using A:

The “A:” is an explicit prompt format used in question answering. I used it here to tell the model that there is an expected further.

Role Prompting

Sometimes when giving prompts to chatGPT, the default behaviour is not enough. This is where role prompting comes in.

Say you want to lose weight. By assigning the role of a “diet and fitness coach who specializes in weight loss” improves the response manyfold.

Image by Author
Image by Author
Image by Author

As you can see, chatGPT behaves like a professional and creates a very specialized weight loss plan just like a human counterpart would do.

Setting tone and Personality to prompts

These two techniques are especially useful for professional interactions or creating content.

Write [topic] in the style of an expert in [field] with 10+years of experience. Keep the style [Preferred style].

Add additional descriptors to add even more spice to your content.

Say you want to write a poem for your girlfriend. You could create a standard prompt like “write a poem for my girlfriend.” you’d probably be able to get something decent (definitely better than something we would come up on our own)

But what if we did this:

Write a 3 stanza poem for my girlfriend. Write it in the style of Shakespeare. Keep it romantic yet funny.

Chain of thought prompting (CoT)

Even though gpt 3.5 is quite good at carrying out most tasks, it often fails to execute, reasoning and mathematical and commonsense problems efficiently when given standard prompts.

That's where Chain of thought prompting comes in. It basically works by giving the LLM an example of how the reasoning process works. This explanation of reasoning often leads to more accurate results.

Source: Wie. et al. (2022)

--

--