Prompt Engineering
The craft of writing instructions that get the best, most reliable output from an AI model.
When not to use it
- As a substitute for evaluation. Prompt tweaks feel productive and prove nothing without a test set. "It looks better" is how teams ship regressions.
- When the real problem is data or model choice. No prompt rescues a model that has never seen your domain, or a task that needs a database lookup.
- At scale, as a permanent fix. Prompts that carry heavy instructions on every call cost money on every call. At volume, fine-tuning or a smaller model is cheaper.
Reach for something else instead
- Few-shot examples usually beat elaborate instructions. Show, don't explain.
- Structured output constraints (schemas, grammars) are more reliable than asking politely for JSON.
- Fine-tuning once a prompt has grown to hundreds of tokens of rules you repeat every request.
Sources & further reading
- Brown et al. (2020), Language Models are Few-Shot Learners — where in-context learning was first demonstrated at scale.
- Wei et al. (2022), Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.
- Zhao et al. (2021), Calibrate Before Use — few-shot results swing wildly on example order, which is why prompt tweaks need measurement, not vibes.
Primary sources, listed so you can check the claims on this page rather than take them on trust.
Where people go wrong
- Cargo-culting phrases like "you are an expert" or "think step by step" without measuring whether they help for your task on your model.
- Over-instructing. Long prompts full of edge cases often perform worse than short ones with good examples.
- Assuming a prompt transfers between models. It frequently doesn't, and the failure is quiet.