NiceEval

更适合 Agent 的评估。

文档

阅读文档,在 10 分钟内为你的 Agent 构建评估

niceeval
$ niceeval exp compare
╭─ PLAN ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│
8 attempts · 4 evals × 2 configs · concurrency 4
│
│
2 of 8 carried in from cache · 6 to run
│
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✗ @1MEMY3VCQ6B5B checkout/apply-coupon [compare/gpt-5.4]
gate: cart total reflects the SAVE20 coupon
equals(80) · expected 80 · received 100
╭─ FAILED ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 2m 07s ╮
│
7 passed · 1 failed · 0 errored (2 reused)
│
│
330.5k new tok · $0.51
│
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ FAILURES ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 failed attempt ╮
│
✗ @1MEMY3VCQ6B5B checkout/apply-coupon [compare/gpt-5.4]
│
│
gate: cart total reflects the SAVE20 coupon
│
│
details: niceeval show @1MEMY3VCQ6B5B
│
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ NEXT ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│
compare/gpt-5.4
│
│
show: niceeval show --run 4c1e9a07-6b2d-4f3a-9e85-2d7f0b6c1a93
│
│
view: niceeval view --run 4c1e9a07-6b2d-4f3a-9e85-2d7f0b6c1a93
│
│
compare/sonnet-5
│
│
show: niceeval show --run b83f2d14-90ce-4a6b-8f17-5e2a9c40d7b8
│
│
view: niceeval view --run b83f2d14-90ce-4a6b-8f17-5e2a9c40d7b8
│
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
$ niceeval show
Current results
Covered 8/8 · Gaps 0 · 7 passed; 1 failed; 0 errored; 0 skipped
ExperimentCoveredGapsPass ratecompare/gpt-5.44/4075.00%compare/sonnet-54/40100.00%
Attempts · compare/gpt-5.4
Eval checkout/apply-coupon @1MEMY3VCQ6B5B failed 41.20 s
3 passed Attempts hidden
$
1

接入

通过 Adapter 与 OpenTelemetry,接入你的 Agent、Claude Code 或 Codex

2

定义

像写单元测试一样写评估与实验

3

评估

并行运行评估,在终端或浏览器里查看结果

Eval 示例

Eval 对话、工具调用与 Coding Agent

每张卡都是一个可直接运行的 defineEval 文件。点击高亮行,展开助手回复和断言说明。

多模态多轮看图问答
通过
1import { defineEval, defineJudge } from "niceeval";
2import { pattern } from "niceeval/expect";
3
4const imageContext = defineJudge({ name: "image-context", rubric: "最后一轮回复是否基于先前图片?" });
5
6export default defineEval({
7 description: "评估 agent 在多轮对话中多模态的能力",
8
9 async test(t) {
16
17 await t.group("后续追问能联系图片上下文", () => {
19 });
20
22 },
23});

Agent 也是用户

把评估变成循环

NiceEval 的 CLI 把 coding agent 也当成用户。构建评估、运行评估、读失败、改进 Agent,每一步都能在 bash 里完成,每个失败都带着 agent 能继续追查的 locator。

评估exp local诊断show @…证据--execution优化claude
终端niceeval exp local
$ niceeval exp local
FAILED                                                38s
14 passed · 1 failed · 0 errored  (0 reused)

FAILURES                                 1 failed attempt
✗ @1K1P0VJAPVJ12  weather/brooklyn  [local]
  gate: get_weather was never called
  details: niceeval show @1K1P0VJAPVJ12

NEXT
  show: niceeval show --run 8f3d6f62-1d34-4cf3-99c7-84ba3c483706
  view: niceeval view --run 8f3d6f62-1d34-4cf3-99c7-84ba3c483706