Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Why Feeding Full Dependency Files to Your Coding Agent Hurts Accuracy: Full Source vs. Tree-sitter Interface Skeletons

说明与用途

向 AI 代码代理提供完整依赖源代码会因注意力稀释而降低准确性。使用 Tree‑sitter 接口骨架(仅包含签名和合同)可实现 100% 测试通过率,令输入令牌减少 94.9%,执行速度提升 57%。

问题

Providing an AI coding agent with the entire source code of all imported dependencies when editing a module reduces accuracy due to attention dilution.

结果

Tree‑sitter skeleton context achieved a 100% pass rate, 0 contract traps, 1 LLM call, 57.2% faster execution, and 82.6% lower API cost compared to full dependency context.

工作流

  • Load full dependency dump (Mode A)
  • Stage dependency patch (Mode A)
  • Submit skeleton guided bundle (Mode A)
  • Read AST interface skeleton (Mode B)
  • Submit all modules (Mode B)

证据

Passing only the Tree‑sitter Interface Skeleton (2,316 input tokens) enabled a 1‑turn 20 / 20 (100%) pass on the hidden test suite.

来源

Mode A's full dependency dump consumed 45,270 input tokens across 3 turns and stalled at 17 / 20 (85.0%) due to attention dilution.

来源

Mode B cut cumulative input tokens by -94.9% (19.55x reduction), API cost by -82.6% ($0.0446 ➔ $0.0078), and execution time by -57.2% (2.34x faster).

来源

  • 记录日期: 2026-11-01T02:29:04.013Z