Prompt Engineering and Context Engineering
In this article
- Read the trace of a request that produced a wrong reply and label the failure instruction, context or both.
- Explain why rewording cannot supply a missing or out-of-date fact, and why more information cannot settle a decision the instruction left open.
- Test a fix by changing one layer and rerunning saved questions that have expected answers.
- Terms defined here: prompt engineering, context engineering.
Overview
A reply comes back wrong, and the first reflex is to reword the prompt: add a rule, write it in capitals, say "accuracy matters". Sometimes that works. Sometimes the reply stays wrong after five rewrites, because no wording can hand the model a fact it was never given.
Brightline, the invented home-internet provider, runs a support assistant: a chat assistant on its website with three tools, lookup_order, issue_refund and search_help, which returns Brightline help pages. Its customers, orders, pages and replies below are all made up.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Two layers of one request
- Telling the layers apart
- What the context layer can change
- Failures that need both layers
- Testing one change
- Common mistakes
- Sources
- Check yourself, 5 questions