跳到正文
DEV Community· Gavin Geizer·· 5 小時前AI 評分53

Codex 與 Codex 搭配 SwarmForge:如何基準測試 AI 編碼智能體

How I’d Benchmark an AI Coding Agent

AI 導讀

Gavin Geizer 提出一套 AI 編碼智能體基準測試方案,計劃用相同 LLVM 任務、起始提交和時間限制,比較 Codex 與搭配 SwarmForge 的 Codex。他建議預先制定驗收檢查,記錄建置時間、tokens、可量度的模型及運算成本,並計入審閲和修補時間。文章亦建議以其他程式碼庫的真實問題重複測試、公開每次嘗試;本文沒有呈現測試結果。

正文

Gavin Geizer

A stopwatch beside a reviewed code diff and regression test, illustrating a benchmark plan.

Illustration of test design and code review; no benchmark results are shown.

I want to give a coding agent an LLVM task where it has to figure out which part of the compiler to touch before it writes a line. Pin the commit, describe the behavior I want, and leave out the file names. If I hand it the right files and tell it what to change, I’ve already done half the work I wanted to measure.

I’d start with plain Codex versus Codex with SwarmForge. Same starting commit, same task, same time limit. Both get a fresh checkout, the same lead model, and the same starting build state. I’d log the worker models, tools, and compute separately. The point is to compare how the two setups do on the same job. A faster run wouldn’t tell me which difference made it faster.

Pick the checks before you run it

For a compiler change, I’d want a regression test that fails on the starting commit and passes with the patch, plus the relevant existing tests. I’d write the acceptance checks before either run and keep some out of the prompt. Then I’d run the checks myself and read the diff. If the agent hits the deadline with a good explanation and half a patch, I’d record that as useful progress, not a fix.

Make the clock count the waiting

The timer starts when I hand over the task and stops when the agent hands back its final patch or hits the deadline. If it spends ten minutes building LLVM, that’s ten minutes I waited. I’d break out build time, tokens, model and compute costs where measurable, and the time I spend reviewing or fixing the patch afterward. If the faster run leaves me three overlapping diffs to untangle, I want that in the write-up too.

One LLVM task is a start. I’d pick a couple of real issues from other repos before running anything, flag any that already have a public fix, and repeat each setup. I’d show every attempt. What I really want to know is how often I come back to a patch I’d actually merge without finishing the job myself.

Further reading

Originally published on SwarmForge by Gavin Geizer.

來源:DEV Community · dev.to