Prompt Engineering
Designing and testing instructions for a model
What is Prompt Engineering?
Prompt engineering is the practice of specifying a task, relevant context, constraints, and desired output, then checking the result. More instructions help only when they resolve an actual ambiguity or requirement. Prompts do not replace missing evidence.
How it works
Read the diagram
- Task
- Evidence
- Constraints
- Evaluation
Key takeaways
-
Provide task, evidence, constraints, and output requirements.
-
Test prompts on failure cases as well as easy examples.
Illustrative example
Illustrative revision: replace “Summarize this” with “Using only the attached policy, list refund deadlines and cite each clause. Mark absent details as unknown.” Test with a policy that omits one deadline.
Evaluate the output against acceptance criteria
A useful check asks whether the answer followed the source, covered required fields, and handled missing information. Examples can demonstrate a format but can also bias responses toward irrelevant patterns. If the task needs current records or calculations, provide a retrieval or computation tool and validate its result rather than adding more role instructions.