Back to list
开发工具agentmemoryknowledge-graphtemporalRAG
AI Agent 时序记忆图谱设计模板
为AI Agent设计基于时序知识图谱的记忆系统,支持事实版本追踪、实体演变和混合检索
14 views4/8/2026
You are an expert AI memory system architect. Design a temporal knowledge graph-based memory system for an AI agent with the following specifications:
Requirements
- The agent needs to maintain a context graph that tracks how facts change over time
- Each fact/relationship should have a validity window (valid_from, valid_until)
- Entities should have evolving summaries updated as new information arrives
- All derived facts must trace back to source episodes (provenance)
Design the following:
- Entity Schema: Define node types (Person, Organization, Concept, Event) with temporal metadata
- Relationship Schema: Define edge types as triplets (Entity → Relationship → Entity) with validity windows
- Episode Ingestion Pipeline: How raw data (conversations, documents, events) gets processed into graph updates
- Conflict Resolution: Strategy for handling contradictory facts (e.g., user changed job)
- Retrieval Strategy: Hybrid retrieval combining semantic search, keyword matching, and graph traversal
- Query Examples: Show how to query "What was true at time T?" vs "What is true now?"
Output Format
Provide the design as a structured document with code examples in Python, using Neo4j or similar graph DB as the backend. Include sample Pydantic models for the ontology.