Files
myWiki/concepts/iterative-capability-extension.md

64 lines
2.0 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: "迭代能力扩展 — Iterative Capability Extension"
created: 2026-06-19
updated: 2026-06-19
type: concept
tags: [tool-discovery, iterative, toolchain, mcp-zero, multi-turn]
sources:
- https://arxiv.org/abs/2506.01056
---
# 迭代能力扩展Iterative Capability Extension
## 定义
Iterative Capability Extension 是 MCP-Zero 的多轮工具发现机制Agent 在任务执行过程中**逐步发现和集成工具**,动态构建跨域 toolchain而非一次性预加载全部工具。
## 工作流
```
Task: "Debug my code: src/train.py"
├── 第 1 轮:识别需要读文件 → Request: filesystem.read_file
│ └→ 获取代码内容
├── 第 2 轮:识别需要编辑 → Request: filesystem.edit_file
│ └→ 修改代码
├── 第 3 轮:识别需要执行 → Request: terminal.run_cmd
│ └→ 验证修复
└── 完成
```
每轮仅加载当前需要的工具,而非预先加载 filesystem + code_editor + terminal 的全部 schema。
## 与传统方案的对比
| | 一次性注入 | 检索增强(单轮) | 迭代扩展 |
|---|---|---|---|
| 工具数量 | 全部在 context | 首轮检索 | 按需逐轮 |
| 跨域 | 昂贵(全部预加载) | 受限(基于初始查询) | 天然支持 |
| 容错 | 无 | 检索失败=任务失败 | 可优化请求重试 |
## 容错与自纠正
如果返回的工具不足或不合适Agent 可以:
1. **优化请求**:重新描述需要什么
2. **重新检索**:触发新一轮匹配
3. **降级**:当确认无合适工具时,退回模型参数知识
## 理论依据
迭代扩展对应信息增益的累积:
```
I_total = Σ I(T*_i; r_i | s_{t_i})
```
每轮请求 r_i 针对当前子任务状态 s_{t_i} 最大化信息增益——而非一次性从初始查询推断全部需求。
## 参考
- [[active-tool-discovery|主动工具发现]]
- [[active-tool-request|Active Tool Request]]
- [[hierarchical-semantic-routing|层次语义路由]]
- [[fei-mcp-zero-2025|MCP-Zero 论文]]