Why smaller prompts outperform larger ones

Teams building on language models reach for longer prompts when the output is not quite right. The failure on the last run is diagnosed as a missing instruction, so an instruction is added. The next run is better in some ways and worse in others, which gets diagnosed as another missing instruction. The prompt grows by a paragraph or two per iteration. After a few months the prompt is 5,000 tokens, contradicts itself in several places, and the model's output has gotten worse rather than better.
This pattern is common enough that it appears on most AI projects the team has not explicitly guarded against. The underlying cause is a property of how language models process their inputs: attention is finite, and more context in the prompt means less attention per token. A long prompt dilutes the attention available to the parts that matter.
The attention dilution effect
A language model, in simplified terms, reads the prompt by giving every token some attention and letting the tokens influence each other. The influence is bounded. There is a fixed amount of attention to go around, and every token competes for it.
A prompt of 500 well-chosen tokens has the model's attention concentrated on the task. Each instruction in the prompt gets a meaningful share of the attention budget. The model's output reflects the full prompt because the full prompt was within the window of what the model could focus on.
A prompt of 5,000 tokens has the same attention budget spread across ten times the content. Each instruction gets a tenth of the attention it would have gotten in the shorter prompt. The model's output reflects some parts of the prompt well and others poorly, because the attention could not be given to all of them.
The effect is not linear. Doubling the prompt does not halve the quality on every part. In practice, the model tends to pay more attention to the start and end of the prompt than to the middle, which is why long prompts often produce outputs that follow the first and last instructions and ignore the middle ones. This is the "lost in the middle" effect that has been observed in multiple measurements.
The practical takeaway is that adding to a prompt is not always helpful, and often actively harms the output. Teams that add instructions reflexively after each failure are often making the problem worse.
The signs of an oversized prompt
An oversized prompt produces specific symptoms, and a team familiar with them can spot the problem without a formal measurement.
The output is correct in parts and wrong in parts. The model handles some aspects of the task well and others poorly, and the pattern of success and failure does not correspond to the difficulty of the inputs. Easy inputs sometimes fail. Hard inputs sometimes succeed. The inconsistency is the signature.
The model follows one instruction and ignores another. The prompt says "keep the response under 100 words" and the response is 300 words. The prompt says "use the formal tone" and the response is casual. The prompt says "cite sources" and there are no citations. One or more specific instructions are being ignored, and which ones tend to shift from run to run.
The output is inconsistent across runs with the same inputs. The model produces different outputs for the same prompt on different runs, and the differences are substantive rather than cosmetic. This is a sign that the model is making different tradeoffs on different runs about which parts of the prompt to attend to.
The output has drifted from what it used to produce. The prompt has been edited many times, each edit intended to fix a specific case, and the current output is worse than the version from three months ago. The accumulation of edits has crossed the line where the next edit makes things worse rather than better.
What to cut
The first thing to cut from an oversized prompt is the redundant instructions. A prompt that grew iteratively usually says the same thing several ways. "Be concise. Be brief. Keep the output short. Do not write long responses." are four versions of one instruction. One version is enough; four create the impression that the model should go to unusual lengths to be concise, which sometimes produces outputs that are terse to the point of being useless.
The second thing to cut is explanation. A prompt often says "the user will be a software engineer, so they will want..." and goes on to explain why the instruction exists. The model does not need the explanation. It needs the instruction. "Output should be at a software engineer's level of detail" is enough.
The third thing to cut is edge-case instructions. Over time, a prompt accumulates handling for specific cases that happen rarely. "If the input is in all caps, treat it as a shouting user and respond with..." If the case happens in 1 percent of runs, handling it in the prompt costs attention on the other 99 percent. Handle it in post-processing instead, or accept that the 1 percent will be handled imperfectly.
The fourth thing to cut is examples that do not change behaviour. If the prompt includes three examples and the model's output on new inputs is the same whether or not the examples are present, the examples are not pulling their weight. Keep examples that change outputs; drop ones that do not.
What to keep
The parts that stay in the prompt are the ones that carry information the model cannot derive from the task alone.
The task description, stated clearly. "Translate the user's question into a SQL query against the schema below." Specific enough that the model knows what it is being asked to produce.
The output format. "Return a JSON object with two fields: 'query' (the SQL as a string) and 'confidence' (a number from 0 to 1)." The model will produce output that matches the format if the format is stated; it will produce something structurally plausible but variable if the format is not.
Constraints that are not derivable from the task. "The SQL should be read-only; reject any question that would require a write." "Table names are case-sensitive." These are rules the model needs to apply and cannot infer.
Examples that change behaviour. "Here are two sample questions and their correct SQL outputs." A single well-chosen example can anchor the model on a specific pattern more effectively than a paragraph of instruction can.
Everything else is optional, and the choice to include it should be a choice, not a reflex.
The trimming method
The practical method for trimming a prompt is to produce two versions, run both on the same test set, and compare.
Start with the current prompt. Produce a trimmed version that removes everything the team believes is not essential. If the cuts are too aggressive, the trimmed version will fail where the current one passes; if they are not aggressive enough, the two will perform the same. Both outcomes are information.
Run both prompts on a test set that includes the cases the team cares about most, including the edge cases that drove the original additions. For each case, record whether the outputs are correct, acceptable but different, or wrong.
Compare the results case by case. If the trimmed version performs better overall, it replaces the current one. If it performs worse on specific cases, those are the cases where the cut content was carrying weight. Add back only the content needed for those specific cases, not the general length.
Most teams that do this exercise find that the trimmed prompt performs the same or better on most cases, and worse on a small number of cases that can be addressed with a few sentences added back. The result is a prompt that is 20 to 70 percent shorter and produces output that is at least as good.
Context, not just prompts
The attention dilution effect applies to the entire context the model sees, not just the prompt the team wrote. A short prompt with a large retrieved context has the same problem as a long prompt.
For a retrieval-augmented system, the retrieval configuration matters as much as the prompt. A retriever that returns 10 chunks when only 2 are relevant produces an 8-chunk attention dilution for every request. The fix is either to tune the retriever's threshold up (fewer, more relevant chunks), to add a filtering step between retrieval and the model, or to accept that the model will not be at its best because of the extra content.
For a conversational system, the conversation history is also context. A 20-turn conversation has 20 turns of history competing for attention with the current turn's instruction. Trimming the history to the last few relevant turns, or summarising older turns, is the same kind of trimming as cutting a prompt. For related reading, see rag vs fine tuning for product teams and why context windows change how you structure a task.
For a coding assistant, the context is the selected files. A coding task with the whole codebase in context underperforms one with the specific files needed. Most coding assistants that search the codebase and include matches perform worse than ones that ask the user to name the specific files, because the user's selection is more precise than the search.
The cost dimension
Trimmed prompts are cheaper as well as more accurate. Every token in the prompt costs money, and the cost is linear in the number of tokens. A prompt that is 70 percent shorter is 70 percent cheaper.
For a system that serves many requests, the savings compound. A system that runs 10,000 requests a day with 4,000-token prompts is spending roughly four times as much on prompt tokens as one that runs the same requests with 1,000-token prompts. If the shorter prompts also produce better output, the system is both cheaper and better.
The cost argument is sometimes what gets the trimming prioritised. The quality argument is real but hard to make concretely until the measurement is done. The cost argument is concrete: here is what the prompts cost today, here is what they cost after trimming, here is the monthly savings. Teams that are not yet motivated by the quality concern are often motivated by this one.
For related reading, see how to budget for ai coding tools and why a long claude code session costs more on every message.
The habit of cutting before adding
The teams that avoid the prompt-bloat trap have a specific habit. When the output is wrong, they investigate before changing the prompt.
Investigate what. The specific failure. What was the input, what did the model produce, what should it have produced. Why did the model produce what it did. Was it ignoring an instruction, misreading an input, lacking information, or producing a reasonable interpretation of ambiguous instructions.
The investigation often reveals that the fix is not a new instruction. The fix is a clearer existing instruction, a cleaner input, a filter on the retrieved context, or a decision that the specific case does not need to be handled by the prompt at all.
When the fix is a new instruction, add it carefully. Check whether the new instruction contradicts an existing one; if it does, decide which should win and remove the other. Check whether the new instruction could be covered by tightening an existing instruction instead of adding a new one.
The habit of cutting before adding keeps the prompt small enough that attention dilution does not become the dominant failure mode. The habit is not natural; the natural response to a failure is to add. The teams that learn this habit produce prompts that keep working as the project scales, and the teams that do not end up with 10,000-token prompts that nobody understands and nobody wants to trim.


