Free self-study · No account needed · Progress stays in this browser. Back it up before clearing site data or changing devices.

← All weeks

LLM Engineering / Week 08

Persistent Memory

Build a grounded assistant with persistent memory. Extend the knowledge base with scoped memory records, correction, deletion, and restart continuity.

Your lessons

  1. 01

    Designing memory records

    60 minutes planned · 7 sections
    Start →
  2. 02

    Correcting and forgetting stored information

    60 minutes planned · 7 sections
    Start →
  3. 03

    Testing a knowledge assistant with memory

    60 minutes planned · 7 sections
    Start →

// Put it into practice

A grounded assistant with persistent memory

  1. Download week08.py from a lesson's practice section. Follow its setup instructions before running it.
  2. Lesson 1: Implement create, read, update, and delete operations for scoped event and preference records.
  3. Lesson 2: Correct an address during simulated concurrent writes, then delete it from the active store and derived index.
  4. Lesson 3: Integrate the Week 7 search service with memory and run a twenty-question evaluation.
  5. Run the supplied assertions and record actual results; a simulated contract check does not certify real model quality.
Download week 8 Python lab ↓

Read the script’s setup instructions and run it on your own computer. The website does not execute code or verify your results.

// Independent work

W08-LAB

Week 8: A grounded assistant with persistent memory

Extend the knowledge base with scoped memory records, correction, deletion, and restart continuity.

Extend the guided artifact rather than start a second project. At least 17 of 20 held-out answers meet the fixed correct-or-appropriate-abstention rubric; report support and authorization failures separately.

What to produce

  • A grounded assistant with persistent memory
  • Setup commands, data or generation procedure, versions, and recorded outputs
  • Acceptance results and a precise limitation

Check your work

  • At least 17 of 20 held-out answers meet the fixed correct-or-appropriate-abstention rubric; report support and authorization failures separately.
  • Each claimed execution is supported by actual saved output.
  • Fixture results and real model results are identified separately.
  • Setup and reproduction use the taught tools without private credentials.
Self-assessment rubric
Technical correctness · 35 points
Implementation or analysis follows the relevant technical mechanism and handles the stated case.
Evaluation and evidence · 30 points
Reproducible tests, appropriate baseline, and accurate interpretation.
Engineering quality · 20 points
Clear structure, safe boundaries, and usable reproduction instructions.
Explanation and reflection · 15 points
Explains tradeoffs, limitations, and next experiment with evidence.

// Phase milestone

M02

Grounded Knowledge Assistant

Build a knowledge assistant with RAG and persistent memory.

Target at least 85% correct-or-appropriately-abstaining on 20 held-out questions with source grounding; report the denominator and scoring method.

What to produce

  • Local indexed corpus and retrieval implementation
  • Persistent memory CRUD with provenance and deletion
  • Results on 20 held-out questions, including abstentions and source citations

Check your work

  • Target at least 85% correct-or-appropriately-abstaining on 20 held-out questions with source grounding; report the denominator and scoring method.
  • Setup and reproduction steps are complete.
  • Known limitations are explicit; no unsupported security or quality claims.
Self-assessment rubric
Functional integration · 30 points
Required components work together in a reproducible end-to-end workflow.
Security and reliability · 25 points
Boundaries, failure handling, and recovery are demonstrated with evidence.
Evaluation evidence · 25 points
Appropriate test set, clear measures, honest interpretation, and traceability.
Documentation and explanation · 20 points
Architecture, setup, tradeoffs, and limitations are understandable.

// Retrieve before you reread

Week 8 knowledge check

Try all 6 questions. Check your answers, review the explanations, and retry whenever you like. Answers are checked on this device.

1. Nora says “For this customer email, use a warm tone.” Which reusable-memory representation is justified?
2. A preference survives closing and reopening its database, but another user can also retrieve it. What does the result show?
3. Two writers read version 8. The first commits version 9. The second submits expected version 8. Which result preserves the correction?
4. A deleted preference is absent from its source table but still returned from a summary cache. What must be repaired?
5. A memory assistant passes 19 of 20 cases but discloses one other-owner address. How should acceptance handle this?
6. A twenty-case integration suite uses scripted answers and never calls a model. Which claim is supported by a full pass?

Next: week 9 →