我的 AI 智能體看似正常,直到我給它一個空列表
My agent looked fine — until I gave it an empty list
作者用 10 分鐘製作測試 AI 智能體的小工具,按任務是否完成、正確、捏造資訊或採取錯誤操作四方面評分。處理空列表平均值的修正答案得 4/4,原有未修正函數得 3/4。工具有 20 項任務,免費使用,無需 API key 或登入,資料不會離開頁面;它是初步檢查,不取代 CI 或正式環境工具。
I built a small tool to test my own AI agent in 10 minutes, instead of trusting that it "looked right."
One test from it: "Handle an empty average." The starting code divides by the list length, so an empty list breaks it. The check is simple: handle an empty list safely, keep the normal average, and explain the empty-list behavior.
I ran two answers through it:
- A fixed answer — check for an empty list first and return 0, otherwise return the normal average — scored 4/4. What-to-fix: "No fix needed for this task."
- The original, unfixed function scored 3/4. It lost the "Is correct" point. The plain-language fix: tell the agent to check for an empty list first and return 0, and keep the normal average for everything else.
That is the whole point of the tool. It scores 4 things per task: finished, correct, did not make things up, and took no wrong action. Auto-score suggests, you confirm — so you get speed without handing the judgment to a black box.
The tool has 20 tasks: 10 developer, 5 personal-life, and 5 creator. It is free, with no API key, no login, and nothing leaves the page. It is a quick first check, not a CI or production replacement — use it first, then graduate to heavier tools when you need them.
Try this one task yourself: https://jefferson999.github.io/agent-reliability--score/
Paste your agent's answer, see the score, and read what to fix. If your agent passes the empty list, try the other 19.
來源:DEV Community · dev.to