The cafe changed its soup recipe this morning. Retraining a whole model is not the sensible first step for answering a question about the new note. We can find the note and supply it with the question.
Make notes findable
Retrieval finds information from a collection for a particular request. It is the difference between searching the recipe drawer and guessing what might be inside it.
A chunk is a portion of a document prepared as a retrieval unit. A long recipe book might be divided into recipe sections. Splitting in the middle of “do not add salt” could remove a crucial qualification, so boundaries should preserve useful meaning.
An index is a data structure organized to help locate items efficiently. A recipe-card catalog is an everyday analogy. An index can store words, vectors, identifiers, and metadata such as dates or access restrictions. It needs updating when its underlying notes change.
Several ways to look
Keyword search finds and ranks items using words and other textual matching signals. It is useful when the exact recipe code or ingredient name matters.
Vector search finds items whose embeddings are close to a query embedding under a chosen similarity measure. A question about a midday meal may match a lunch note without using the same words. It can also return something related but irrelevant to the actual question.
Hybrid search combines textual and vector retrieval signals. It is like looking both at the card's exact label and at nearby related cards. The combination needs testing; adding another retrieval method does not guarantee better results.
Ranking orders candidates by estimated usefulness. A second-stage reranker can examine an initial shortlist more closely. Being ranked first means a system scored the note highly, not that someone certified its contents.
- Keyword routeFind exact ingredient names or recipe codes.
- Vector routeFind related meanings in a compatible embedding space.
- Combine and rankA hybrid system merges signals and orders candidates for inspection.
Put evidence beside the question
Retrieval-augmented generation, or RAG, retrieves information and supplies it to a model to help generate an answer. In our example: find the current recipe, include the relevant passage, and ask the assistant to explain what the note says.
Grounding connects an answer to supplied evidence or observed information. It gives the assistant something specific to base the answer on. We still check whether the answer follows the note and whether the note is authoritative for this cafe.
A newer document can contain a mistake. An older note might apply to a different branch. Two notes might conflict. Retrieval does not settle these questions automatically, and it does not change the model's weights.
If the authorized collection contains no answer, the useful result may be “I could not find that in the current notes.” The application should not fill missing evidence with invented certainty.
A drawer is different from the worktop
Memory, in this guide, means information an application retains for later use. Persistence means storing information so it survives the current interaction or process. A saved preference or recipe file may persist; that does not mean it is automatically present in the next model call.
Context assembly selects and arranges what to include in an invocation. The drawer holds many notes; the worktop holds the ones needed now. Bring over authorized, relevant notes, not the entire archive.
Compaction shortens retained context, often by summarizing earlier work or removing redundant material. A handover note can preserve the current goal without every repeated exchange. But a summary may omit a crucial exception. Preserve important constraints and links to original records that can be retrieved again.
Memory records need ownership, access control, correction, and deletion rules. Saving a mistaken answer as a “fact” can make the same mistake recur.
The recipe changes. What might need updating?
The source note and its search index, including affected chunks or embeddings. A new model-training run is not inherently required. Check cached answers too, and make sure the assistant receives the updated evidence.