{"id": "TTC-118", "slug": "context-retrieval-memory-and-fine-tuning", "title": "Context, retrieval, visible memory, and model-weight fine-tuning", "level": "advanced", "summary": "Context is what the model can use now; retrieval selects external material into that context; visible memory is persistent owner-controlled information; fine-tuning changes model parameters through training.", "learning_outcome": "Choose among context, retrieval, visible memory, and fine-tuning for a problem and justify the choice using persistence, provenance, freshness, and evaluation needs.", "explanation": "These mechanisms solve different problems. Put task instructions and necessary facts in current context. Use retrieval when a larger, changing, attributable collection must be searched and selected for each task. Store a reviewed preference, rule, correction, or history as visible memory, then deliberately retrieve or load it when relevant. Consider fine-tuning only when a representative dataset and evaluation justify changing recurring behavior in a separately versioned model or adapter. Retrieval can return wrong passages; memory can be stale; context can omit key material; fine-tuning does not provide a reliable factual database. Uploading documents, chatting, or editing files does not by itself fine-tune model weights.", "worked_example": "Fictional case: a museum's one-time exhibit question uses context; its changing catalog uses retrieval with citations; an approved house-style correction becomes visible memory; a proposal to fine-tune tone is deferred until enough licensed examples and held-out tests exist. None of the first three changes model weights.", "exercise": "Sort eight fictional needs into context, retrieval, visible memory, fine-tuning, or a combination. Include a current policy, one-time calculation, durable preference, style behavior, deletion request, conflicting source, frequently changing fact, and rare edge case. State persistence, update, provenance, and test plan for each.", "success_criteria": ["Each choice correctly states where information lives and how it reaches the model for a response.", "The learner explicitly states that files, retrieval, and visible memory do not themselves update model weights.", "The design includes freshness, deletion or replacement, provenance, and evaluation appropriate to the mechanism."], "limitations": ["Real systems combine mechanisms and may use product-specific terms; inspect actual architecture and provider behavior.", "Fine-tuning can change behavior unpredictably and retrieval quality depends on indexing, query, permissions, and source quality."], "prerequisites": ["TTC-101", "TTC-109", "TTC-111"], "next_lessons": ["TTC-119", "TTC-120"], "copyable_material": "# TTC-118 \u2014 Context, retrieval, visible memory, and model-weight fine-tuning\nObjective: Use the mechanism that matches the task's freshness, persistence, provenance, and behavior needs.\nProcedure: Use context for now, retrieval to select from external knowledge, visible memory for inspectable durable records, and fine-tuning only for evaluated parameter training.\nRequired evidence: Document storage location, selection path, source, version, update or deletion method, and mechanism-specific tests.\nBoundaries: Never claim that chats, uploads, retrieval, or memory changed model weights; no mechanism guarantees truth.\nCompletion test: A reviewer can trace what persisted, what entered this context, and whether any identified trained model changed.\nReview rule: Treat generated work as a draft until the named human reviewer accepts it.", "sources": [{"title": "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks", "publisher": "Neural Information Processing Systems Foundation", "url": "https://proceedings.neurips.cc/paper/2020/hash/6b493230205f780e1bc26945df7481e5-Abstract.html"}, {"title": "Parameter-Efficient Transfer Learning for NLP", "publisher": "Proceedings of Machine Learning Research", "url": "https://proceedings.mlr.press/v97/houlsby19a.html"}, {"title": "Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile", "publisher": "National Institute of Standards and Technology", "url": "https://www.nist.gov/publications/artificial-intelligence-risk-management-framework-generative-artificial-intelligence"}], "version": "1.0.0", "reviewed_on": "2026-10-03", "review_status": "reviewed", "next_review_criteria": "Provider behavior, product architecture, or terminology changes any mechanism's truthful persistence or update path.; A cited primary source is materially revised, replaced, or becomes unavailable.; Repeated learner results show that the exercise or success criteria are ambiguous.", "canonical_aliases": ["/agent-memory/"], "canonical_url": "https://teachthecompany.com/school/context-retrieval-memory-and-fine-tuning/"}