Just-in-Time Context
In this article
- Sort each item a request could carry into always-loaded, just-in-time or excluded, and give the reason.
- Say what triggers a load, and record with each loaded item where it came from and when.
- Decide when a loaded copy must be reloaded before a step, and when it can leave the request as a pointer.
- Write the fallback for a load that fails, so the reply says so instead of guessing.
- Terms defined here: just-in-time context.
Overview
At the start of a support chat, the application loads the customer's order record and a batch of help pages into the request, the text and data the model gets for one reply. Forty minutes later the customer says the parcel arrived damaged, and the reply says it is still on its way: the record in the request says in transit, while the order system changed it to delivered twenty minutes ago.
Brightline is an invented home-internet provider. Its support assistant, a chat assistant on Brightline's website, 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. By the end you can decide which items go with every request, which load only when a step of the task needs them and which stay out, and keep each loaded item current.
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
- Three classes of item
- Loading when a step needs it
- Refresh before acting
- Eviction and fallback
- One policy per item
- Common mistakes
- In production
- Sources
- Check yourself, 5 questions