A sequenced, beginner-to-advanced guide to the prompt engineering techniques that actually move accuracy, from LLM settings to advanced reasoning methods.
Before you rewrite a prompt, check the dials around it. Temperature, top_p, max tokens, and the penalties each change your output in a specific way. Here is when to touch each.
A good prompt has up to four parts: instruction, context, input data, and output indicator. Here is what each does and the design habits that make them land.
Examples are the most effective context you can add to a prompt, until they aren't. When few-shot beats zero-shot, how many to use, how to pick them, and where examples won't help.
Telling a model to reason before it answers genuinely improves accuracy on multi-step problems. How standard and zero-shot chain-of-thought work, when to use them, and the cost.
One chain of thought can take a wrong turn. Self-consistency samples several reasoning paths for the same question and votes on the answer, beating a single greedy pass on reasoning tasks.
For questions that need world knowledge, having the model generate relevant facts first, then answer using them, beats answering cold. How it works, and when to use it over RAG.
Reasoning models do the chain-of-thought for you. That flips a lot of prompting advice on its head, and getting it wrong wastes tokens and quality.