The Prompt Engineering Patterns That Actually Work
The quality of your AI output is almost entirely determined by the quality of your prompts. Here are the patterns we've found consistently work:
Pattern 1: Explicit output format specification
Don't let the model decide how to format its response. Specify it exactly.
Return your analysis as a JSON object with the following structure:
{
"summary": "One sentence summary",
"key_points": ["point 1", "point 2", "point 3"],
"confidence": "high|medium|low",
"reasoning": "Brief explanation of your analysis"
}
Return only the JSON object, no additional text.
Explicit output formats make parsing reliable and eliminate the need for complex post-processing.
Pattern 2: Role + context + task separation
Structure your system prompt in three sections:
- Role: Who the model is playing (domain expert, analyst, assistant)
- Context: What it knows about your specific situation
- Task: What it should do with the input it receives
You are a senior financial analyst specializing in early-stage startup evaluation.
Context: You're reviewing pitch decks for a pre-seed fund that focuses on B2B SaaS companies.
Task: For each pitch deck summary provided, identify the three strongest aspects of the business and the three most significant risks, focusing on market size, team, and product differentiation.
Separating these three elements improves output quality consistently.
Pattern 3: Few-shot examples for complex outputs
When the output format is complex or the task involves judgment, include 1-2 examples of ideal input/output pairs in the prompt.
Here are two examples of the analysis format:
Input: [example input 1]
Output: [example output 1]
Input: [example input 2]
Output: [example output 2]
Now analyze the following:
[actual input]
Few-shot examples dramatically improve output quality for tasks that require consistent judgment.
Pattern 4: Chain of thought for reasoning tasks
For tasks that require multi-step reasoning, ask the model to reason through the problem before giving the final answer.
Before providing your recommendation, work through the following:
1. What are the key factors relevant to this decision?
2. What does each factor indicate?
3. Are there any conflicts between factors?
4. Given your analysis, what is your recommendation and why?
Chain-of-thought prompting improves accuracy on reasoning tasks significantly.