Memory Retrieval and RAG
In this article
- Sort a retrieval-backed feature into agent memory, RAG, a state lookup or a hybrid by who owns the data and how long it lives.
- Explain why using embeddings does not make a feature RAG.
- Build one request from a help page and a memory record, with a label on each block that says where it came from.
- Say what a deletion removes on each side, and why shared policy must not be copied into per-customer memory.
- Terms defined here: memory retrieval.
Overview
In a design review of a support assistant, everything that searches a database gets called "RAG": the help-page search (RAG proper, where the assistant looks up shared documents and adds them to the request), the lookup of what a customer said last month (memory, what it stored about one customer), even the check on an order's refund. The name hides three things with different owners, lifetimes and deletion rules.
A customer asks, in Spanish, whether they can still return a router. Two stored things feed the answer, and only one of them should decide it. You will sort any feature that looks something up into memory, RAG, a state lookup or a hybrid, build one request where each block says where it came from, and spot the design that copies shared policy into every customer's memory.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Same search, different owners
- Three kinds of lookup
- One request, two labelled blocks
- What deletion removes
- A policy copied into memory
- Classifying a feature
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions