FREE LLMs & agents LESSON · LLMs & agents

Build grounded context

Retrieval, memory, provenance, and injection boundaries

Grounding is an evidence pipeline, not a larger prompt.

A retrieval system interprets the request, searches one or more indexes, ranks candidates, assembles bounded context, and asks the model to use evidence with provenance. Quality can fail at recall, ranking, chunk boundaries, freshness, authorization, synthesis, or citation. Evaluation must localize the stage instead of calling every wrong answer a hallucination.

The answer cannot be more trustworthy than the evidence selection and permission boundary that produced its context.

Memory can preserve poison as efficiently as truth.

Conversation summaries, user profiles, vector stores, and tool histories can carry stale claims, private data, or injected instructions into future sessions. Separate facts from instructions, attach source and expiry, scope memory by identity and purpose, and make writes auditable. Retrieval-time authorization must filter before content reaches the model.

Persistent context needs provenance, permission, and deletion semantics.
Practise this lesson free →