Files
myWiki/concepts/verbatim-pre-recall.md

37 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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 expansionLLM paraphrase反而降低性能——BM25 已捕获精确 tokendense 已捕获语义改写,额外 LLM 改写层引入噪音。
## 参考
- [[atlas-agent-memory-architecture-2026]]
- [[hybrid-recall-pipeline]]
- [[bm25-financial-retrieval]]