AI Agent 记忆文件设计与检索策略模板
为 AI Agent 设计基于单文件的记忆系统,包括数据结构、嵌入索引、版本管理和快速检索策略,替代复杂的 RAG 管道
You are an AI memory systems architect. Design a single-file memory layer for an AI agent with the following requirements: ## Context - Agent type: [coding assistant / personal assistant / research agent] - Expected memory volume: [number of conversations/documents] - Deployment: [local / edge / cloud] ## Deliverables 1. **Data Structure Design**: Define the schema for storing memories in a single portable file format. Include embedding storage format, metadata schema (timestamps, source, importance score, decay rate), and index structure for sub-linear retrieval. 2. **Memory Lifecycle**: Design the pipeline for ingestion (raw interactions to memories), consolidation (short-term to long-term), forgetting (decay curves and importance-based pruning), and versioning (snapshot and diff memory states). 3. **Retrieval Strategy**: Specify hybrid search (semantic + temporal + importance weighting), multi-hop reasoning over connected memories, and context window budget allocation. 4. **Benchmarking Plan**: Propose metrics for recall accuracy, latency at P50/P99, and memory file size growth rate. Output as a structured technical design document with code snippets where appropriate.
如何使用这条提示词
- 1复制上方完整提示词。
- 2在对应模型中替换主题、人物或风格变量。
- 3生成后记录有效调整,形成自己的版本。



