Prompting
Strategy
Glossary of terms
— Contains 33 defined terms that bring order to previously inconsistent naming and make communication between researchers and practitioners easier.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Meta-analysis of prefix-prompting
— A systematic summary of research findings on natural prefix-prompting, indicating which methods have repeatable effects.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Practical applications
— A discussion of how prompting techniques perform in tasks such as text generation, information extraction, classification, and in multimodal systems.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Evaluating effectiveness
— The report compares techniques in terms of accuracy, stability and computational cost, pointing out the trade-offs between the simplicity of a prompt and the quality of results.Best practices
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Precise model versioning
Always give the full version identifier (e.g. gpt-4-0613 instead of GPT-4). This prevents problems caused by models being updated in the background.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Publishing full texts and templates
Share prompts in their raw form together with clearly marked variables (placeholders), so that other researchers can reproduce the experiment exactly.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Defining determinism parameters
Explicitly stating the values of temperature, top-p and seed (where available) is essential for keeping results replicable in production environments.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Documenting Few-shot strategies
If you use examples in the prompt, describe the criteria for choosing them (e.g. whether they were picked at random or by a specific semantic-similarity key).
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Reporting the date and infrastructure
Because of the model drift phenomenon, it is crucial to record the date the tests were run and the wrappers (e.g. LangChain, Guidance) or API libraries used.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesAvoid
Using generic names
Avoid terms like “Llama” or “Claude” without specifying the model's version and size (e.g. 70B). Such data is useless for scientific and technical purposes.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesAvoid
Relying on default settings
Never assume that the “default temperature” is constant across API versions. Not defining parameters explicitly is the most common cause of replication problems.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesAvoid
Hiding manual post-production
If the model's outputs were manually “cleaned” or corrected before analysis, failing to mention this in the report is a methodological error.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesAvoid
Ignoring negative results and hallucinations
Leaving out cases where the model failed makes a reliable assessment of the risk of deploying a given prompt impossible.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesAvoid
A “magical” approach to Prompt Engineering
Avoid introducing modifications (e.g. adding “Think step by step”) without evidence that they actually improve performance in the given use case.
The Prompt Report: A Systematic Survey of Prompt Engineering TechniquesStrategy
Zero-Shot Prompting
A technique that relies solely on the built-in knowledge of a pre-trained model, without giving it any ready-made examples of a solution. It works great for simple, common tasks, where the AI can naturally generalize concepts from its training data.
"Classify this article as 'Sports' or 'Politics': 'Real Madrid won yesterday's Champions League match 3-1.'"
Strategy
Few-Shot Prompting
A strategy of giving the model a few example "input-output" pairs in the prompt itself before asking the actual question. This lets the AI imitate the expected pattern (meta-learning) and significantly improves accuracy on non-standard tasks.
"Review: 'Great movie!' -> Positive. Review: 'Boring and a waste of time.' -> Negative. Review: 'The acting was fine, but the plot was weak.' ->"
Strategy
Chain-of-Thought (CoT) Prompting
An advanced technique that makes the model generate intermediate reasoning steps before it gives the final result. It simulates the human step-by-step analytical process, dramatically improving performance on hard logic and arithmetic problems.
"Before you give the final result, write out your reasoning step by step to calculate Anna's age, assuming she is twice as old as her 10-year-old brother, and in 5 years he will be..."
Good practice
Building strong, detailed context
The more precise background information (the model's role, the business goal, the target audience) you put in the instruction, the more accurate the generated content becomes and the less prone to vague answers (so-called hallucinations).
"You are a senior SEO expert at a marketing agency. Your task is to create a list of 5 long-tail keywords for a local coffee shop in Łódź, aimed at students looking for a place to study."
Good practice
Precisely formatting the output
Always state clearly what structure you want the answer in (e.g. a table, JSON, a specific number of paragraphs, a bulleted list). This saves the user the time of manually reformatting the data afterward.
A practical example that shows the idea in a simple way (a prompt or a short description): "Analyze the text below and return the 3 most important conclusions. Present them as a table with two columns: 'Conclusion' and 'Quote from the text supporting the conclusion'."
Good practice
Iterative refinement
Writing prompts is rarely a one-shot process. Watching the model's mistakes and fixing your queries with additional constraints lets you systematically "calibrate" the final result over a series of conversations with the assistant.
"The text above is good, but its tone is too scientific. Now modify it so that it is understandable to an elementary school student, while keeping all the key facts."
Avoid
Using ambiguous or very vague language
Prompts that leave a lot of room for interpretation force the model to "guess" your intentions. This often leads to answers that are technically correct but useless from the user's perspective.
"Write me something interesting about computers and why they are important."
Avoid
Overloading the context window (Context Overload) in the Few-Shot method
Avoid inserting too many lengthy examples to teach the model. They take up precious "tokens" of the LLM's limited working memory, raise the cost of generation, and can make the AI ignore key instructions at the very bottom of the prompt.
Pasting 20 pages of technical documentation with examples just to ask the model, in the end, a simple question about how to correctly close a given tag in HTML code.
Avoid
Mixing roles and contradictory instructions
Introducing many unrelated formatting rules, or clashing roles to play, in one small block of text can overwhelm the model, causing it to lose key points of the task.
"Be a 19th-century math professor, but use modern Gen-Z slang. Your answer must be exactly 40 words long, written in hexameter, and include a financial analysis of my company."
Strategy
Clear and structured prompts (Structured Prompting)
Phrasing queries thoroughly and dividing them clearly into sections (task, context, instructions), which according to the research directly increases productivity and the relevance of the generated answers.
"Task: Write an email to a customer. Context: An apology for a 2-day delivery delay caused by logistics problems. Tone: Professional, empathetic. Length: 3 paragraphs at most."
Strategy
Context-aware prompts (Context-aware prompts)
Giving the model the full situational background of the task, which eliminates guesswork and lets the AI precisely tailor the generated content to the user's specific needs and circumstances.
"I'm a beginner math teacher. Prepare a simple explanation of fractions for my 4th-grade students, using a metaphor they will understand: cutting a pizza into slices."
Strategy
Iterative refinement (Iterative refinement)
The process of gradually modifying and fine-tuning your queries within a single conversation, based on the AI's first results, to get closer step by step to the desired and most valuable outcome.
"Write a plan for a trip to Rome", and after receiving a general result, the user adds in the next prompt: "Improve this plan, taking into account that I have only 2 days and I'm traveling with a 5-year-old who gets tired quickly."
Strategy
Audience Specification (Audience Specification)
Defining in the prompt the final reader of the generated text, which automatically adjusts the vocabulary and the level of complexity of the language model's explanation.
"Explain how a black hole in space works as if you were telling a 10-year-old boy who loves superhero movies."
Strategy
Automating structured tasks (Automating structured tasks)
Regularly using AI for routine, structured activities such as formatting data or writing summaries, which frees up time for conceptual work and increases productivity.
"Here are my messy notes from yesterday's meeting: [pasted text]. Turn them into a professional summary with the main decisions as bullet points and a list of tasks."
Strategy
Assigning a role and perspective (Role-based Prompting)
Asking the model to step into a specific professional role before it starts the task, which pushes it to use industry jargon and raises the substantive quality of its answers.
"Act as a senior recruiter at an IT company. Analyze my résumé below as an application for a Junior Developer position and point out 3 mistakes I need to fix."
Strategy
Giving examples inside the prompt (Few-Shot Prompting)
Providing the system with patterns of the expected format, style or correct logic directly in the query, which minimizes the risk of AI mistakes and guarantees a correct data layout.
"Format the items below according to the template. Template: Kowalski, J. (2025). My list to format: Piotr Nowak 2024, Anna Wiśniewska 2023, Tomasz Kot 2025."
Strategy
Enforcing output structure (Output formatting constraints)
Clearly instructing the model exactly what form to return the data in (e.g. a table, code in a specific language, bullet points), which saves the time needed for editing it yourself.
"Compare the 5 biggest advantages and 5 disadvantages of electric cars. Present the result as a simple Markdown table with two columns: 'Advantages' and 'Disadvantages'."
Avoid
Vague and ambiguous queries (Vague, short prompts)
Firmly avoid asking short questions with no background, which force the AI to guess your intentions. This leads to generic, overly broad and useless texts.
"Write me something about online marketing." (Instead, you should write: "What are the 3 cheapest marketing strategies on Instagram for a local bakery in 2025?")
Avoid
Lack of critical verification of results (Lack of output verification)
Avoid blindly trusting generated results. Copying data, facts or source code without reading and verifying them first lowers your professionalism and can lead to serious errors in your work.
Pasting an AI-generated script straight onto the company's production server without first testing yourself whether the code even runs.
Avoid
Skipping length constraints (Skipping constraints)
Don't give the model a free hand on text length. Without firm limits, you risk getting an unreadable "wall of text" that won't be usable right away.
"Make me a summary of this 100-page book." (The model may generate 5 pages of text. Instead, add: "...in exactly 5 short points, each at most two sentences long.")
Avoid
Expecting perfection on the first try (Expecting zero-shot perfection)
Avoid abandoning the model just because the first answer to a complicated instruction wasn't 100% perfect. Language models need guidance and dialogue.
Deleting the whole chat window and giving up on AI after getting a bad draft of an article, instead of simply writing: "The text is good, but write the same thing in a more casual and fun language."
Strategy
Decomposition
A strategy of breaking complex engineering problems into smaller, sequential subtasks. It helps models handle software architecture without losing context and logic.
"Instead of asking for the whole application to be written, ask first for the database structure, in the next step for the API, and finally for the user interface."
Strategy
Thought Generation
Forcing the model to analyze and describe the business logic before it generates the final code or bug fix. This significantly improves effectiveness on tasks that require intensive reasoning.
"Before you write the code for this algorithm in Python, describe step by step how you intend to optimize its memory complexity."
Strategy
Self-Criticism
Making the model analyze its own initially generated solution, find errors in it and propose an improved, final version before presenting it to the user.
"Write a login function. Then act as an auditor, analyze this code for security vulnerabilities, fix them and return the final, secure code."
Strategy
Ensembling (combining answers)
Having the AI generate several different approaches to solving one problem and choosing the most optimal one, e.g. in terms of performance or code cleanliness.
"Generate three completely different approaches to fixing this authorization bug, and then point out the solution that is the most optimal."
Good practice
Matching the technique to the specific task
The report indicates that for tasks requiring complex logic (e.g. bug hunting) "Thought Generation" works best, whereas for template-based tasks (e.g. code formatting, writing tests) example-based "Few-Shot" techniques give much better results.
"To generate repeatable unit tests, paste 3 examples of your coding style (Few-Shot). To look for a security vulnerability, use the prompt 'Let's analyze this file step by step'."
Good practice
Awareness of time and token costs
Always keep resources in mind. Complicated techniques such as Ensembling or Self-Criticism significantly increase token usage and waiting time for a response, so they should not be used for trivial tasks.
"To generate a simple comment documenting code, use basic Zero-Shot to save tokens, instead of applying advanced reasoning chains."
Good practice
Optimizing the linguistic features of the prompt
The authors note a strong correlation between the precision of the language used and the quality of the generated code. Specific technical vocabulary helps steer the model toward the right solution.
"Instead of writing 'Write something that fetches data from a page', use: 'Write an asynchronous Python function using aiohttp that fetches data from the given REST API endpoint'."
Avoid
Using one complicated template for everything (One-size-fits-all)
Not every prompt engineering technique works equally well on every programming task. Imposing heavy reasoning techniques on simple problems only lowers efficiency and lengthens working time.
"Forcing long 'step by step thinking' when asking to rename a variable in a single line of code is a waste of resources and computing time."
Avoid
Demanding the solution to a huge system all at once
Overly large and complex software engineering requests sent in a single prompt (without using decomposition) drastically increase the risk of "hallucinations" and of generating code that does not work.
"Build a full e-commerce system with authorization, a cart, payment integration and an admin panel in one response."
Avoid
Ignoring the context around the code
Using Zero-Shot mode (without giving examples or broader context) when editing complicated software projects leads to code that does not integrate with the rest of the related application.
"The request 'Fix the bug in user_service.py' without providing the database models, error logs and related file dependencies."
Strategy
Automated Prompt Optimization (APO)
A framework in which the models themselves automatically generate, test, and iteratively improve prompts, treating the process as a mathematical problem of maximizing a score instead of relying on human intuition. Explanation or promptRunning a script in which an AI generates 50 variants of a chatbot's instructions, tests each one on a set of 100 test questions, and picks the version with the highest rate of correct answers on its own.
A Survey of Automatic Prompt Engineering: An Optimization PerspectiveStrategy
Evolutionary Methods
Treating prompts like organisms that can "mutate" or "cross over". The algorithm takes the best instructions from a pool and combines their fragments so that, over successive generations, an even more effective version of the text evolves. Explanation or promptThe system takes two prompts that work well: "Summarize this briefly" and "List the main points". It then "crosses" them to create a new, more effective mutation: "Briefly list 3 main points of the summary."
A Survey of Automatic Prompt Engineering: An Optimization PerspectiveStrategy
Continuous and Hybrid Prompt Spaces (Soft & Hybrid Prompts)
Tuning the model's hidden mathematical representations (vectors) instead of the natural-language words themselves. This allows deeper, more technical communication with the AI, bypassing the limits of human language.
Instead of adding more and more words to the prompt ("Be very, very nice"), the algorithm modifies, at the code level, numerical vectors attached to the user's query, which implicitly impose the right style of speech on the model.
Good practice
Defining the Optimization Objective (Task-specific Objectives)
Before you start automatic prompt engineering, you must define the objective function clearly and mathematically, that is, what exactly "success" means for the task at hand (e.g., minimizing the number of hallucinations, maximizing conciseness).
Setting a strict rule in the algorithm that tests prompts: "The optimal prompt is the one that, over 100 attempts, forces the model to generate only Python code with no side text whatsoever."
Good practice
Optimizing Example Answers (Exemplar Optimization)
Automated frameworks go beyond merely improving instructions – it is worth having algorithms search huge databases to pick the best possible "few-shot" examples to put in the prompt.
Instead of hand-picking 3 tasks for the examples section of a prompt, you let an AI model scan a database of 1,000 questions and choose the 3 most representative ones, which will teach the target model the desired logic.
Good practice
Unifying the Tooling (Unified Optimization Framework)
Moving from haphazard "guessing" of prompts in production to standardized systems that consistently evaluate instructions against the same metrics over time.
Building an automated test pipeline that every new prompt in the company must pass (verification on a fixed dataset before deployment to the application).
Avoid
Manual experimentation at large scale (Manual scalability limits)
Avoid the human, time-consuming tweaking of individual words in a prompt ("Do it well" vs "Do it precisely") when you deploy a model in a large commercial application. At this scale, human intuition is inefficient.
Hiring a team of people to guess at and test 500 versions of a query for an accounting assistant, instead of deploying an APE (Automatic Prompt Engineer) library that finds the mathematical optimum in 15 minutes.
Avoid
Focusing only on changing words (Ignoring soft spaces)
Avoid relying solely on discrete text instructions (hard prompts) if you have the computing resources and access to the model's weights to use far more powerful vector prompts (soft tuning/prefix tuning).
Writing a 5-page text file of instructions, which eats up your precious token limit, instead of training a lightweight "soft prompt" module that applies the same set of behaviors to the model as a small vector add-on.
Avoid
Aimless optimization in agent mode (Unconstrained agent design)
Be careful about using automatic prompt optimization without imposing strict safety constraints. Self-modifying prompts can evolve in ways that go against human intent.
Leaving the optimization algorithm a free hand, which can lead the system to invent a jailbreak-style prompt that carries out the task perfectly but breaks the company's data-privacy safeguards.
Strategy
Automatic Prompt Engineering (APE)
Instead of writing and testing prompts by hand, this approach uses LLMs themselves to automatically generate and optimize instructions for different tasks. This makes it possible to achieve better results with less effort. Practical example:Explanation or prompt"Generate 5 different prompt variants that would best instruct another language model to summarize a legal text, then select and return only the one with the highest effectiveness.
Efficient Prompting Methods for Large Language Models: A SurveyStrategy
Prompt Compression
Techniques that drastically shorten long prompts by removing unnecessary words, which reduces computational cost (token usage) and speeds up response time while preserving the key information needed to solve the task. Practical example Explanation or prompt"Shorten the following 10-page project context to the 5 most important bullet points, keeping only hard facts and numbers, before you send it on to the final business analysis."
Efficient Prompting Methods for Large Language Models: A SurveyStrategy
Knowledge Distillation methods
Using the largest and most powerful models (so-called teachers) to create optimized sets of rules or patterns, which are then used to steer smaller, much cheaper models (so-called students). Practical example: Explanation or prompt"Analyze this complex dataset and, based on it, generate 3 simple, universal decision rules that a basic classification model should follow when evaluating similar tickets."
Efficient Prompting Methods for Large Language Models: A SurveyGood practice
Minimizing unnecessary context (Context Filtering)
Keeping the prompt length to the absolute minimum. Instead of pasting an entire long document, filter it and give the model only the fragments relevant to the given query, which makes the model work faster and cheaper. Practical example: Explanation or prompt"Based solely on the 'Technical Requirements' section below, list the frontend technologies used. Completely ignore and skip the information about budget and marketing."
Efficient Prompting Methods for Large Language Models: A SurveyGood practice
Separation of Instruction and Context
Good, efficient prompts have a clear structure that separates what the model is supposed to do (the instruction) from the working data it is supposed to operate on. This reduces the risk that the model treats the data as a command. Practical example:Explanation or prompt"INSTRUCTION: Translate the following text into French, keeping a formal tone. TEXT TO TRANSLATE: [Pasted text]"
Efficient Prompting Methods for Large Language Models: A SurveyGood practice
Evolution-based tuning
Iteratively improving a prompt based on the faulty outputs you receive. Instead of building the perfect prompt from scratch, start with a simple instruction and modify it, adding specific constraints wherever the AI made a mistake. Practical example:
Efficient Prompting Methods for Large Language Models: A SurveyAvoid
Prompt Inflation/Bloat
Avoid creating overly long and complicated prompts (so-called megaprompts) full of unnecessary detail for simple tasks. This drastically increases the cost of using the model API, and the extra words often just confuse it. Practical example: Explanation or prompt"You are an outstanding professor with 30 years of experience, you taught at Harvard and you love pizza. Think deeply, take a deep breath, use all of your powerful knowledge and just tell me what the formula for the area of a circle is."
Efficient Prompting Methods for Large Language Models: A SurveyAvoid
Ambiguous instructions in long context
Avoid placing your main question or command in the middle of a huge block of text. LLMs suffer from the "lost in the middle" phenomenon, so they may ignore the instruction if it is not at the very beginning or end of the query. Practical example: Explanation or prompt"Here are 20 pages of a boring annual report. Somewhere on page 10 I mention that I would like you to calculate the average profit for Q2. Read the whole thing and generate an answer."
Efficient Prompting Methods for Large Language Models: A SurveyAvoid
Ignoring token costs through excessive 'Few-Shot Prompting'
Avoid manually pasting dozens of examples of the task before you have made sure the model cannot do it with a short, well-worded instruction. Every additional example makes the query longer and costs valuable computational resources. Practical example : Explanation or prompt"[Pasting 50 bank transactions with a category added as an example] Now assign a category to this new transaction from the company XYZ." (Instead of simply using the instruction, e.g. "When assigning a category, choose from: Shopping, Fuel, Entertainment.")
Efficient Prompting Methods for Large Language Models: A SurveyDone!
You went through 63 takeaways.
Keep reading
Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?There's a way to stop AI making mistakes in simple math. And it isn't retraining the model.
Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsOne task went fine. The trouble shows up after many more.
LLMs Corrupt Your Documents When You Delegate













