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

  1. Ingest authoritative sources with ownership and timestamps.
  2. Chunk by semantic structure rather than arbitrary size alone.
  3. Attach access-control and source metadata.
  4. Retrieve, rerank, and filter before generation.
  5. 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.