Memory · Software component
Memory Retriever
Software componentMemoryCognition & Memoryarc:MemoryRetriever
A retrieval component that dispatches a memory query to the memory type suited to it and returns filtered results.
Responsibility. Retrieves relevant memories from the store appropriate to the query type.
Also known as: Memory query router, Memory retrieval mechanism, Memory relevance filter, Episodic retrieval, Memory-augmented retrieval hook, Episodic-to-working retrieval, Semantic-to-working augmentation
Relationships
is configured by structural
invokes dependency
is invoked by dependency
reads dependency
sends data to dynamic
is constrained by control
is evaluated by assurance
Design guidance
- SHOULD route temporal/event queries to episodic storage and conceptual queries to semantic vector search.
- MAY query memory repeatedly until sufficient context is gathered.
- MUST filter retrieved memories for relevance; unfiltered memory retrieval can perform worse than no memory.
- SHOULD treat retrieval as a ranking problem over relevance, recency and importance rather than pure similarity search.
- SHOULD bound the number of retrieved memories by token budget and adapt it to available context.
- SHOULD filter by context metadata (segment, time window, system version) so lessons come from contextually matched episodes.
- SHOULD place only the most relevant episodes into working memory to avoid saturation.
- SHOULD prefer distilled semantic knowledge over episodic or document retrieval when it offers better value per token.
Quantitative guidance
As stated by the sources; verify before use.
- Removing relevance filtering dropped retrieval accuracy from 88.7% to 64.3% (research on cognitive memory systems); typically 20-30% performance drop (Ch3.7).
- Similarity threshold often 0.7-0.8 or top-k with k=3-10 (Ch5.7).
- Memory-augmented ReAct typically injects k=3-5 episodes (Ch5.7).
- Budget example: ~20% of window, 10K tokens / 300 tokens per episode ~30 max; 3-10 episodes optimal in practice; stop when similarity < 0.75 (Ch5.7).
- Twenty detailed episode summaries may consume ~30K tokens; summaries typically 200-500 tokens (Ch5.7).
Classification
- Patterns
- Similarity search with contextual filteringAgentic RAG (iterative retrieval)Query-type routingRetrieval-augmented reasoning (prior traces as scaffolding)Content-based retrievalTemporal (recency) retrievalContextual retrieval via metadata filtersCausal retrieval (filter by desired outcomes)Trajectory-level retrievalRelevance-threshold early stopHybrid relevance scoring: semantic similarity, temporal proximity, causal relevanceCompression of retrieved episodes to key facts, decisions and outcomes before injectionMemory integration for planning: retrieve, apply, store (Ref5.07)Graduated memory lookup
- Quality attributes
- Functional suitability: correctness and validity (ISO/IEC 25010 | NIST AI RMF: valid)Performance efficiency (ISO/IEC 25010)
- Risks mitigated
- Retrieval noiseIrrelevant context contaminationContext window overflowStale or misleading high-similarity episodes
Sources
- Ch1.4: T. Nguyen, "Memory and Perception Systems," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.4. ISBN: 9798244538229.
- Ch3.7: T. Nguyen, "Tool Usage Auditing," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.7. ISBN: 9798244538229.
- Ch3.10: T. Nguyen, "Efficiency Metrics," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.10. ISBN: 9798244538229.
- Ch4.1: T. Nguyen, "Introduction to AI Agent Deployment and Scaling," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 4.1. ISBN: 9798244538229.
- Ch5.1: T. Nguyen, "Chain-of-Thought (CoT) Fundamentals," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.1. ISBN: 9798244538229.
- Ch5.7: T. Nguyen, "Episodic Memory," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.7. ISBN: 9798244538229.
- Ch5.8: T. Nguyen, "Semantic Memory," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.8. ISBN: 9798244538229.
- Ch5.9: T. Nguyen, "Working Memory," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.9. ISBN: 9798244538229.
- Ch10.1: T. Nguyen, "Conversational UI," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 10.1. ISBN: 9798244538229.
- Ref5.04: C. Stryker, "What is AI agent memory?," IBM Think. Accessed: Sep. 27, 2026. [Online]. Available: https://www.ibm.com/think/topics/ai-agent-memory
- Ref5.05: Model Context Protocol, "Model Context Protocol servers," GitHub repository. Accessed: Sep. 27, 2026. [Online]. Available: https://github.com/modelcontextprotocol/servers
- Ref5.08: X. Huang et al., "Understanding the planning of LLM agents: A survey," arXiv:2402.02716, 2024.