Prompt Engineering and Context Engineering
In this article
- Read the trace of a request that produced a wrong reply and say whether its instruction, its information or both are at fault.
- Explain why rewording cannot fix a missing or out-of-date fact, and why adding information cannot settle a decision the instruction left open.
- Test a fix by changing one layer and rerunning saved questions that have confirmed answers.
- Terms defined here: prompt engineering, context engineering.
Overview
A reply comes back wrong, and the first move is to reword the prompt, the text sent to the model: add a rule, make it firmer. Sometimes the next reply is right. Sometimes it stays wrong however firmly the prompt is worded, because the model never had the fact the answer needed.
Brightline is an invented home-internet provider. Its support assistant is a chat assistant on Brightline's website that can run three tools, programs the application runs when the model asks for one: lookup_order, issue_refund and search_help, which returns Brightline help pages. For each reply the application sends the model a request, the text and data for that reply. By the end you can tell from the record of a request whether its instruction or its information is at fault, and test one fix at a time.
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
- Which layer failed
- When the instruction is clear and the fact is wrong
- Testing one change
- Sources
- Check yourself, 5 questions