What is Prompt Engineering?
The practice of structuring instructions, context, and examples to reliably steer large language model outputs.
Definition
Prompt engineering treats the model's input as a designed interface: system prompts establish role and constraints, few-shot examples demonstrate the expected format, delimiters separate untrusted data from instructions, and chain-of-thought phrasing elicits stepwise reasoning. Structured-output modes (JSON schemas, function calling) turn free text into parseable contracts. Serious teams version prompts like code, run evaluation suites (promptfoo, LangSmith, Braintrust) against regression cases, and A/B test variants, because model upgrades silently shift behavior. Prompt injection—adversarial instructions hidden in retrieved content—is the corresponding security concern, shaping how untrusted input gets quoted and sandboxed.

