Glossary
What is Context assembly?
Verified 21 September 2026
The step between retrieval and generation, and the one that most determines answer quality. Deduplicate, assess trust, rank, and cut to budget — usually implemented as bespoke application code that nobody revisits.
Doing it server-side lets the engine use signals the application does not have, such as corroboration counts across rejected duplicates. Attaching a reason to each included passage makes the selection explainable, which matters when an answer has to be defended.
How unlob handles this: assemble_context
Common questions
What is Context assembly?
Context assembly selects, orders and truncates retrieved passages to fit a token budget before they enter a model’s context.
How does Context assembly work in practice?
Doing it server-side lets the engine use signals the application does not have, such as corroboration counts across rejected duplicates. Attaching a reason to each included passage makes the selection explainable, which matters when an answer has to be defended.
See it working
The free tier is 10,000 credits a month with no card — enough to test any of this against your own queries.