Why Prompt Structure Matters More Than Prompt Length
The advice to "be more specific" in prompts usually translates to "add more words." But most prompts that fail don't fail because they're too short — they fail because the model has to guess about ambiguities that a few structural choices would eliminate.
What structure actually does
Structure reduces ambiguity. A prompt that says "review this code" leaves the model deciding: review for what? What format? How long? What level of detail? Its answers to these implicit questions may not match yours.
A structured prompt makes these decisions explicit:
## Task
Review the following Python function for correctness and security.
## Focus on
- Input validation
- Error handling
- Any obvious security issues
## Format
Numbered list of issues. If no issues, say "Looks good."
Maximum 5 items.
## Code
[code here]
This prompt is longer than "review this code" — but each additional token removes a decision the model would otherwise make on its own. The result is more consistent output across different inputs and different runs.
Task before context
Models attend to the beginning of a prompt more strongly than the middle. If you want a model to summarise a document, "Summarise the following document in 3 bullet points: [document]" performs better than "[document] — summarise this in 3 bullet points." The task stated first tells the model how to process what follows.
State constraints explicitly, not implicitly
"Focus on practical examples" is implicit. "Include at least 2 concrete code examples" is explicit. "Don't be too verbose" is implicit. "Respond in under 150 words" is explicit. Explicit constraints produce more consistent results because they're unambiguous — there's no room for interpretation.
Put the most important constraint closest to the content being processed. The instruction immediately before the variable input has a strong influence on how that input is handled.
When length actually helps
Length helps when it adds information the model doesn't have: additional examples of edge cases, context about your domain, clarification of terms that could be interpreted multiple ways. Length doesn't help when it repeats information already present, adds softening language without adding meaning, or provides context the model would infer correctly anyway.
Separating examples from instructions
If your prompt includes few-shot examples, separate them clearly from the instructions with headers or explicit markers. Otherwise the model may treat the examples as the definition of the task rather than illustrations of it — which causes it to replicate the examples rather than generalise from them.