Reference guide to 10 core prompt patterns — choose the right pattern for each task type.
Prompt Engineering Patterns Reference
| Pattern | When to Use | Key Phrase |
| Zero-Shot | Simple, standard tasks | Just the instruction |
| Few-Shot | Novel format needed | Example 1... Example 2... Now: |
| Chain-of-Thought | Complex reasoning/math | Let us think step by step |
| ReAct | Tool use, multi-step info | Thought/Action/Observation |
| Self-Consistency | High-stakes answers | Run 5x, majority vote |
| Critique & Refine | Improve output quality | List weaknesses, then rewrite |
| Tree of Thoughts | Complex planning/design | Explore 3 approaches, rate each |
| RAG | Factual Q&A over docs | Context: [docs] Question: [q] |
| Persona | Need expertise/tone | You are a [expert role]... |
| Template | Reusable prompts | Variables: {var1} {var2} |
# Meta-prompt: ask LLM to improve your prompt
You are an expert prompt engineer.
My current prompt is:
{current_prompt}
It has these issues:
{issues_observed}
Rewrite it using prompt engineering best practices.
Explain each change you made.