Files
myWiki/concepts/progressive-disclosure.md

41 lines
1.8 KiB
Markdown
Raw Permalink 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: "渐进式披露 (Progressive Disclosure)"
created: 2026-07-04
updated: 2026-07-04
type: concept
tags: [agent, interface, interaction, token-efficiency, ui-pattern]
sources: ["https://nokv.io/blog/agents-want-filesystems"]
---
# 渐进式披露 (Progressive Disclosure)
Agent 接口设计中的一种交互模式:先低成本发现(了解有什么),再按需读取(打开需要的部分),搜索可限定范围,路径作为稳定句柄。
## 四步模式
1. **低成本发现**`ls` 看结构 → `stat` 看元数据 → `catalog` 看可查询字段
2. **按需读取**:只有找到目标后才 `read` 打开内容(而非全部预加载)
3. **范围限定搜索**:全局 `grep` 用来发现线索,目录内 `grep` 用来提取证据
4. **稳定句柄**`/runs/abc/stdout.log` — 既是语义名称也是后续操作的地址
## 与 SQL 的对比
SQL 更像是要求 Agent **先理解一张地图,再一次性写出正确路线**。对结构化聚合很强;对「先找 cohort → 再查日志 → 再引用证据」的复合探索,前置认知成本更高。
## 在 Agent 上下文经济中的价值
Progressive disclosure 直接降低 Agent 的 token 消耗和 [[attention-drifting|注意力偏移]] 风险:每一步只看到更少但更相关的信息,不把无关内容拖入上下文。
## 外部佐证
- Anthropic MCP code execution工具呈现为 TypeScript 文件树 → 150k → 2k token
- OpenAI tool search建议延迟加载工具组织到 namespace/MCP server
- 人类工程师 debugging 的自然流程:也是 progressive disclosure
## 参考
- [[agent-workspace-filesystem|Agent 工作空间文件系统]]
- [[agent-interface-design|Agent 接口设计]]
- [[token-efficiency|Token 效率]]
- [[attention-drifting|注意力偏移]]