Release / release (push) Successful in 3m17s
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>
69 lines
3.5 KiB
TypeScript
69 lines
3.5 KiB
TypeScript
import { CheckIcon, XIcon } from "lucide-react";
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
|
|
import type { QualityResult } from "@/lib/db/schema";
|
|
import { SECTION_HINT, SECTION_LABEL } from "@/lib/quality-view";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
/** A quality eval's result: the score, each section's pass rate and every item. */
|
|
export function QualityReport({ quality, running }: { quality: QualityResult | null; running: boolean }) {
|
|
if (!quality) {
|
|
return (
|
|
<Card>
|
|
<CardContent className="text-sm text-muted-foreground">{running ? "The quality eval is running; results appear when it's done." : "No result."}</CardContent>
|
|
</Card>
|
|
);
|
|
}
|
|
return (
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle>Quality</CardTitle>
|
|
<CardDescription>
|
|
Eval set {quality.evalSet}: greedy decoding (temperature {quality.config.temperature}, seed {quality.config.seed}), thinking{" "}
|
|
{quality.config.thinking ? "on" : "off"}
|
|
{quality.config.contextTokens ? `, context ${quality.config.contextTokens.toLocaleString("en-US")} tokens` : ""}. Scores are the share of items that pass;
|
|
only results of the same eval set compare.
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent className="flex flex-col gap-4">
|
|
<div className="flex items-baseline gap-2">
|
|
<span className="text-4xl font-semibold tabular-nums">{quality.score != null ? `${quality.score}%` : "—"}</span>
|
|
<span className="text-sm text-muted-foreground">overall (mean of the sections)</span>
|
|
</div>
|
|
<Table>
|
|
<TableHeader>
|
|
<TableRow>
|
|
<TableHead>Section</TableHead>
|
|
<TableHead className="text-right">Passed</TableHead>
|
|
<TableHead className="text-right">Score</TableHead>
|
|
<TableHead className="text-right">Time</TableHead>
|
|
</TableRow>
|
|
</TableHeader>
|
|
<TableBody>
|
|
{quality.sections.map((s) => (
|
|
<TableRow key={s.section}>
|
|
<TableCell className="whitespace-normal">
|
|
<div className="font-medium">{SECTION_LABEL[s.section]}</div>
|
|
<div className="text-xs text-muted-foreground">{s.unsupported ? `Not counted: ${s.unsupported}` : SECTION_HINT[s.section]}</div>
|
|
</TableCell>
|
|
<TableCell className="text-right tabular-nums">{s.unsupported ? "—" : `${s.passed} / ${s.total}`}</TableCell>
|
|
<TableCell className="text-right font-medium tabular-nums">{s.score != null ? `${s.score}%` : "—"}</TableCell>
|
|
<TableCell className="text-right text-muted-foreground tabular-nums">{s.seconds} s</TableCell>
|
|
</TableRow>
|
|
))}
|
|
</TableBody>
|
|
</Table>
|
|
<ul className="flex flex-col gap-1 text-xs">
|
|
{quality.items.map((i) => (
|
|
<li key={`${i.section}-${i.id}`} className="flex items-start gap-1.5">
|
|
{i.pass ? <CheckIcon className="mt-0.5 size-3.5 shrink-0 text-emerald-600" /> : <XIcon className="mt-0.5 size-3.5 shrink-0 text-destructive" />}
|
|
<span className="font-mono">{i.id}</span>
|
|
<span className={cn("min-w-0 break-words text-muted-foreground", !i.pass && "text-foreground")}>{i.detail}</span>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
}
|