A deterministic quality eval as a run type next to BetterBench: tool calling (12 requests), coding (8 Python functions checked by unit tests in a locked-down sandbox container) and long-context retrieval (needle at 3 depths in 3 lengths up to the context). Versioned eval set in src/evals/v1, score stored per run, shown on the run page, in compare views, the benchmark list and sweep tables (optional eval per variant); API kind "eval", quality in run/sweep/compare answers; skill updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
716bd8f2f0
commit
6b67c653b5
33 files changed
+3822
-79
No files matched your search
@@ -533,3 +533,49 @@ describe("the index", () => {
|
||||
assert.ok(r.body.endpoints.some((e: string) => e.includes("/api/v1/deployments/{id}[?wait=600]")));
|
||||
});
|
||||
});
|
||||
|
||||
describe("quality eval through the API", () => {
|
||||
it("requests an eval run on the token's own deployment and reads its score", async () => {
|
||||
const d = await create({ start: false });
|
||||
await setState(d.body.id, "running");
|
||||
const r = await call(M.runs.POST, "/api/v1/benchmarks", { token: hermes, body: { kind: "eval", deploymentId: d.body.id, sections: ["tools", "retrieval"] } });
|
||||
assert.equal(r.status, 201);
|
||||
assert.equal(r.body.state, "pending_approval");
|
||||
const row = await M.db.db().query.benchmarkRuns.findFirst({ where: eq(M.schema.benchmarkRuns.id, r.body.id) });
|
||||
assert.equal(row?.kind, "eval");
|
||||
assert.deepEqual(row?.settings.evalSections, ["tools", "retrieval"]);
|
||||
await M.db
|
||||
.db()
|
||||
.update(M.schema.benchmarkRuns)
|
||||
.set({
|
||||
state: "completed",
|
||||
quality: {
|
||||
evalSet: "kaname-eval-1",
|
||||
score: 75,
|
||||
sections: [
|
||||
{ section: "tools", passed: 9, total: 12, score: 75, seconds: 20 },
|
||||
{ section: "retrieval", passed: 0, total: 0, score: null, unsupported: "the context length is unknown", seconds: 0 },
|
||||
],
|
||||
items: [{ section: "tools", id: "timer-12", pass: false, detail: "no tool call" }],
|
||||
config: { temperature: 0, seed: 1, thinking: false, contextTokens: null },
|
||||
},
|
||||
})
|
||||
.where(eq(M.schema.benchmarkRuns.id, r.body.id));
|
||||
const v = await call(M.run.GET, "/x", { token: hermes, params: { id: r.body.id } });
|
||||
assert.deepEqual(v.body.quality, { evalSet: "kaname-eval-1", score: 75, sections: { tools: "9/12", retrieval: "n/a (the context length is unknown)" } });
|
||||
const full = await call(M.run.GET, `/api/v1/benchmarks/${r.body.id}?full=1`, { token: hermes, params: { id: r.body.id } });
|
||||
assert.equal(full.body.failed[0].id, "timer-12");
|
||||
});
|
||||
|
||||
it("refuses unknown sections, and sweeps can add the eval per variant", async () => {
|
||||
const d = await create({ start: false });
|
||||
await setState(d.body.id, "running");
|
||||
const bad = await call(M.runs.POST, "/api/v1/benchmarks", { token: hermes, body: { kind: "eval", deploymentId: d.body.id, sections: ["vibes"] } });
|
||||
assert.equal(bad.status, 400);
|
||||
await setState(d.body.id, "stopped");
|
||||
const s = await call(M.sweeps.POST, "/api/v1/sweeps", { token: hermes, body: { baseDeploymentId: d.body.id, quality: true, params: [{ key: "kvCache", values: ["f16", "q8_0"] }] } });
|
||||
assert.equal(s.status, 201);
|
||||
const row = await M.db.db().query.benchmarkSweeps.findFirst({ where: eq(M.schema.benchmarkSweeps.id, s.body.id) });
|
||||
assert.equal(row?.settings.quality, true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user