Memory, RAG, CAG, and Fine-Tuning
Memory, RAG, CAG, and Fine-Tuning
Fact-check status
Key jargon
| Term | Plain-language meaning |
|---|---|
| Working memory | Short-lived state used during the current task or conversation. S1 |
| Long-term memory | Selected information persisted for future interactions. S1 |
| Cache-augmented generation (CAG) | Reusing preloaded or cached context rather than retrieving it for every request. S1 |
| Fine-tuning | Updating model parameters using additional training examples. S1 |
Key concepts
- Choose storage by change rate and purpose: state for current work, retrieval for attributable changing knowledge, cache for repeated context, and fine-tuning for learned behavior. S1
- Persisting everything as memory creates privacy, relevance, and poisoning risks. S1
Concept map
flowchart LR
A["Classify information need"] --> B["Choose state memory retrieval cache or tuning"]
B --> C["Apply retention and trust rules"]
C --> D["Evaluate behavior"]Diagram semantics verified against S1 and S2 on 2026-09-02.
| Need | Prefer S1 |
|---|---|
| Current authoritative facts | Retrieval/RAG S1 |
| Small stable reference corpus reused frequently | Cached context/CAG where supported S1 |
| User preference or workflow state | Explicit application memory/state store S1 |
| Consistent style, format, or task behavior | Prompting first; fine-tuning if evals justify it S1 |
| New domain vocabulary or behavior at scale | Task-specific fine-tuning with held-out evals S1 |
| Deterministic business rule | Code/policy engine S1 |
Fine-tuning does not provide reliable record-level lookup, easy deletion, current citations, or permission filtering. RAG does not change the model’s underlying behavior. Memory should not silently turn every conversation into permanent user profiling. S1
Exercise
Classify ten requirements as prompt, retrieval, memory, fine-tuning, or deterministic code. Defend each choice using freshness, privacy, update, and evaluation needs.