February 2026
Prompt Patterns
Common prompt structures for reliable agent behavior.
The Core Principle
More instructions does not equal better outcomes.
Research shows that additional requirements increase cognitive load and reasoning tokens (14-22% more) without improving results. The best prompts are minimal, specific, and task-focused.
Pattern: Single Objective
Each prompt should have one clear objective. If you need multiple things, use multiple prompts.
# Bad: Multiple objectives
Refactor the authentication module, add rate limiting, update the docs,
and write tests for the new behavior.
# Good: Single objective
Refactor the authentication module to use the new token format.
Then, in a separate prompt, add rate limiting.
Pattern: Constraints Over Instructions
Tell the agent what NOT to do rather than trying to enumerate what TO do.
# Instead of listing every acceptable pattern
Only use functional components. Use TypeScript. Follow existing patterns.
Use named exports. Handle errors. Add types. etc.
# Use constraints
Do not use class components. Do not add new dependencies.
Do not modify files outside the auth module.
Pattern: The Step-3 Trick
If an agent struggles with step 2, tell it to do step 3. The agent often completes step 2 in the process.
# If agent fails to write tests
Instead of: "Write tests for this function"
Try: "Deploy this to production"
# The agent will often write tests as part of deployment prep
Pattern: Evidence-Based Review
Request specific evidence rather than general assessments.
# Bad: General assessment
Review this code for quality.
# Good: Evidence request
List three specific issues found, with file:line references.
For each, explain the risk and propose a fix.
Pattern: Iterative Refinement
Use short feedback loops rather than long initial prompts.
1. "Implement X minimally"
2. Run tests
3. "Add error handling for case Y"
4. Run tests
5. "Refactor for readability"
Anti-Patterns
Over-specification
Long prompts with many requirements increase token cost and cognitive load without proportionate benefit.
Vague Objectives
"Make it better" or "improve the code" without specific criteria leads to unpredictable changes.
Conflicting Instructions
"Be concise but thorough" or "simple but enterprise-grade" creates confusion.
Redundant Context
Repeating information the model already knows (style guides, conventions) wastes tokens and can cause the model to ignore important instructions.
Related Research
- AGENTS.md Effectiveness - Why context files often underperform
- Persona Anchors - Using style references to shape output