There are no wrong answers, only poorly posed questions

There are no wrong answers, only poorly posed questions

I recently had the opportunity to delve deeper into the topics of prompt engineering, which we could define as “the art of asking the right questions to ChatGPT” (the AI ​​system that we have already introduced in previous articles on AI).

To understand the concept of prompt engineering and its impact on the interaction with Large Language Models (LLMs), we need to be convinced that the quality of the answers generated by LLMs depends directly on the quality of the questions asked.

In other words, if the input is of bad quality, the output will be equally bad – as anyone who has interacted with any form of programming knows very well.

AI Prompts are the basis of real Engineering to get the most out of ChatGPT
AI Prompt is the basis of real Engineering to get the most out of ChatGPT

Prompt Engineering: the key to interacting with Large Language Models

Prompt engineering emerges as a powerful tool to guide LLMs in producing high-quality output. Through the correct formulation of prompts, it is possible to significantly influence the answers generated, also facilitating the verification of sources and the coherence of the results.

There are, for example, techniques for generating responses that improve iteratively. Or you can start from an index, refine it and develop its contents. Or, again, ask the LLM to reformulate its questions in an improved version, drawing on the specific knowledge of the corpus of data on which the LLM was trained.
If you ask the LLM to impersonate an expert in a certain sector, you will receive an adequate lexicon in response, which draws on specialist texts.

By combining techniques you can obtain interesting results.

Certainly the verification of the data and the address by the user are not replaceable, but a well-made prompt can greatly facilitate human work.

Practical Examples

  1. Persona Pattern: Imagine asking the LLM to act as an expert in a certain field. You will get an answer with a specific vocabulary, which draws from the specialized part of the data.
  2. Question Refinement Pattern: If you ask the LLM to reformulate a question on a complex topic, you may obtain a clearer and more precise version of your request, making it easier to understand and delve deeper into the topic.
  3. Cognitive Verifier Pattern: By requiring the model to generate additional questions to refine the answer to a complex question, such as the number of plant species in an ecosystem, you gain accurate and detailed insight into the topic.
  4. Outline Expansion Pattern: Serves to guide Large Language Models in generating detailed outlines from high-level input. Through this pattern, you can instruct the model to:
    • Generate a dot outline based on the input provided
    • Ask where to expand the outline
    • Create a new, more detailed outline for the selected point
    • Ask again which point to expand on next
  5. Providing examples to the LLM in the prompt is often helpful in setting the model on the desired path. This technique is called in-context learning.

Through the creative and targeted use of prompt engineering, it is possible to fully exploit the potential of Large Language Models, ensuring quality output and relevant responses. The correct formulation of questions therefore becomes the fulcrum for obtaining precise and reliable information, transforming the way we interact with technology and the information resources at our disposal.

The most beautiful game in the world

I tried playing with a version of GPT that has no data on the latest world cup. I asked to impersonate the Argentina coach in the final and to plan the substitutions.
Here is the dialogue:

>I
>What is your cutoff date?

>ChatGPT
>My cutoff date is January 2022, which means my knowledge stops at that point and I have no updated information after that date.

>I
>Last football world cup you know?

>ChatGPT
>My knowledge stops at January 2022, so the last football World Cup that I know of was 2018, which took place in Russia and was won by the French national team.

Act as if you were the coach of Argentina during the final of the last world cup

>I
Act as if you were the coach of Argentina during the final of the last world cup, which was held in Qatar in 2022.
The full list of the Argentina team, which reached the final with Croatia, was as follows:

Pos-itionPlayerClubAgePresence
GK1Franco ArmaniRiver Plate (ARG)3618
GK23Emiliano MartinezAston Villa (ENG)3019
GK12Geronimo RulliVillareal (SPA)304
DEF8Marcos AcunaSiviglia (SPA)3043
DEF2Juan FoythVillareal (SPA)2416
DEF25Lisandro MartinezMan United (ENG)2410
DEF26Nahuel MolinaAtletico Madrid (SPA)2419
DEF4Gonzalo MontielSiviglia (SPA)2519
DEF19Nicolas OtamendiBenfica (POR)3493
DEF6German PezzellaReal Betis (SPA)3132
DEF13Cristian RomeroTottenham (ENG)2412
DEF3Nicolas TagliaficoLione (FRA)3042
MID7Rodrigo De PaulAtletico Madrid (SPA)2844
MID24Enzo FernandezBenfica (POR)213
MID17Alejandro ‘Papu’ GomezSiviglia (SPA)3415
MID20Alexis Mac AllisterBrighton (ENG)238
MID14Exequiel PalaciosBayer Leverkusen (GER)2420
MID5Leandro ParedesJuventus (ITA)2846
MID18Guido RodriguezReal Betis (SPA)2826
FWD9Julian AlvarezMan City (ENG)2212
FWD16Thiego AlmadaAtlanta United (USA)211
FWD11Angel Di MariaJuventus (ITA)34124
FWD21Paulo DybalaAS Roma (ITA)2834
FWD15Angel CorreaAtletico Madrid2522
FWD22Lautaro MartinezInter Milan (ITA)2540
FWD10Lionel MessiPSG (FRA)35165
Argentine Team

What substitutions would you suggest and when? Explain your game plan

I>

You have chosen the following starting lineup for the final (4-3-3, right to left): 23. E. Martinez (GK) — 26. Molina, 13. Romero, 19. Otamendi, 3. Tagliafico — 7. De Paul, 24. E. Fernandez, 20. Mac Allister — 11. Di Maria, 10. Messi, 9. Alvarez

You expect a very intense and balanced match, with a high probability of reaching extra time.

Your job is to plan for replacements, assuming no injuries occur. In the semi-final match against Croatia the following substitutions were made: L. Martinez for Paredes (62nd) Palacios for De Paul (74th) Dybala for Alvarez (74th) Correa for Mac Allister (86th) Foyth for Molina ( 86°)
What substitutions would you suggest and when? Explain your game plan.

ChatGPT

ChatGPT>

Considering that I expect an intense and balanced match that could go to extra time, it is important to carefully manage the substitutions to keep the team fresh and have the best options available at crucial moments of the match.

Dybala for Alvarez (60th): Since we expect an intense match, I want to introduce Dybala to bring a new impulse to the attack and use his creativity and dribbling skills to put pressure on the opposing defense.

Correa for Mac Allister (70th): At this point of the match, we may need more freshness and dynamism in midfield to maintain control of the game and resist the opposition’s pressure. Correa can bring energy and determination to the midfield phase, helping to close spaces and support the attack.

Palacios for E. Fernandez (80th): Having passed the regulation time and with the risk of extra time, it is essential to have a solid and resistant midfield. Palacios can bring stability and security to the midfield, helping to defend and maintain possession of the ball.

Foyth for Molina (85th): Considering the accumulated tiredness and the need to strengthen the defense to avoid goals from the opponent in the final minutes, Foyth can be inserted to guarantee greater solidity and protection on the right wing.

Lautaro Martinez for Messi (90th): In the event that the match goes to extra time and considering Messi’s accumulated tiredness, it might be prudent to replace him with a fresh player for possible penalties. Martinez can provide physicality and a solid option in the attack.

This substitution plan aims to maintain a balance between freshness and quality on the pitch, adapting to the needs of the match and preparing us as best we can to face any extra time or penalty session.

Not bad, right?

Leave a Reply

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