Prompt Engineering
The practice of designing, iterating, and optimizing text inputs to language models—including instructions, examples, context, and formatting—to reliably elicit desired outputs without modifying model weights.
Prompt engineering spans a wide range of techniques from simple instruction formatting to elaborate multi-step scaffolds. Core principles include: be specific about output format, provide worked examples for complex tasks (few-shot), give the model space to reason before answering (chain-of-thought), and use a system prompt to establish stable persona and constraints.
As models have grown more capable, raw prompt engineering has become less critical for simple tasks but remains essential for reliably unlocking complex capabilities—long-horizon reasoning, structured output, multi-hop tool use. Anthropic's prompt engineering guide and OpenAI's cookbook are the canonical references.
The field is shifting from hand-written prompts toward automated prompt optimization (DSPy, TextGrad) and self-improving prompts generated by a meta-LLM. However, human intuition about failure modes still outperforms automated search for safety-critical applications.
## Related Terms
- [[glossary/system-prompt|System Prompt]] — the top-level instruction block prepended to every conversation turn - [[glossary/few-shot-prompting|Few-Shot Prompting]] — the technique of including worked examples in the prompt to steer model behaviour - [[glossary/chain-of-thought|Chain of Thought]] — the prompting technique that asks the model to reason step-by-step before answering - [[glossary/react-prompting|ReAct Prompting]] — the Reasoning + Acting prompt pattern that interleaves thought and tool-call steps - [[courses/claude-tool-use-from-zero|Course: Claude Tool Use from Zero]] — hands-on practice with the concepts covered in this entry