Prompts and prompt engineeringRequêtes et rédactique
TRA6008 S3 · in classS3 · en classe
What a prompt is
When you use a chat app, you type a message and get an answer. The model receives more than the words of your message, though: any instructions you give, the files you attach and the earlier turns of the conversation are sent with it. Everything you give the model in this way is the prompt.
Once you have chosen a model and its settings, the prompt is the part of the system you control (Figure 1figure 1). The rest is out of your hands:
- you cannot change the model’s parameters;
- you usually cannot see the system prompt system promptrequête générative système promptingrequêtes An instruction supplied to a language model before or alongside the user's input that establishes the model's role, task, behavioural rules, tone, or other context for the interaction.Instruction fournie à un modèle de langue avant l'entrée de l'utilisateur, ou en parallèle, qui établit le rôle du modèle, sa tâche, ses règles de conduite, son ton ou d'autres éléments de contexte pour l'interaction. the chat app adds before your message;
- the same request sent twice can give two different answers (see also the LLMs are non-deterministic page, in the LLM lifecycle module) (voir aussi la page Les GML ne sont pas déterministes, dans le module Cycle de vie des GML).
Prompt engineering
Writing prompts well soon got a name of its own.
The models were powerful, hard to inspect and inconsistent from one run to the next, so advice on prompting spread within months of the first chatbots: formulas, phrases said to unlock better answers, even job titles for the people who knew them. Schulhoff et al. (2024) listed 58 text prompting techniques in one survey, which gives an idea of how much was tried.
Tricks that stopped working
Some of the tricks were tested, and some measurably worked on the models of 2023. One of the best known is a single sentence added at the end of a prompt:
Determine whether an input word has the same meaning in the two input sentences. This is very important to my career.
Li et al. (2023) added that sentence, and ten others like it, to the prompts of 45 tasks, and reported better results from six models of the time, GPT-4 among them.
This is not intuitive: a model has no career to worry about, and nothing in it cares about yours. It was trained on human text, though, and in human text a request marked as important, or put politely, tends to get a more careful answer. The model reproduces that pattern. Yin et al. (2024), who found that rude prompts got worse answers, read their own results the same way: in their words, models “mirror human communication traits”.
The table below sets what was first found about each trick beside what later tests found.
| Trick | First finding | Updated finding |
|---|---|---|
| Asking for step-by-step work: “Let’s think step by step”, or “Take a deep breath and work on this problem step-by-step”, a sentence found by a model searching for better instructions | on models of 2022, large gains on arithmetic and logic tasks (Kojima et al., 2022); on models of 2023, the second sentence did better still on a maths benchmark benchmarktest de performances evaluationévaluation A standardized evaluation used to measure and compare how AI systems perform on particular tasks or capabilities.Évaluation normalisée servant à mesurer et à comparer la performance de systèmes d'IA sur des tâches ou des capacités données. (Yang et al., 2024a) | on models of 2024 and 2025, small average gains on models without reasoning, marginal if any on reasoning models reasoning modelmodèle de raisonnement language modelsmodèles de langue A language model designed to improve its performance on complex, multi-step problems by using additional computation during inference.Modèle de langue conçu pour améliorer sa performance sur des problèmes complexes en plusieurs étapes en recourant à un surcroît de calcul pendant l'inférence. , at the cost of time (Meincke et al., 2025b) |
| Raising the stakes: “This is very important to my career”, a tip or a threat | on models of 2023, better answers with sentences like the first (Li et al., 2023) | on models of 2024 and 2025, tips and threats made no significant difference overall (Meincke et al., 2025c) |
| Politeness: being rude, extra polite, or giving orders | on models of 2023, rudeness gave worse answers in English, Chinese and Japanese, and extra politeness bought nothing (Yin et al., 2024) | on two models of 2024, “please” and “I order you” made no significant difference overall (Meincke et al., 2025a) |
| Giving the model a role, for instance “You are an excellent math teacher” or “You are a helpful assistant” | on models of 2023, better reasoning with a role that fits the task (Kong et al., 2024; Salewski et al., 2023) | on open models of 2024, no improvement overall (Zheng et al., 2024); on models of 2024 and 2025, an expert role made no significant difference in most cases, while a role from the wrong field, or with little knowledge, could lower accuracy accuracyexactitude evaluationévaluation The share of all decisions of a system that are correct, true positives and true negatives together.Part de toutes les décisions d'un système qui sont correctes, vrais positifs et vrais négatifs ensemble. (Basil et al., 2025) |
Most of the updated findings come from the Prompting Science Reports (Meincke et al., 2025a, 2025b, 2025c; Basil et al., 2025), short technical reports from the Generative AI Labs of the Wharton School that test popular prompting advice on recent models. Two points of method are worth knowing:
- each question is asked 25 times or more, with and without the phrase being tested, because a model can answer the same question differently from one run to the next;
- the questions are difficult: multiple-choice questions at graduate level.
The phrases changed the result on individual questions, in either direction and with no way of predicting which, but made no significant difference across the questions as a whole.The four reports, all of 2025, tested models of 2024 and 2025, among them GPT-4o, GPT-4o mini, Gemini 2.0 Flash, Claude 3.5 Sonnet and, as reasoning models, o3-mini and o4-mini. The Prompting Science reports are technical reports from a business school’s AI lab, not peer-reviewed papers. Asking for step-by-step work still helps in some cases, mainly on tasks worked out by rule (see also the Split the task page) (voir aussi la page Découper la tâche).
The advice that survives testing is plain:
- say clearly what you want;
- give enough context;
- show an example where you can.
Few techniques, and your own model
The techniques that work are few and general, so prompting has no formula to memorize. Beyond a few basic principles (see also the Be specific and ask for enough page) (voir aussi la page Être précis et en demander assez), the skill is knowing how the model you use behaves on the tasks you actually do, and that comes from trying it. The providers publish prompting guides for their own models and update them with each generation, which makes them a good place to start.For instance Anthropic, Prompting best practices; OpenAI, Prompt engineering; Google, Prompt design strategies. All read 17 September 2026.
Ce qu’est une requête
Dans une application de clavardage, vous tapez un message et recevez une réponse. Le modèle reçoit pourtant davantage que les mots de votre message : les instructions que vous avez données, les fichiers joints et les tours précédents de la conversation lui sont envoyés avec lui. Tout ce que vous fournissez ainsi au modèle constitue la requête (angl. prompt).
Une fois le modèle et ses réglages choisis, la requête est la partie du système qui dépend de vous (Figure 1figure 1). Le reste vous échappe :
- vous ne pouvez pas modifier les paramètres du modèle ;
- vous ne voyez généralement pas la requête générative système system promptrequête générative système promptingrequêtes An instruction supplied to a language model before or alongside the user's input that establishes the model's role, task, behavioural rules, tone, or other context for the interaction.Instruction fournie à un modèle de langue avant l'entrée de l'utilisateur, ou en parallèle, qui établit le rôle du modèle, sa tâche, ses règles de conduite, son ton ou d'autres éléments de contexte pour l'interaction. que l’application ajoute avant votre message ;
- la même demande envoyée deux fois peut donner deux réponses différentes (see also the LLMs are non-deterministic page, in the LLM lifecycle module) (voir aussi la page Les GML ne sont pas déterministes, dans le module Cycle de vie des GML).
La rédactique
L’art de bien rédiger des requêtes a vite reçu un nom.
Les modèles étaient puissants, difficiles à examiner et inconstants d’une exécution à l’autre : quelques mois après les premiers agents conversationnels, les conseils sur les requêtes circulaient partout, avec des formules, des phrases censées débloquer de meilleures réponses, et même des titres de poste pour ceux qui les connaissaient. Schulhoff et al. (2024) ont recensé 58 techniques de requêtes textuelles dans une seule revue, ce qui donne une idée de tout ce qui a été essayé.
Des astuces qui ne fonctionnent plus
Certaines astuces ont été mises à l’essai, et quelques-unes fonctionnaient de façon mesurable sur les modèles de 2023. L’une des plus connues est une seule phrase ajoutée à la fin d’une requête :
Determine whether an input word has the same meaning in the two input sentences. This is very important to my career.
Li et al. (2023) ont ajouté cette phrase (« C’est très important pour ma carrière »), et dix autres du même genre, aux requêtes de 45 tâches, et ont obtenu de meilleurs résultats de six modèles de l’époque, dont GPT-4.
Le résultat n’a rien d’intuitif : un modèle n’a pas de carrière dont il pourrait s’inquiéter, et rien en lui ne se soucie de la vôtre. Il a toutefois été entraîné sur des textes humains, et dans ces textes, une demande présentée comme importante, ou formulée poliment, obtient en général une réponse plus soignée. Le modèle reproduit cette régularité. Yin et al. (2024), qui ont constaté que les requêtes impolies donnaient de moins bonnes réponses, interprètent leurs résultats de la même façon : selon eux, les modèles « mirror human communication traits » (reflètent les traits de la communication humaine).
Le tableau ci-dessous met en regard ce qu’on a d’abord constaté pour chaque astuce et ce qu’ont montré les essais plus récents.
| Astuce | Premier constat | Constat actualisé |
|---|---|---|
| Demander un travail étape par étape : « Let’s think step by step » (réfléchissons étape par étape), ou « Take a deep breath and work on this problem step-by-step » (respirez profondément et résolvez ce problème étape par étape), une phrase trouvée par un modèle chargé de chercher de meilleures instructions | sur les modèles de 2022, gains importants en arithmétique et en logique (Kojima et al., 2022) ; sur les modèles de 2023, la seconde phrase a fait mieux encore sur un test de performances benchmarktest de performances evaluationévaluation A standardized evaluation used to measure and compare how AI systems perform on particular tasks or capabilities.Évaluation normalisée servant à mesurer et à comparer la performance de systèmes d'IA sur des tâches ou des capacités données. de mathématiques (Yang et al., 2024a) | sur les modèles de 2024 et 2025, petits gains moyens sur les modèles sans raisonnement, marginaux ou nuls sur les modèles de raisonnement reasoning modelmodèle de raisonnement language modelsmodèles de langue A language model designed to improve its performance on complex, multi-step problems by using additional computation during inference.Modèle de langue conçu pour améliorer sa performance sur des problèmes complexes en plusieurs étapes en recourant à un surcroît de calcul pendant l'inférence. , au prix d’un temps de réponse plus long (Meincke et al., 2025b) |
| Faire monter les enjeux : « C’est très important pour ma carrière », un pourboire ou une menace | sur les modèles de 2023, de meilleures réponses avec des phrases comme la première (Li et al., 2023) | sur les modèles de 2024 et 2025, pourboires et menaces ne font pas de différence significative dans l’ensemble (Meincke et al., 2025c) |
| La politesse : être impoli, très poli, ou donner des ordres | sur les modèles de 2023, l’impolitesse donnait de moins bonnes réponses en anglais, en chinois et en japonais, et l’excès de politesse n’apportait rien (Yin et al., 2024) | sur deux modèles de 2024, « please » (s’il vous plaît) et « I order you » (je vous ordonne) ne font pas de différence significative dans l’ensemble (Meincke et al., 2025a) |
| Attribuer un rôle au modèle, par exemple « You are an excellent math teacher » (vous êtes un excellent professeur de mathématiques) ou « You are a helpful assistant » (vous êtes un assistant serviable) | sur les modèles de 2023, un meilleur raisonnement avec un rôle adapté à la tâche (Kong et al., 2024 ; Salewski et al., 2023) | sur des modèles ouverts de 2024, aucune amélioration dans l’ensemble (Zheng et al., 2024) ; sur les modèles de 2024 et 2025, un rôle d’expert ne fait pas de différence significative dans la plupart des cas, tandis qu’un rôle d’un autre domaine, ou peu compétent, peut faire baisser l’exactitude accuracyexactitude evaluationévaluation The share of all decisions of a system that are correct, true positives and true negatives together.Part de toutes les décisions d'un système qui sont correctes, vrais positifs et vrais négatifs ensemble. (Basil et al., 2025) |
La plupart des constats actualisés viennent des Prompting Science Reports (Meincke et al., 2025a, 2025b, 2025c ; Basil et al., 2025), de courts rapports techniques des Generative AI Labs de la Wharton School qui mettent à l’essai les conseils de requête populaires sur des modèles récents. Deux points de méthode comptent :
- chaque question est posée 25 fois ou plus, avec et sans la phrase testée, parce qu’un modèle peut répondre différemment à la même question d’une exécution à l’autre ;
- les questions sont difficiles : des questions à choix multiples de niveau universitaire avancé.
Les phrases testées modifiaient le résultat sur certaines questions, dans un sens ou dans l’autre et sans qu’on puisse prévoir lequel, mais ne faisaient pas de différence significative sur l’ensemble des questions.Les quatre rapports, tous de 2025, ont testé des modèles de 2024 et 2025, dont GPT-4o, GPT-4o mini, Gemini 2.0 Flash, Claude 3.5 Sonnet et, comme modèles de raisonnement, o3-mini et o4-mini. Les Prompting Science Reports sont des rapports techniques du laboratoire d’IA d’une école de commerce, et non des articles évalués par les pairs. Demander un travail étape par étape aide encore dans certains cas, surtout pour les tâches qui se résolvent en appliquant des règles (see also the Split the task page) (voir aussi la page Découper la tâche).
Les conseils qui résistent aux essais sont simples :
- dire clairement ce que vous voulez ;
- donner assez de contexte ;
- montrer un exemple quand c’est possible.
Peu de techniques, et votre propre modèle
Les techniques qui fonctionnent sont peu nombreuses et générales : il n’y a donc pas de formule à mémoriser pour rédiger une requête. Au-delà de quelques principes de base (see also the Be specific and ask for enough page) (voir aussi la page Être précis et en demander assez), la compétence consiste à savoir comment le modèle que vous utilisez se comporte sur les tâches que vous faites vraiment, et cela s’apprend en l’essayant. Les fournisseurs publient des guides de rédaction de requêtes pour leurs propres modèles et les mettent à jour à chaque génération : c’est un bon point de départ.Par exemple Anthropic, Prompting best practices ; OpenAI, Prompt engineering ; Google, Prompt design strategies. Tous consultés le 17 septembre 2026.
Sources
- Basil, S., Shapiro, I., Shapiro, D., Mollick, E., Mollick, L., & Meincke, L. (2025). Prompting Science Report 4: Playing Pretend: Expert Personas Don't Improve Factual Accuracy. arXiv:2512.05858 (technical report). https://arxiv.org/abs/2512.05858
- Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., & Iwasawa, Y. (2022). Large Language Models are Zero-Shot Reasoners. Advances in Neural Information Processing Systems 35 (NeurIPS 2022). https://proceedings.neurips.cc/paper_files/paper/2022/hash/8bb0d291acd4acf06ef112099c16f326-Abstract-Conference.html
- Kong, A., Zhao, S., Chen, H., Li, Q., Qin, Y., Sun, R., Zhou, X., Wang, E., & Dong, X. (2024). Better Zero-Shot Reasoning with Role-Play Prompting. Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), 4099–4113. https://aclanthology.org/2024.naacl-long.228/
- Li, C., Wang, J., Zhang, Y., Zhu, K., Hou, W., Lian, J., et al. (2023). Large Language Models Understand and Can be Enhanced by Emotional Stimuli. Preprint, arXiv:2307.11760 (a short version accepted at the LLM@IJCAI 2023 workshop). https://arxiv.org/abs/2307.11760
- Meincke, L., Mollick, E. R., Mollick, L., & Shapiro, D. (2025a). Prompting Science Report 1: Prompt Engineering is Complicated and Contingent. Wharton Generative AI Labs, technical report; preprint, arXiv:2503.04818. https://arxiv.org/abs/2503.04818
- Meincke, L., Mollick, E. R., Mollick, L., & Shapiro, D. (2025b). Prompting Science Report 2: The Decreasing Value of Chain of Thought in Prompting. Wharton Generative AI Labs, technical report; preprint, arXiv:2506.07142. https://arxiv.org/abs/2506.07142
- Meincke, L., Mollick, E. R., Mollick, L., & Shapiro, D. (2025c). Prompting Science Report 3: I'll pay you or I'll kill you, but will you care?. Wharton Generative AI Labs, technical report; preprint, arXiv:2508.00614. https://arxiv.org/abs/2508.00614
- Salewski, L., Alaniz, S., Rio-Torto, I., Schulz, E., & Akata, Z. (2023). In-Context Impersonation Reveals Large Language Models' Strengths and Biases. Advances in Neural Information Processing Systems 36 (NeurIPS 2023). https://openreview.net/forum?id=CbsJ53LdKc
- Schulhoff, S., Ilie, M., Balepur, N., Kahadze, K., Liu, A., Si, C., et al. (2024). The Prompt Report: A Systematic Survey of Prompt Engineering Techniques. arXiv:2406.06608 (preprint). https://arxiv.org/abs/2406.06608
- Yang, C., Wang, X., Lu, Y., Liu, H., Le, Q. V., Zhou, D., & Chen, X. (2024a). Large Language Models as Optimizers. The Twelfth International Conference on Learning Representations (ICLR 2024). https://proceedings.iclr.cc/paper_files/paper/2024/hash/3339f19c5fcee3ad74502947a32be9e6-Abstract-Conference.html
- Yin, Z., Wang, H., Horio, K., Kawahara, D., & Sekine, S. (2024). Should We Respect LLMs? A Cross-Lingual Study on the Influence of Prompt Politeness on LLM Performance. Proceedings of the Second Workshop on Social Influence in Conversations (SICon 2024), 9–35. https://doi.org/10.18653/v1/2024.sicon-1.2
- Zheng, M., Pei, J., Logeswaran, L., Lee, M., & Jurgens, D. (2024). When "A Helpful Assistant" Is Not Really Helpful: Personas in System Prompts Do Not Improve Performances of Large Language Models. Findings of the Association for Computational Linguistics: EMNLP 2024, 15126–15154. https://aclanthology.org/2024.findings-emnlp.888/
Sources
- Basil, S., Shapiro, I., Shapiro, D., Mollick, E., Mollick, L., & Meincke, L. (2025). Prompting Science Report 4: Playing Pretend: Expert Personas Don't Improve Factual Accuracy. arXiv:2512.05858 (technical report). https://arxiv.org/abs/2512.05858
- Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., & Iwasawa, Y. (2022). Large Language Models are Zero-Shot Reasoners. Advances in Neural Information Processing Systems 35 (NeurIPS 2022). https://proceedings.neurips.cc/paper_files/paper/2022/hash/8bb0d291acd4acf06ef112099c16f326-Abstract-Conference.html
- Kong, A., Zhao, S., Chen, H., Li, Q., Qin, Y., Sun, R., Zhou, X., Wang, E., & Dong, X. (2024). Better Zero-Shot Reasoning with Role-Play Prompting. Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), 4099–4113. https://aclanthology.org/2024.naacl-long.228/
- Li, C., Wang, J., Zhang, Y., Zhu, K., Hou, W., Lian, J., et al. (2023). Large Language Models Understand and Can be Enhanced by Emotional Stimuli. Preprint, arXiv:2307.11760 (a short version accepted at the LLM@IJCAI 2023 workshop). https://arxiv.org/abs/2307.11760
- Meincke, L., Mollick, E. R., Mollick, L., & Shapiro, D. (2025a). Prompting Science Report 1: Prompt Engineering is Complicated and Contingent. Wharton Generative AI Labs, technical report; preprint, arXiv:2503.04818. https://arxiv.org/abs/2503.04818
- Meincke, L., Mollick, E. R., Mollick, L., & Shapiro, D. (2025b). Prompting Science Report 2: The Decreasing Value of Chain of Thought in Prompting. Wharton Generative AI Labs, technical report; preprint, arXiv:2506.07142. https://arxiv.org/abs/2506.07142
- Meincke, L., Mollick, E. R., Mollick, L., & Shapiro, D. (2025c). Prompting Science Report 3: I'll pay you or I'll kill you, but will you care?. Wharton Generative AI Labs, technical report; preprint, arXiv:2508.00614. https://arxiv.org/abs/2508.00614
- Salewski, L., Alaniz, S., Rio-Torto, I., Schulz, E., & Akata, Z. (2023). In-Context Impersonation Reveals Large Language Models' Strengths and Biases. Advances in Neural Information Processing Systems 36 (NeurIPS 2023). https://openreview.net/forum?id=CbsJ53LdKc
- Schulhoff, S., Ilie, M., Balepur, N., Kahadze, K., Liu, A., Si, C., et al. (2024). The Prompt Report: A Systematic Survey of Prompt Engineering Techniques. arXiv:2406.06608 (preprint). https://arxiv.org/abs/2406.06608
- Yang, C., Wang, X., Lu, Y., Liu, H., Le, Q. V., Zhou, D., & Chen, X. (2024a). Large Language Models as Optimizers. The Twelfth International Conference on Learning Representations (ICLR 2024). https://proceedings.iclr.cc/paper_files/paper/2024/hash/3339f19c5fcee3ad74502947a32be9e6-Abstract-Conference.html
- Yin, Z., Wang, H., Horio, K., Kawahara, D., & Sekine, S. (2024). Should We Respect LLMs? A Cross-Lingual Study on the Influence of Prompt Politeness on LLM Performance. Proceedings of the Second Workshop on Social Influence in Conversations (SICon 2024), 9–35. https://doi.org/10.18653/v1/2024.sicon-1.2
- Zheng, M., Pei, J., Logeswaran, L., Lee, M., & Jurgens, D. (2024). When "A Helpful Assistant" Is Not Really Helpful: Personas in System Prompts Do Not Improve Performances of Large Language Models. Findings of the Association for Computational Linguistics: EMNLP 2024, 15126–15154. https://aclanthology.org/2024.findings-emnlp.888/