# Prompt Engineering **Prompt engineering** is the practice of crafting inputs to AI models to elicit desired outputs — the skill of asking the right question in the right way. Because [[Large Language Model]] are sensitive to how requests are phrased, structured, and contextualized, the difference between a mediocre and an excellent prompt can be the difference between a useless and a transformative result. The field emerged with the rise of GPT-3 (2020), which demonstrated that the same model could perform wildly different tasks depending on how it was prompted. A model that gives a vague answer to "summarize this" might produce a precise, structured analysis when prompted with "You are an expert analyst. Provide a structured summary with key findings, methodology concerns, and implications, organized under clear headers." ## Key Techniques **System prompts:** Instructions that define the model's role, constraints, and behavioral guidelines before the user's query. System prompts are where developers encode personas, safety rules, output formats, and domain expertise. They are the invisible architecture behind every AI product. **Few-shot prompting:** Providing examples of desired input-output pairs in the prompt itself, so the model learns the pattern and continues it. "Q: What is 2+2? A: 4. Q: What is 3+5? A: 8. Q: What is 7×3? A:" — the model infers the pattern and completes it. **Chain-of-thought:** Instructing the model to "think step by step" or "show your reasoning" before giving a final answer. This technique dramatically improves performance on mathematical, logical, and analytical tasks by encouraging the model to decompose complex problems rather than jumping to answers. **Structured output:** Requesting responses in specific formats (JSON, XML, tables, bullet points) to ensure the output is machine-parseable or consistently formatted. Critical for integration into automated workflows. ## The Evolving Role Prompt engineering has an uncertain future as a discipline. As models become more capable and better at understanding intent, the need for elaborate prompt construction diminishes — a trend sometimes called "the death of prompt engineering." Models increasingly handle ambiguous or poorly structured requests competently. At the same time, prompt engineering is evolving into **prompt programming** — building complex multi-step agent systems where the prompt is essentially a program that orchestrates the model's behavior across tools, APIs, and decision trees. This higher-level prompt engineering is becoming more important even as basic prompting becomes less critical. The field also has a labor dimension: prompt engineering was briefly one of the highest-paying non-technical roles in AI (advertised at $300K+ in 2023), reflecting both the skill's genuine value and the hype cycle around it. As models improve and the skill becomes more accessible, the premium has compressed. ## KB Significance 1. **The user-side power lever.** Prompt engineering is the primary mechanism through which users extract value from AI systems. Understanding prompting is the difference between AI as a novelty and AI as a productivity multiplier — directly relevant to the KB's documentation of how AI tools are actually used in practice. 2. **The safety surface.** Prompt engineering is also the surface through which [[Jailbreaking]] attacks operate — exploiting the model's sensitivity to prompt structure to bypass safety restrictions. The same technique that makes models more useful also makes them more exploitable. ## See Also - [[Large Language Model]] — The systems being prompted - [[Context Window]] — The constraint prompts operate within - [[Jailbreaking]] — The adversarial use of prompting - [[Fine-Tuning]] — The alternative to prompting for behavior modification