# Prompt Engineering Strategies
## Elements
- Explicit instructions: what we want the model to do
- Question: formulating the task as a question
- Context: Context within which the model performs the task
- Role
- Tone
- etc
## Example instructions
- You are a ... Write a short, persuasive text about the benefits of ...
- You are a ... Reflect on ...
- ... Provide advice on ...
## Zero-shot learning
Most simple prompt engineering technique
- Instructions: Describe the task
- Input
## Few-shot learning
Add more description to the prompt, so that the model can perform better (clearer context, goals, output restrictions, etc)
Cons:
- Uses a larger number of tokens
- Charged per token
- Conciseness is key
Update (November 2026): Anthropic's current guide still calls examples one of the most reliable ways to steer the output's format and tone. It recommends 3 to 5 examples, close to the real use case, varied enough to cover edge cases (so the model doesn't copy an unintended pattern), and wrapped in `<example>` tags. With thinking models, present each example as a problem, the method to apply and the expected answer. See [[Prompt Engineering Best Practices]].
## Prompting by instruction
Give explicit, clear directives to the model to guide its output
Precision matters:
- Direct commands
- Output guidelines
- eg tone, format
Pros:
- Precise control
- Ideal for tasks with specific/expected outcomes
- Less setup required
Cons:
- Requires clear and unambiguous language
- May struggle with complex/nuanced tasks
- Interpretation might not align with intent
With current Claude models, add the reason behind each instruction. The model generalizes from the reason, so it also handles the cases the instruction doesn't name. And ask for action directly ("Change this function"): "Can you suggest changes" gets suggestions.
## Prompting by example
Provide examples and let the model figure out the goal and format
Pros:
- Can handle complex tasks, even if those require creativity
- Reduced ambiguity if the input examples are good enough
- Enables the model to learn from a variety of scenarios
Cons:
- Require high-quality examples for training
- Time-consuming
- Rigid model, too fixated on the given examples
## Chain-of-Thought prompting
- Prompt, context, series of reasoning steps
- Provides specific steps to follow
- Enables the model to perform multiple steps and reason for each specifically
- Discourages the model from generating quick answers
This approach looks as follows:
- Input > Prompt #1 > Output #1 > Prompt #2 > Output #2 > Prompt #3 > Final output
Example
- You are an AI assistant that helps customers book flights on the ... airline. F
- Follow these steps to answer the customer queries
- Step 1: First decide whether the user is asking a question about a specific airline or flight route
- Step 2: ...
- Step 3: If ... then ...
- ...
Update (November 2026): [[AI Reasoning Models]] do most of this internally now. On current Claude models, thinking is adaptive (and always on for Fable 5.x and Opus 5.5), and Anthropic's guide says a general "think thoroughly" often produces better reasoning than a hand-written plan. Asking those models to write their reasoning in the reply might even be declined. Manual chain of thought remains the fallback for models with thinking off; see [[Chain-of-Thought (CoT) prompting]].
I'd still write explicit steps when they encode rules the model can't guess, like which kind of question goes where in the airline example above. For the reasoning itself, I'd let the model think.
## Multi-Chain Prompting
Cfr [[Prompt Chaining]] and [[Multi-Agent System (MAS)]].
## Knowledge Augmentation
Adding the following to prompts:
- Relevant keywords and phrases
- Structured data
- Additional context
- Access a vector database
- Including search results
- ...
Helps the model perform better
Can be combined with Chain-of-Thought and Multi-Chain prompting
## Prompt Lazy Loading
Cfr [[Prompt Lazy Loading AI Design Pattern (PLL)]]
## References
- Anthropic, "Prompting best practices", Claude Platform docs: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
## Related
- [[Prompt Engineering]]
- [[Prompt Engineering Best Practices]]
- [[Chain-of-Thought (CoT) prompting]]
- [[Prompt Chaining]]
- [[AI Reasoning Models]]