Show HN:使用这款 MCP/CLI 工具将 LLM 的 Token 使用量降低约 30%(已进行 Claude 基准测试)
1 分•作者: jahala•6 个月前
为人类和 AI 智能体设计的智能代码阅读工具。Tilth 将 ripgrep、tree-sitter 和 cat 的能力融于一体,协同工作。
--
v0.4.4:为调用者搜索添加了自适应的二阶影响分析——当一个函数有 ≤10 个独特的调用者时,tilth 会在一次扫描中自动追踪调用者的调用者。首次完整 26 任务 Opus 基线(之前仅有 5 个困难任务)。Haiku 采用率从 42% 提升至 78%,使 Haiku 从成本回归转变为 -38% $/正确。
v0.4.5:将 TOKEN_THRESHOLD 从 3500 提升至 6000 预估 tokens(约 24KB),因此中等大小的文件会返回完整内容,而不是智能体随后通过 5-7 次连续的 --section 调用读取的提纲。修复了两个主要的回归问题:gin_radix_tree(+35% → 接近持平)和 rg_search_dispatch(+90% → -26% 胜出)。Sonnet 达到了 100% 的准确率(52/52)和 -34% $/正确的整体表现。
--
<a href="https://github.com/jahala/tilth/" rel="nofollow">https://github.com/jahala/tilth/</a>
完整结果:<a href="https://github.com/jahala/tilth/blob/main/benchmark/README.m" rel="nofollow">https://github.com/jahala/tilth/blob/main/benchmark/README.m</a>...
-- 附言:我没有足够的预算进行大量的基准测试(尤其是使用 Opus),所以如果有任何拥有大量 token 的人有能力运行一些基准测试,请随时提交 PR 结果。
查看原文
Smart code reading for humans and AI agents. Tilth is what happens when you give ripgrep, tree-sitter, and cat a shared brain.
--<p>v0.4.4: Added adaptive 2nd-hop impact analysis to callers search — when a function has ≤10 unique callers, tilth automatically traces callers-of-callers in a single scan. First full 26-task Opus baseline (previously 5 hard tasks only). Haiku adoption improved from 42% to 78%, flipping Haiku from a cost regression to -38% $/correct.<p>v0.4.5: Bumped TOKEN_THRESHOLD from 3500 to 6000 estimated tokens (~24KB), so mid-sized files return full content instead of an outline that agents then read back via 5–7 sequential --section calls. Fixed two major regressions: gin_radix_tree (+35% → ~tie) and rg_search_dispatch (+90% → -26% win). Sonnet hit 100% accuracy (52/52) and -34% $/correct overall.<p>--<p><a href="https://github.com/jahala/tilth/" rel="nofollow">https://github.com/jahala/tilth/</a><p>Full results: <a href="https://github.com/jahala/tilth/blob/main/benchmark/README.m" rel="nofollow">https://github.com/jahala/tilth/blob/main/benchmark/README.m</a>...<p>-- PS: I dont have the budget to run the benchmark a lot (especially with Opus), so if any token whales has capacity to run some benchmarks, please feel free to PR results.