How to write the best prompt on ChatGPT or Gemini?


Not everyone has the vocation to be a “prompt engineer”. This doesn’t mean, however, that there aren’t good practices for writing effective prompts (or instructions) on chatbots, like ChatGPT and Gemini. Google offers a guide to manipulating artificial intelligence more skillfully and obtaining more relevant answers.

Since the explosion of generative artificial intelligence at the end of 2022, with the public release of ChatGPT, a new activity has taken off: prompt engineering. Behind this English expression lies the ability to produce an effective, finely crafted instruction, to obtain a correct and precise response from the AI.

A prompt, remember, simply designates the order, the instruction, the question that we address to a chatbot. You enter your request in an input box and then let the conversational agent mill around in its corner. If the response is not suitable, it is still possible to try a generation again, by refactoring the prompt.

By dint of trial and error, you will certainly end up succeeding in obtaining good results on ChatGPT or Gemini – Google’s solution – and end up acquiring mechanics and good practices that the prompt engineers already use. But you can also save time and consult authoritative advice directly.

Sad ChatGPT // Source: Numerama
Speak, human. // Source: Numerama

What prompt to use for Gemini or Chatgpt?

It turns out that Google offers a “Gemini prompt guide”, as Frandroid noted. By following it, promises the Mountain View firm, you will learn “ write effective instructions to boost your productivity. » It is also possible to retrieve it by following the direct link from Frandroid, which hosts it.

The document, 45 pages long, is written in English and contains demos and oriented suggestions business — the main sections concern prompts which will be of interest to customer service, human resources, marketing, project management, sales or even managers and entrepreneurs.

Not everything in this manual is necessarily useful. That being said, there is, however, some general advice that should be remembered to improve your prompts, including for questions that do not fall into the cases mentioned above. Here, the strategy consists of integrating into its prompt four blocks which will give generative AI a working framework.

Specifically, your prompt should contain four elements:

  • who you are (your profession, role, position, etc.);
  • what is your task;
  • what is the context of your request;
  • in what form should the work of the AI ​​be rendered.

An example of a prompt in French for ChatGPT, Gemini or any generative AI

An example ?

I’m a journalist for a digital news site (which I am). Write me the skeleton of an email to register me for this or that event (what is the task). Adopt a rather formal tone, because my interlocutor does not know me (the context). Respect the practices regarding written correspondence (what form). »

This is an obviously elementary overview, but it allows us to understand in a concrete way the mechanics that should be adopted. You are free to extend or upload your request. In its pages, multiple examples are given by Google. It is entirely possible to spread over several lines, depending on the degree of information you consider useful.

Source: ScreenshotSource: Screenshot
A more detailed example from Google. The segments can be of various sizes. They can also be mixed. // Source: Screenshot

Google is not the first to have identified these four blocks that must be used for efficient prompts. However, they take on even more value as they are now validated by the American company. However, it knows the field of generative AI very well, to the extent that it offers a chatbot, Gemini.

This structure of the prompt should enlighten the chatbot in its task. Also, it is an approach that we can consider beyond Gemini — on ChatGPT, on Le Chat by Mistral, or even on Copilot from Microsoft. This, even though there are different major language models that work behind the scenes and are the engines of chatbots.

How to make a good query on a chatbot like ChatGPT?

Obviously, there is no obligation to use this technique all the time, in all circumstances. You can remove one or more blocks, depending on your needs. For example, in a job consisting of extracting and sorting domain name extensions, it was not useful to tell the chatbot our profession.

The prompt was this: (it then included a long list of mixed addresses)

I want you to give me two lists. In the first list, you group together the fairly usual and classic domain name extensions (like .com to give you an example). In the second, I want the more unusual extensions. Just group the extensions together each time, without taking into account the domain name as a whole. Remove duplicates. Group each of these lists into a series of items separated by commas, in a row. The two lists must remain separate. »

The result was as expected:

chatgpt extensionschatgpt extensions
Source: Screenshot

THE prompt engineers probably won’t fall out of their chair when reading Google’s recommendations — and they might have other advice to give. This first basis will, however, be very useful for those who did not necessarily have a well-structured method for speaking to a generative AI.

There are also four final general points that Google:

  • Speak normally to the generative AI, as if speaking to a person. “ Express complete thoughts in complete sentences. »
  • Provide as much context as possible. The more precise you are, the better the results will be.
  • It’s best not to be complex and avoid jargon. “ Formulate your request in brief but precise language. “. Get straight to the point.
  • Chat with generative AI. Nothing prevents you from making a first draft, realizing that the chatbot did not meet all expectations, and then adding one or more instructions.

If you liked this article, you will like the following: don’t miss them by subscribing to Numerama on Google News.



Source link -100