Sign up for the Newsletter!
Home Artificial intelligence How to write better ChatGPT prompts according to science

How to write better ChatGPT prompts according to science

0

A 2023 study gives us the 26 basic principles for writing good prompts for AIs

Sign up for the Newsletter!

Every day we face new artificial intelligences, whether they are large language models that they help us to compose text like ChatGPT, AIs to create images like Dall.E or even some musical ones like Suno AI, which allows us to compose music through a prompt.

And it is precisely this word that today's article is about. Since the birth - or rather, the adoption by the general public - of these artificial intelligences, a question has arisen that is key to understanding how we relate to them:

What is the best prompt I can use to communicate with an AI?

I remember that at the time Hundreds of websites, courses and tutorials were born They were trying to answer that question, but like everything in this world, it changes. AIs evolve, we find new ways to talk to them and new types emerge.

That is why a group of researchers at the Mohamed bin Zayed University of Artificial Intelligence have created a comprehensive list in the form of instructions for humans on how to properly talk to machines.

In the article I leave you here called Principled Instructions Are All You Need for Questioning LLaMA-1/2, GPT-3.5/4 They show us through their experimentation and in a scientific way the best rules that we must follow to write the best prompts for ChatGPT.

Improve your ChatGPT prompts with these simple tips

Drop the formalities

I in particular tend to be very polite with ChatGPT in particular, to the point where I say good morning and ask him how he is. Before I start – I am polite like that – but this study completely contradicts me.

According to his words, no need to be polite when asking ChatGPT. For the result we are looking for there is no difference between being educated or not and they invite us to responsibly use the characters they give us to write what we want.

According to the study, it is much more useful give clear and precise instructions than misleading the AI with a correction that it will not evaluate. It is preferable to provide examples, more details or clarifications than any ambiguous term. 

For best results, We will use the phrases "Your task is" and "You have to do what". Write clear directions, give precise instructions, and leave the good manners for the humans. I'll still be polite though. You never know when they'll remember it in the future…

Include the audience

Make reference to the audience for which the message will be focused. This way ChatGPT will know who it is directed to and in this way it will better refine the result of the answer. You will take them into account when generating your articles, publications on social networks or web texts.

Use sequences

The best is Do not use a prompt that includes too many tasks together. The ideal is to divide that large complex task into small instructions and steps that ChatGPT must follow. This way you will better understand what we are asking of you.

Instead of a big block of text, use short prompts one prompt at a time. After each one, Make sure they understand it and tell them the next step to continue, in addition to reminding him that the task is not finished and that we must continue working.

If we have no choice but to use more complex instructions in the same prompt, use line breaks to avoid confusion and make sure you get the answers you're looking for.

First page of the study

Use positive commands

This is very important. ChatGPT responds better to positive formats than negative ones. In this way, it is much more efficient to tell it what to do than to use a prompt with negative instructions. Although they can sometimes work, they are not the best.

For example, instead of writing a prompt that is "create an image of a fruit bowl that does not have bananas and kiwis» use one that says «create a fruit bowl with apples and pears«. Specify what you want and not what you don't want.

This will give us a result with a greater degree of clarity, which increases the probability of obtaining a result closer to what we are looking for.

Request further clarification

All artificial intelligences amaze, including ChatGPT. Also, by having so much information, it is possible that it uses levels of knowledge that we as human beings do not have access to, or more simply, we are dumber than it…

If you give us an answer that doesn't make sense or is too complex we can add these phrases to request more information. “Explain [here we will put what we want to know] in simple terms”, “Explain it to me as if I were 11 years old”, “Give me the answer as if I were a beginner at [whatever]”.

Offer him a reward

According to the study, you can even add «I'll tip xxx$ if you give me a good answer!» I have tried this myself but it makes me feel a little uncomfortable. Can you imagine that at some point he demands his money from me? I prefer not to take the risk.

Includes examples

Give examples at the prompt to give you better answers. That way, ChatGPT knows the type of response you're looking for and what to base its predictions on. Give examples and give them context using square brackets or hash marks like this: “### example ###” or “[Example]”.

Threaten with punishment

I don't like this one, but according to the study, like the rewards, punishments seem to work better. They actually recommend threatening ChatGPT. Researchers found that using the phrase “You will be penalized if…” produced better results. I find that incredible.

Ask him to be more human

I don't know about you, but after using ChatGPT often for a while, I have ended up developing a kind of sixth sense that alerts me when some text is created with artificial intelligence. Besides that There are a series of patterns such as finishing the texts with the phrase "in conclusion" that are very evident.

