You have a prompt that's almost right and ten minutes to fix it. This prompt engineering cheat sheet is the table to scan: what each technique does, when to reach for it, and where the full lesson is. It adds no new claims. Every row points to a lesson on this site that explains it properly, so open the lesson before you rely on a row.
Fastest rule: fix the basics before the fancy stuff. Read the first table top to bottom and stop at the first row that explains your problem.
What should I fix first when a prompt gives a bad answer?
| Symptom | Likely cause | Try | Lesson |
|---|---|---|---|
| Generic, off-target answer | Vague request | Say who it's for, what the output is, and what "good" looks like | Clarity and specificity |
| Answer ignores your situation | Missing background | Give the facts the model can't guess | Giving context |
| Wrong shape (too long, wrong layout) | No format instruction | Specify length, structure, headings or table | Formatting output |
| Wrong tone or expertise | No role | Assign a role and audience | Assigning roles |
| Prompt is a wall of text | Parts are tangled | Separate instruction, context, input and output format | Prompt elements |
| Every version is a little off | You're guessing | Change one thing per iteration and compare | Iterating your prompts |
| You keep making the same errors | Habits | Check the common mistakes list | Common prompting mistakes |
Which technique fits which task?
| Technique | Use it when | Starter pattern | Lesson |
|---|---|---|---|
| Few-shot examples | Format, tone or labels are hard to describe but easy to show | Two or three input and output pairs, then the real input | Few-shot prompting |
| System prompt | You want standing rules across a whole conversation or app | Put role, rules and output format in the system message | System prompts |
| XML tags and delimiters | Instructions, documents and data are mixing together | Wrap each part in its own labelled tag | XML tags and delimiters |
| Chain of thought | A multi-step problem where the reasoning matters | Ask for the steps, then the answer | Chain of thought |
| Self-consistency | One reasoning run is unreliable | Sample several runs and take the answer most agree on | Self-consistency |
| Generate knowledge | The model needs relevant facts recalled before answering | First ask for background facts, then answer using them | Generate knowledge |
| Reflexion | The first draft needs a critique and retry | Draft, critique against criteria, revise | Reflexion |
| Structured output | A program must parse the answer | Give a schema and constrain the output to it | Constrained generation, JSON schemas |
| Multimodal input | The task involves images or files | Say what to look at and what to extract | Multimodal prompting, vision models |
| Long documents | Source material is long | Put the documents in clearly, ask a specific question | Long documents |
| RAG | Answers must come from your own data | Retrieve relevant passages, then answer from them only | RAG |
Which advanced techniques are worth knowing?
| Technique | Use it when | Lesson |
|---|---|---|
| Prompt chaining | One prompt is doing too many jobs | Prompt chaining |
| Tree of thought | A problem has several possible paths to explore | Tree of thought |
| ReAct | The model must reason and call tools in a loop | ReAct prompting |
| Program-aided reasoning (PAL) | Arithmetic or logic is better done by code | PAL |
| Meta-prompting | You want a model to draft or improve prompts | Meta-prompting |
| Automatic prompt engineer | You want to search over prompt variants | APE |
| Prompt compression | Token cost or context limits bite | Prompt compression |
| Context engineering | You're deciding what the model sees at all, not just wording | Context engineering |
| Agentic prompting | Writing instructions for a model that acts over many steps | Agentic prompting |
| Fine-tuning vs prompting | Prompting seems to have hit a wall | Fine-tuning vs prompting |
How do I make a prompt reliable enough to ship?
| Need | What to do | Lesson |
|---|---|---|
| Know if a change helped | Keep a small set of real inputs and compare versions | Prompt testing and evaluation, evaluation frameworks |
| Manage many prompts | Version them and record changes | Prompt versioning |
| Cut made-up answers | Ground the model and allow "I don't know" | Avoiding hallucinations, hallucinations deep dive |
| Resist attacks | Treat all outside text as untrusted | Prompt injection, red-teaming |
| Control randomness | Know what temperature and max tokens do | LLM settings |
Which settings and model choices matter?
Settings change behaviour as much as wording does. LLM settings explains temperature, top-p and max tokens. For reasoning models, read reasoning models before adding step-by-step instructions, since the model may already be doing that. To choose between models, see choosing a model and model families. For a ranked, task-by-task walkthrough there's also which AI model should I use.
A one-page prompt skeleton
This is an untested template, not a guaranteed formula. Fill what applies and delete the rest.
ROLE: [who the model should act as, for what audience]
TASK: [one clear job, in one sentence]
CONTEXT: [facts the model can't guess]
INPUT: [the text or data, inside its own tags]
EXAMPLES: [0 to 3 input/output pairs, only if format is hard to describe]
FORMAT: [length, structure, schema]
RULES: [what to avoid; what to do if information is missing]
Run it on three real inputs, not one. Compare. Change one line. Run again. That loop, from iterating your prompts, does more than any single technique here.
Where does this page go stale?
Model behaviour changes. Techniques that were essential two years ago may now be built in, and the lessons linked above carry their own updated dates. If a row here disagrees with the lesson, trust the lesson. For copy-ready prompts by job, browse the prompt library; for the bigger picture, see prompt engineering learning path.



