Prompt engineering, in plain English.
Real techniques used in production AI systems — what they are, when to use them, when not to, and a one-click interactive template for each.
Chain-of-Thought (CoT) Prompting
Force the model to think step-by-step before answering. Dramatically improves accuracy on multi-step problems.
Tree-of-Thoughts (ToT) Prompting
Generate multiple reasoning branches per step, evaluate each, and prune. Beats single-path Chain-of-Thought on hard decisions.
Self-Refine
Generate → critique own output → revise → repeat. Pushes a model's output much closer to its capability ceiling.
Multi-Persona Debate / Council
Simulate multiple distinct experts debating the question, then synthesize. Surfaces what a single persona would have missed.
Adversarial / Red-Team Prompting
Ask the model to attack your idea before defending it. Surfaces the failure modes before they ship.
Pre-Mortem Analysis
Imagine the project failed 6 months from now. Work backwards from the failure to find the cause. Used at Amazon and NASA.
Few-Shot Prompting
Show the model 2–5 examples of input → desired output before asking. Consistently the highest-ROI prompt move in real-world AI work.
Zero-Shot Prompting
No examples — just the instruction. The baseline every prompt is implicitly trying to beat.
System Prompt Design
The hidden instructions that set the model's role, constraints, and ground rules for the entire conversation. Where 80% of product behavior actually lives.
Persona / Role Prompting
Tell the model who it is. "Act as a senior X" changes accuracy, vocabulary, and tone more than any other single trick.
Function Calling / Tool Use
Let the model decide when to invoke a real function or API instead of free-text answering. The foundation of every modern agent.
Retrieval-Augmented Generation (RAG)
Don't train on it — retrieve it. Inject relevant documents into the prompt at runtime so the model answers from real source material.
ReAct (Reason + Act)
Alternate reasoning and acting in a tight loop. The dominant pattern for tool-using agents — think, act, observe, repeat.
Constitutional AI
Train (or prompt) the model with an explicit set of principles, then have it critique its own outputs against them. Anthropic's safety technique.
Self-Consistency
Sample the same Chain-of-Thought prompt N times. Take the majority answer. Beats single-sample CoT on reasoning benchmarks.
Step-Back Prompting
Before answering the specific question, derive the higher-level principle. Then apply it. Better generalization, fewer hallucinations.