--- title: "Verbatim Pre-Recall" created: 2026-06-24 updated: 2026-06-24 type: concept tags: ["information-retrieval", "agent-design", "bm25", "query-processing"] sources: - "[[atlas-agent-memory-architecture-2026]]" --- # Verbatim Pre-Recall Verbatim Pre-Recall 是 Atlas 记忆系统的关键设计:在 LLM 看到用户消息之前,先用用户原话(一字不改)跑一次检索。这是保障 BM25 词法腿价值的关键。 ## 问题 LLM 在调用 recall_memory 前会将精确查询泛化: - "postgres v15.3 + pgvector 0.5.1" → "PostgreSQL 数据库" - 版本号、扩展名、错误码全部丢失 - BM25 匹配不到精确 token → 词法腿报废 ## 方案 在 `messages.append(user_msg)` 和 LLM 调用之间插入: 1. 用 `user_message` 原串调用 recall_memory 2. 结果以合成 assistant tool_call 注入对话历史 3. LLM 后续调用时同时看到用户消息和 pre-recall 结果 ## 为什么重要 Ablation 证实 query expansion(LLM paraphrase)反而降低性能——BM25 已捕获精确 token,dense 已捕获语义改写,额外 LLM 改写层引入噪音。 ## 参考 - [[atlas-agent-memory-architecture-2026]] - [[hybrid-recall-pipeline]] - [[bm25-financial-retrieval]]