Learning outcomes
- Structure task instructions
- Use examples deliberately
- Remove ambiguous constraints
Mental model
A prompt is an executable specification for a probabilistic component: goal, context, constraints, examples, and an observable output contract.
Theory
Strong prompts make the task and success conditions concrete, separate instructions from data, provide only useful examples, state how uncertainty should be handled, and request an output the application can validate. Prompt quality is evaluated on a case set; wording changes are code changes with possible regressions.
Alternatives and trade-offs
Prompting is best for instruction and presentation changes. Retrieval supplies external knowledge, tools provide actions or deterministic computation, and fine-tuning targets stable learned behavior.
Failure modes and misconceptions
Longer is not automatically clearer, role-play does not grant capability, hidden reasoning is not a reliable audit trail, and an example set can bias unexpected cases.
Knowledge check
Which parts of a prompt make its success measurable?
Decision scenario
Rewrite a vague summarization request as an audience, evidence, length, uncertainty, and citation contract, then test it against representative documents.
Relationships
Message Roles and Instruction Priority
Structured prompts depend on clear instruction placement.
prerequisiteStructured Outputs
Output contracts extend precise task and response instructions.
relatedRAG versus Fine-Tuning
Prompting is one strategy in a broader adaptation decision.
Primary sources
- Prompt Engineering - OpenAI, verified 2026-07-16