Context Selection, Prioritization and Assembly
In this article
- Take the reply room and the tool-result room off a call's budget, then admit the items the call cannot go without.
- Explain why stale, superseded and duplicate candidates leave before any room is spent, even when room is left over.
- Order a request so the instructions, each labelled block of data and the customer's question sit in their own place.
- Write a manifest that gives a reason for every item in or out, and check it against the trace of the request that was sent.
Overview
Late in a support chat, the application is about to send its next request, the text and data a model gets for one reply. It holds more candidates than that request has room for in tokens, the small pieces of text a model counts: a refund procedure the model loaded, three help pages, recent and older turns (a turn is a customer message and its answer), a summary of the older ones, the order record, and an old copy of the order's status that disagrees with it.
Brightline, an invented home-internet provider, runs this support assistant, a chat assistant on its website. It can look up an order, issue a refund up to an approved limit and search help pages through three tools, programs the application runs when the model asks: lookup_order, issue_refund and search_help. With this many candidates competing for one request, how does the application build the call? Afterwards you can build it in one pass that places every item and says why each is in or out.
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
- Candidates and hard requirements
- The assembly pass
- Order and sections
- The manifest and the trace check
- Common mistakes
- Sources
- Check yourself, 5 questions