That's why like the "humanization" tool in music DAWs. We can ask ChatGPT to become more human including this line in your prompts: “Respond in a natural, humane manner” and requesting that specific words be omitted. This is how we eliminate “ChatGPTisms” to obtain better responses.

Tell ChatGPT how to think

According to the study, we have to be direct about how we want the Big Language Model —although it is applicable to other AIs— process our information, to obtain a better result at all times. It is useful to use expressions like «develop/think step by step» to provoke responses that follow a chain of thought, so that we catch errors early on.

Avoid stereotypes

ChatGPT has been trained with 300 billion words of Internet content, many of which contain stereotypes and biases. Precisely this human component can give us worse results. We will make you aware of your own bias by adding: “Make sure your answer is unbiased and not based on stereotypes.”

ask him to ask you

This is essential and I have used it on countless occasions. Many times I don't know if ChatGPT understood what I wanted to say or I simply didn't explain myself well.. That is why I normally include phrases like "you are free to ask me anything you don't understand" within the prompt.

I'm glad the study came to the same conclusions. It seems to be really useful pose those types of expressions since in this way you will be able to put together the entire answer better thanks to being able to ask about parts of the prompt that perhaps we have not previously considered.

Assign a role

Tell him how he should act. Another classic. Do you want a digital marketing expert? Tell him: “act like a digital marketing expert.” The same goes for an SEO specialist, accounting specialist, or data analysis professional. Doing this brings better results

Use delimiters

The delimiters are among others square brackets, quotes, parentheses or asterisks. By using them in our prompts For CharGPT, it will separate the information better and will be able to discern what we want to tell it, giving us better results in the responses.

Frequency matters

If something in your request is important, repeat it. ChatGPT likes you to remind it of what's important, so repeating a specific word or phrase several times within a message, especially at the beginning and end of your command, will help us be more precise in the result.

Request the answer

I'm sure that on many occasions you want your answer to start or end with a specific phrase, because you know it works well or has a special hook. Ask ChatGPT to do it. This way you will expand the answer you want by adding what you tell him.

Don't change what works

If you ask me to rewrite it, you'll get all kinds of synonyms. Sometimes you just want to add some minor changes. You can try a prompt like this: «Revise each paragraph to improve grammar and vocabulary while maintaining the original writing style«.

The study suggests that we add: «You just need to improve the user's grammar and vocabulary and make sure it sounds natural. You should not change the writing style, such as making a formal paragraph casual«

Finish your sentences

If you've written an entire article or social media post, but need it to end in a compelling way, share the beginning and ask about the end. «Your task is to complete this [song, post, blog, etc.] in a concrete way [describe the style, e.g., compelling, persuasive], [include other requirements] and keep the flow going. Here's the start: [Paste Job]«

Provide a sample copy

It is common for us to take “references” or inspiration from other places, both in the world of writing and in art in general. If there is a text you like, give it to ChatGPT. Trying to get AI to imitate a specific writing style is very difficult, so the ideal is to give it an example of how you want it to do it.

We can include in the prompt something like: «Uses the same style of language as [describe text]: [paste example]«.

Always be clear

While this may sound obvious, it's always worth double checking. Before you hit send, read the message. Check if there is anything that could be misinterpreted. Remember everything we have learned and apply it.

Compare your message to how you would ask a real person the same question and think about what questions they would have next. Make sure you include all keywords, relevant rules, tips or instructions to prepare ChatGPT for the best possible result, which in the end is just what we want.

Combination techniques

There is no perfect prompt. As you can see, there are dozens of different techniques to improve the result we want to obtain, and the key is to combine everything learned. Everything we have seen in these lines thanks to the article I left you at the beginning is going to ensure that you have the best possible result.

How to write better prompts on ChatGPT (according to science)

Request ChatGPT is a skill that you can improve like any other. Study best practices, experiment, repeat your words and start again. Learn what works well so you can get the best results possible.

This will make you much more efficient in your requests to the different Artificial Intelligences. Have the ability to writing the best prompts is not just limited to ChatGPT. There are hundreds of artificial intelligences that work the same. Knowing how I should speak to each of them depending on the objective I have in mind is incredibly useful when generating results with AI.

Asking for an image from Midjourney is not the same as asking for a children's text from ChatGPT, or for a summary of accounts, or for talking to your rabbit r1 or compose a song with SUNO. They all require different requests, but fortunately once you learn the specific patterns, you will be able to use them all without fear of making a mistake.

And of course, don't be afraid to experiment. Try your own prompts and write down what works best for you.. You will probably discover the best ways to deal with these AIs and little by little you will find the most efficient way to give you exactly what you are looking for.

NO COMMENTS

LEAVE AN RESPONSE

Please enter your comment!
Please enter your name here

Exit mobile version