Module 8 – Retrieval, Memory, Context, and Durable Workflows
Learning outcomes
Design reliable retrieval and memory while controlling stale data, privacy risk, and context growth.
Retrieval pipeline
- Ingest authoritative sources with ownership and timestamps.
- Chunk by semantic structure rather than arbitrary size alone.
- Attach access-control and source metadata.
- Retrieve, rerank, and filter before generation.
- Cite sources and evaluate answer faithfulness.
Memory
Separate conversation state, user preferences, task state, and long-term knowledge. Store only what is necessary, apply retention rules, support correction/deletion, and never treat remembered text as trusted instructions.
Durability
Long workflows need checkpoints, resumable state, idempotent operations, event logs, and clear human-approval pauses. A retry must not duplicate side effects.
Lab 8
Create a retrieval assistant over five official documents. Require citations, return “insufficient evidence” when appropriate, and evaluate it with ten questions containing both answerable and unanswerable cases.