import { Fragment } from "react" import Link from "next/link" import { ArrowRight } from "lucide-react" import { Navigation } from "@/components/navigation" import { CorpusSignalsStrip } from "@/components/signals/corpus-signals-strip" import { getDeveloperList, getEvalList } from "@/lib/data-backend" import { fetchBackendManifest, fetchCorpusAggregates, fetchEvalHierarchy, } from "@/lib/hf-data" function formatGeneratedAt(value: string | null | undefined) { if (!value) return null try { const date = new Date(value) if (Number.isNaN(date.getTime())) return value return date.toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric", }) } catch { return value } } function formatNumber(value: number | undefined | null): string { if (value == null || !Number.isFinite(value)) return "—" return value.toLocaleString("en-US") } const FAMILY_KIND_LABELS: Record = { General: "General capability", Reasoning: "Reasoning", Agentic: "Agentic", Safety: "Safety", Code: "Code", Math: "Math", Multilingual: "Multilingual", } export default async function HomePage() { const [aggregates, manifest, hierarchy, developers, evals] = await Promise.all([ fetchCorpusAggregates(), fetchBackendManifest(), fetchEvalHierarchy(), getDeveloperList().catch(() => []), getEvalList().catch(() => [] as Awaited>), ]) const stats = hierarchy.stats const familyCount = stats?.family_count ?? hierarchy.families.length const compositeCount = stats?.composite_count ?? 0 const singleBenchmarkCount = stats?.single_benchmark_count ?? 0 const standaloneBenchmarkCount = stats?.standalone_benchmark_count ?? 0 const benchmarkLeafCount = singleBenchmarkCount + standaloneBenchmarkCount const sliceCount = stats?.slice_count ?? 0 const metricCount = stats?.metric_count ?? 0 const tripleCount = stats?.metric_rows_scanned ?? 0 const modelCount = manifest?.model_count ?? 0 const developerCount = developers.length // Reporting initiatives — distinct evaluation submissions in the corpus // (each `eval` here is a benchmark-publication artifact, e.g. HELM Lite, // BFCL, Open LLM Leaderboard v2). This is closer to "reporting evaluators" // than a model-developer count. const evaluatorCount = evals.length const generatedAt = formatGeneratedAt(manifest?.generated_at) // Featured family cards — pick the first six families with summaries. const featuredFamilies = hierarchy.families.slice(0, 6).map((family) => { const benches: unknown[] = family.benchmarks ?? family.standalone_benchmarks ?? family.leaves ?? [] let slices = 0 for (const b of benches) { const benchSlices = (b as { slices?: unknown[] }).slices if (Array.isArray(benchSlices)) slices += benchSlices.length } return { key: family.key, name: family.display_name, kind: FAMILY_KIND_LABELS[family.category] ?? family.category ?? "Benchmark family", benchCount: benches.length, sliceCount: slices, } }) return (
{/* HERO ----------------------------------------------------------- */}
{aggregates ? `Signals v${aggregates.signal_version}` : "Eval Cards · Beta"}

A reporting layer
over evaluation
infrastructure.

Eval Cards is a registry of reported model–benchmark results, organised under a six-level rollout hierarchy and four interpretive signals computed over the joined record.

Browse models Browse evaluations About
Corpus snapshot{generatedAt ? ` · ${generatedAt}` : ""}
{/* SIX-LEVEL HIERARCHY STRIP -------------------------------------- */}
Six-level rollout hierarchy
{[ { name: "Family", count: formatNumber(familyCount), ex: "SWE-bench family, MMLU family", }, { name: "Suite", count: formatNumber(compositeCount), ex: "Open LLM Leaderboard v2, HELM Instruct", }, { name: "Single benchmark", count: formatNumber(benchmarkLeafCount), ex: "GSM8K, IFEval, MMLU-Pro", }, { name: "Split", count: formatNumber(sliceCount), ex: "algebra (within MATH), Python (Multi-SWE-Bench)", }, { name: "Subtask", count: "—", ex: "level-5, multi-turn", }, { name: "Metric", count: formatNumber(metricCount), ex: "pass@1, accuracy, F1", }, ].map((node, i, arr) => (
{String(i + 1).padStart(2, "0")}
{node.name}
{node.count}
{node.ex}
{i < arr.length - 1 && (
)}
))}

Every score resolves to an explicit path through this hierarchy, so aggregate claims drill down to the evidence supporting them.

{/* FOUR INTERPRETIVE SIGNALS -------------------------------------- */}
Interpretive signals

Reproducibility · Completeness ·
Provenance & risk · Comparability

Four signals computed over each (model, benchmark, metric-path) record and aggregated to the corpus level. Per-record instances appear on every model and benchmark page.

{aggregates ? ( ) : (

Corpus aggregates unavailable

The current backend snapshot does not include{" "} corpus-aggregates.json . When it does, this section will render the four corpus-level rollups.

)}
{/* FEATURED BENCHMARK FAMILIES ------------------------------------ */} {featuredFamilies.length > 0 && (

Benchmark families

All {formatNumber(familyCount)} →
{featuredFamilies.map((fam) => (
{fam.kind}
{fam.benchCount} bench · {fam.sliceCount} slices

{fam.name}

{fam.benchCount > 0 ? `${fam.benchCount} reported benchmark${fam.benchCount === 1 ? "" : "s"} across this family.` : "No reported results yet for this family."}

))}
)}
) } function CorpusStat({ label, value, detail, }: { label: string value: string detail: string }) { return (
{value}
{label}
{detail}
) }