import { SERIES, ORDER } from '@/lib/chart' import { percent, seconds } from '@/lib/format' import type { EvalsFile } from '@/lib/types' /** The verdict first: one stat tile per system (accuracy with its 95% interval, median * time, tokens per question), then the primary paired result in one sentence. A few * headline numbers are tiles, not a chart (dataviz: "is it even a chart?"). */ export function Headline({ data }: { data: EvalsFile }) { const cb = data.pairs.find((p) => p.new === 'c' && p.base === 'b') return (
{ORDER.map((s) => { const x = data.systems[s] return (
System {s.toUpperCase()} · {x.name}
{percent(x.accuracy)}
correct · 95% interval {percent(x.accuracy_ci[0] ?? 0)} to {percent(x.accuracy_ci[1] ?? 0)}
{seconds(x.latency_p50_ms)}{' '} median time {(x.tokens_mean / 1000).toFixed(1)}k{' '} tokens / question
) })}
{cb && (

On the same {cb.n} questions, C fixed {cb.fixed} answers B got wrong and broke {cb.broken} : +{Math.round(cb.diff * 100)} points (95% interval +{Math.round((cb.ci[0] ?? 0) * 100)} to + {Math.round((cb.ci[1] ?? 0) * 100)}), McNemar p {cb.p < 0.001 ? '< 0.001' : `= ${cb.p.toFixed(3)}`}.

)}
) }