先说明:我是开源项目 Tura 的维护者。
给开发 coding agent 的人一个很简单的想法:不要讓模型在可预测的每一步都重新醒來。
一般工具呼叫會變成 5 個 LLM 回合:
Turn 1 — 检查
rg -n "TODO|command_run|handler" crates/
rg --files crates/runtime/src crates/tools/src
Turn 2 — 应用 patch
- // old command handler logic
+ // patched command handler logic
Turn 3 — 构建
cargo build -p runtime
Turn 4 — 测试
cargo test -p runtime --lib
Turn 5 — lint
cargo clippy -p runtime --all-targets
真正的额外成本,不只是這些命令,而是模型醒來 5 次,並且每次都要重新读取越来越长的對話。
Tura 提供一个叫 command_run 的 Macro 工具。Agent 可以一次提交同一个工作流程:
{
"name": "command_run",
"arguments": {
"commands": [
{ "step": 1, "command_type": "shell_command", "command_line": "rg -n \"TODO|command_run|handler\" crates/" },
{ "step": 1, "command_type": "shell_command", "command_line": "rg --files crates/runtime/src crates/tools/src" },
{ "step": 2, "command_type": "apply_patch", "command_line": "*** Begin Patch\n*** Update File: crates/tools/src/command_run/
handler.rs\n@@\n- // old command handler logic\n+ // patched command handler logic\n*** End Patch" },
{ "step": 3, "command_type": "shell_command", "command_line": "cargo build -p runtime" },
{ "step": 4, "command_type": "shell_command", "command_line": "cargo test -p runtime --lib" },
{ "step": 4, "command_type": "shell_command", "command_line": "cargo clippy -p runtime --all-targets" }
]
}
}
构建、测试與 lint 都仍然会执行,只是不需要在可预测的步驟之間再次呼叫 LLM 。
在完整 DeepSWE 比較中,Balanced 比 Codex CLI 少 35.8% 回合、少 31.1% Token ; Direct 少 69.1% 回合、少 77.5% Token 。接近 80% 是这次 benchmark 的結果,不是每个任务的保证。
GitHub:
https://github.com/Tura-AI/turaBenchmark:
https://turaai.net/benchmark
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/1231871
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.