Cheat sheet · Module 7

Cheat sheet: Context, memory and multi-agent systems

Generative AI · Cheat sheet · Context, memory and multi-agent systems

Open the moduleModule quiz

Quick answers

  • Context engineering: write, select, compress, isolate. Put stable content first for prompt caching; a change at one level invalidates everything after it.
  • Memory: working, episodic, semantic, procedural. For each, define write, recall (similarity plus recency and importance), forget and privacy. Recalled memory is untrusted data.
  • Context failures (course taxonomy): overflow (tokens per step), distraction (accuracy with and without extra context), drift (probe after compaction), tool-output bloat (share of tokens from tool results).
  • Agent design: simplest first (single call, workflow, agent, then multi-agent). Patterns: chain, route, parallelise, orchestrator-workers, evaluator-optimizer. Errors compound as p to the power n.
  • Agent evals: grade by final state, add trajectory metrics, run each task k times. pass@k is any success, pass^k is all successes; one-shot agents need pass^k. Add budgets, traces, a kill switch and approvals.