AgentConnect 研究发现,编程代理经常选择 grep 而不是 LSP

Pengcheng Xu 的初步研究发现,工具选择取决于任务,而仅基于位置的 LSP 结果增加了后续读取次数和令牌使用量。

By · Published

Primary source: AgentConnect

为何重要

编码代理的性能取决于完整的工具循环。用更清晰的抽象替换原生搜索路径,如果该抽象产生了额外工作,可能会增加令牌使用量并降低成功率。

Developer's hands at a keyboard, illuminated by a screen showing precise grep results contrasting with complex, incorrect code context from an LSP.

Pengcheng Xu, author of AgentConnect's coding-tool study, 发现在符号命名的本地化任务中,即使可以使用语义导航,编码代理也默认使用 grep。它们的选择会随着任务而改变,而来自语言服务器协议(或 LSP)的仅位置结果通常需要额外的文件读取。

AgentConnect 发布了一篇关于该 初步研究 的文章,这是一次对普通文本搜索与由 LSP 支持的语义导航的工程比较。AgentConnect 的文章日期为 2026 年 8 月 12 日,所以这是一次近期研究而非同日发布。Xu 在 Python 和 TypeScript 仓库中测试了三款 Claude 模型,比较了普通文本搜索与由 LSP 支持的语义导航。…

When you purchase through links in our articles, we may earn a small commission. This doesn’t affect our editorial independence.

Reader comments

Conversation for this story loads after sign-in.