Files
myWiki/concepts/history-aware-routing.md

49 lines
1.5 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: "历史感知路由 — History-Aware Routing"
created: 2026-06-19
updated: 2026-06-19
type: concept
tags: [history-aware, routing, tool-selection, llm-agents]
sources:
- https://arxiv.org/abs/2601.08276
---
# 历史感知路由History-Aware Routing
## 定义
历史感知路由是 ACE-Router 的核心范式:路由决策不仅依赖当前查询,还**显式使用多轮对话历史**——包括中间结果、历史性能和工具相关性——来做上下文感知的精确选择。
## 为什么需要历史感知
传统 embedding 检索的三大局限:
1. **语义重叠**:功能相似的工具在向量空间中难以区分
2. **忽略历史**:只匹配当前查询,丢失了执行进度、失败历史等关键状态
3. **压缩失真**:即使编码历史,固定向量会压缩复杂状态信息
## 形式化
```
c* = arg max π_θ(c | Q, H, C)
```
- Q当前查询
- H对话历史多轮轨迹
- C候选空间工具集或 Agent 集)
- π_θ训练的路由器
## ACE-Router 的实现方式
从多 Agent 模拟轨迹中提取监督信号:标记每步实际调用的候选 c 作为 ground-truth label之前的所有交互作为历史 H。将复杂多步轨迹转化为大规模历史感知路由训练数据。
## 效果
ACE-Router 显式使用历史的模型在 MCP-Universe 上达到 53.4%而相同基座Qwen3-8B仅用查询只有 48.5%——历史感知带来约 5pp 的提升。
## 参考
- [[ace-router|ACE-Router]]
- [[yao-ace-router-2026|论文]]
- [[trajectory-synthesis|轨迹合成]]