evijit HF Staff commited on
Commit
5ca5561
·
1 Parent(s): 03e2430

fix: align reporting cues and developer slugs

Browse files
app/page.tsx CHANGED
@@ -79,11 +79,11 @@ export default function HomePage() {
79
  .slice(0, 6)
80
  }, [models])
81
 
82
- const independentlyReportedModels = useMemo(() => {
83
  return [...models]
84
  .sort((a, b) => {
85
- if (b.independent_verification_ratio !== a.independent_verification_ratio) {
86
- return b.independent_verification_ratio - a.independent_verification_ratio
87
  }
88
  return b.benchmarks_count - a.benchmarks_count
89
  })
@@ -248,22 +248,22 @@ export default function HomePage() {
248
 
249
  <section className="grid gap-6 xl:grid-cols-2">
250
  <OverviewPanel
251
- eyebrow="Accountability"
252
- title="Highest third-party reporting share"
253
- description="Models with the largest share of third-party benchmark reporting in the current corpus."
254
  href="/models"
255
  cta="Browse models"
256
  >
257
  <div className="space-y-1">
258
- {independentlyReportedModels.map((model, index) => (
259
  <ModelOverviewRow
260
  key={model.id}
261
  rank={index + 1}
262
  model={model}
263
- metricLabel="Third-party share"
264
- metricValue={`${Math.round(model.independent_verification_ratio * 100)}%`}
265
  secondaryLabel={`${model.benchmarks_count} benchmarks`}
266
- highlight={model.independent_verification_ratio > 0.5}
267
  />
268
  ))}
269
  </div>
 
79
  .slice(0, 6)
80
  }, [models])
81
 
82
+ const mostReportedModels = useMemo(() => {
83
  return [...models]
84
  .sort((a, b) => {
85
+ if (b.evaluator_count !== a.evaluator_count) {
86
+ return b.evaluator_count - a.evaluator_count
87
  }
88
  return b.benchmarks_count - a.benchmarks_count
89
  })
 
248
 
249
  <section className="grid gap-6 xl:grid-cols-2">
250
  <OverviewPanel
251
+ eyebrow="Reporting"
252
+ title="Most reporting organizations"
253
+ description="Models with the broadest spread of reporting organizations in the current corpus."
254
  href="/models"
255
  cta="Browse models"
256
  >
257
  <div className="space-y-1">
258
+ {mostReportedModels.map((model, index) => (
259
  <ModelOverviewRow
260
  key={model.id}
261
  rank={index + 1}
262
  model={model}
263
+ metricLabel="Reporting orgs"
264
+ metricValue={model.evaluator_count.toString()}
265
  secondaryLabel={`${model.benchmarks_count} benchmarks`}
266
+ highlight={model.evaluator_count > 1}
267
  />
268
  ))}
269
  </div>
components/benchmark-detail.tsx CHANGED
@@ -15,7 +15,7 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@
15
  import {
16
  ExternalLink, TrendingUp, Info, Database, Settings, FileCode, Building, Calendar, User, Server,
17
  ChevronDown, ChevronUp, BarChart3, Award, AlertTriangle,
18
- Cpu, Tag, Globe, Network, Activity, MessageSquare, Clock, Hash, Layers, Search, FlaskConical, Scale, BadgeCheck, BookOpenText
19
  } from "lucide-react"
20
  import type { BenchmarkEvaluation, CategoryType, EvaluationResult } from "@/lib/benchmark-schema"
21
  import { inferCategoryFromBenchmark } from "@/lib/benchmark-schema"
@@ -363,18 +363,6 @@ function getPolicySignalLevel(score: number) {
363
  }
364
  }
365
 
366
- function getSignalTone(score: number) {
367
- if (score >= 0.7) {
368
- return "bg-emerald-100 text-emerald-800 dark:bg-emerald-950/50 dark:text-emerald-300"
369
- }
370
-
371
- if (score >= 0.4) {
372
- return "bg-amber-100 text-amber-800 dark:bg-amber-950/50 dark:text-amber-300"
373
- }
374
-
375
- return "bg-rose-100 text-rose-800 dark:bg-rose-950/50 dark:text-rose-300"
376
- }
377
-
378
  function getBenchmarkSpread(group: BenchmarkGroup) {
379
  if (group.variants.length <= 1) {
380
  return 0
@@ -845,12 +833,6 @@ export function BenchmarkDetail({ summary }: BenchmarkDetailProps) {
845
  <Badge variant="outline" className="border-border/60 bg-background/80 text-[11px] uppercase tracking-[0.18em]">
846
  Model Metadata
847
  </Badge>
848
- {policySummary.independentlyVerified && (
849
- <Badge className="bg-emerald-100 text-emerald-800 hover:bg-emerald-100 dark:bg-emerald-950/40 dark:text-emerald-200">
850
- <BadgeCheck className="mr-1 h-3.5 w-3.5" />
851
- Independent reporting
852
- </Badge>
853
- )}
854
  {formatParamsBillions(summary.model_info.additional_details?.params_billions) && (
855
  <Badge variant="secondary" className="font-normal">
856
  {formatParamsBillions(summary.model_info.additional_details?.params_billions)}
@@ -1871,7 +1853,6 @@ function AggregatedBenchmarkCard({
1871
 
1872
  const activeFilterCount = Object.values(selectedFilters).filter((value) => value && value !== "all").length
1873
  const leaderNormalizedScore = filteredRows[0]?.variant.normalizedScore ?? 0
1874
- const signalTone = getSignalTone(group.avgNormalizedScore)
1875
  const spread = getBenchmarkSpread(group)
1876
  const sourceOrganizations = new Set(group.variants.map((variant) => variant.evaluation.source_metadata.source_organization_name))
1877
  const latestTimestamp = group.variants.reduce((latest, variant) => {
@@ -1899,8 +1880,8 @@ function AggregatedBenchmarkCard({
1899
  <div className="flex flex-col gap-5 lg:flex-row lg:items-start lg:justify-between">
1900
  <div className="min-w-0 flex-1 space-y-3">
1901
  <div className="flex flex-wrap items-center gap-2">
1902
- <Badge className={`${signalTone} border-0 text-[11px] font-medium shadow-none`}>
1903
- {isResearchView ? "Reported signal" : "Public signal"}
1904
  </Badge>
1905
  <Badge variant="outline" className="border-border/60 bg-background/70 text-[11px] font-normal text-muted-foreground">
1906
  {group.scoreType}
 
15
  import {
16
  ExternalLink, TrendingUp, Info, Database, Settings, FileCode, Building, Calendar, User, Server,
17
  ChevronDown, ChevronUp, BarChart3, Award, AlertTriangle,
18
+ Cpu, Tag, Globe, Network, Activity, MessageSquare, Clock, Hash, Layers, Search, FlaskConical, Scale, BookOpenText
19
  } from "lucide-react"
20
  import type { BenchmarkEvaluation, CategoryType, EvaluationResult } from "@/lib/benchmark-schema"
21
  import { inferCategoryFromBenchmark } from "@/lib/benchmark-schema"
 
363
  }
364
  }
365
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  function getBenchmarkSpread(group: BenchmarkGroup) {
367
  if (group.variants.length <= 1) {
368
  return 0
 
833
  <Badge variant="outline" className="border-border/60 bg-background/80 text-[11px] uppercase tracking-[0.18em]">
834
  Model Metadata
835
  </Badge>
 
 
 
 
 
 
836
  {formatParamsBillions(summary.model_info.additional_details?.params_billions) && (
837
  <Badge variant="secondary" className="font-normal">
838
  {formatParamsBillions(summary.model_info.additional_details?.params_billions)}
 
1853
 
1854
  const activeFilterCount = Object.values(selectedFilters).filter((value) => value && value !== "all").length
1855
  const leaderNormalizedScore = filteredRows[0]?.variant.normalizedScore ?? 0
 
1856
  const spread = getBenchmarkSpread(group)
1857
  const sourceOrganizations = new Set(group.variants.map((variant) => variant.evaluation.source_metadata.source_organization_name))
1858
  const latestTimestamp = group.variants.reduce((latest, variant) => {
 
1880
  <div className="flex flex-col gap-5 lg:flex-row lg:items-start lg:justify-between">
1881
  <div className="min-w-0 flex-1 space-y-3">
1882
  <div className="flex flex-wrap items-center gap-2">
1883
+ <Badge variant="outline" className="border-border/60 bg-background/70 text-[11px] font-medium text-foreground/85 shadow-none">
1884
+ Benchmark summary
1885
  </Badge>
1886
  <Badge variant="outline" className="border-border/60 bg-background/70 text-[11px] font-normal text-muted-foreground">
1887
  {group.scoreType}
components/benchmark-evaluation-card.tsx CHANGED
@@ -5,7 +5,6 @@ import { useAudienceMode } from "@/components/audience-mode-provider"
5
  import { useRouter } from "next/navigation"
6
  import {
7
  Award,
8
- BadgeCheck,
9
  BookOpenText,
10
  ExternalLink,
11
  Eye,
@@ -139,20 +138,6 @@ function getReportingSummaryLabel(data: BenchmarkEvaluationCardData) {
139
  return "Aggregated reporting view"
140
  }
141
 
142
- function getReportingMixLabel(data: BenchmarkEvaluationCardData) {
143
- const thirdPartyShare = Math.round(data.independent_verification_ratio * 100)
144
-
145
- if (thirdPartyShare <= 0) {
146
- return "Self-reported evidence"
147
- }
148
-
149
- if (thirdPartyShare >= 100) {
150
- return "Third-party reported"
151
- }
152
-
153
- return `${thirdPartyShare}% third-party mix`
154
- }
155
-
156
  export function BenchmarkEvaluationCard({ data, onDelete, delayMs = 0 }: BenchmarkEvaluationCardProps) {
157
  const router = useRouter()
158
  const { mode } = useAudienceMode()
@@ -250,8 +235,8 @@ export function BenchmarkEvaluationCard({ data, onDelete, delayMs = 0 }: Benchma
250
  tone="bg-stone-100 text-stone-900 ring-1 ring-stone-200/80 dark:bg-stone-900/40 dark:text-stone-100 dark:ring-stone-800/70"
251
  />
252
  <CompactStat
253
- label="Reporting Mix"
254
- value={getReportingMixLabel(data)}
255
  tone="bg-emerald-50 text-emerald-900 ring-1 ring-emerald-200/70 dark:bg-emerald-950/25 dark:text-emerald-100 dark:ring-emerald-900/50"
256
  />
257
  </div>
@@ -318,17 +303,11 @@ export function BenchmarkEvaluationCard({ data, onDelete, delayMs = 0 }: Benchma
318
  <div className="space-y-2">
319
  <div className="text-sm font-semibold">Reporting summary</div>
320
  <div className="text-sm text-muted-foreground">
321
- This model has reported results from {reportingSummaryLabel.toLowerCase()} across {data.benchmarks_count} benchmark{data.benchmarks_count !== 1 ? "s" : ""}.
322
- {data.independent_verification_ratio > 0 && data.independent_verification_ratio < 1
323
- ? ` The current record mixes self-reported and third-party benchmark results, with ${Math.round(data.independent_verification_ratio * 100)}% coming from third-party reporting.`
324
- : data.independent_verification_ratio >= 1
325
- ? " The current record is fully backed by third-party reporting."
326
- : " The current record is self-reported."}
327
  </div>
328
  <div className="flex flex-wrap gap-2 pt-1">
329
  {data.evaluator_names.slice(0, 2).map((evaluator) => (
330
  <Badge key={evaluator} variant="secondary" className="font-normal">
331
- <BadgeCheck className="mr-1 h-3 w-3" />
332
  {evaluator}
333
  </Badge>
334
  ))}
 
5
  import { useRouter } from "next/navigation"
6
  import {
7
  Award,
 
8
  BookOpenText,
9
  ExternalLink,
10
  Eye,
 
138
  return "Aggregated reporting view"
139
  }
140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  export function BenchmarkEvaluationCard({ data, onDelete, delayMs = 0 }: BenchmarkEvaluationCardProps) {
142
  const router = useRouter()
143
  const { mode } = useAudienceMode()
 
235
  tone="bg-stone-100 text-stone-900 ring-1 ring-stone-200/80 dark:bg-stone-900/40 dark:text-stone-100 dark:ring-stone-800/70"
236
  />
237
  <CompactStat
238
+ label="Reporting Orgs"
239
+ value={data.evaluator_count.toString()}
240
  tone="bg-emerald-50 text-emerald-900 ring-1 ring-emerald-200/70 dark:bg-emerald-950/25 dark:text-emerald-100 dark:ring-emerald-900/50"
241
  />
242
  </div>
 
303
  <div className="space-y-2">
304
  <div className="text-sm font-semibold">Reporting summary</div>
305
  <div className="text-sm text-muted-foreground">
306
+ This model has reported results from {reportingSummaryLabel.toLowerCase()} across {data.benchmarks_count} benchmark{data.benchmarks_count !== 1 ? "s" : ""}. Benchmark detail pages break out reporting provenance benchmark by benchmark.
 
 
 
 
 
307
  </div>
308
  <div className="flex flex-wrap gap-2 pt-1">
309
  {data.evaluator_names.slice(0, 2).map((evaluator) => (
310
  <Badge key={evaluator} variant="secondary" className="font-normal">
 
311
  {evaluator}
312
  </Badge>
313
  ))}
lib/model-data.ts CHANGED
@@ -371,7 +371,32 @@ function pipelineSlugify(text: string) {
371
  }
372
 
373
  function getDeveloperRouteId(developer: string) {
374
- return pipelineSlugify(developer)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  }
376
 
377
  function getModelDetailSlugCandidates(modelId: string) {
@@ -481,9 +506,7 @@ function summarizeDeveloperModels(models: IndexedModelSummary[]): DeveloperAggre
481
  }
482
 
483
  async function readDeveloperDetail(routeId: string) {
484
- const direct = await readJsonFile<IndexedDeveloperDetail>(
485
- path.join(getDeveloperSubdirectory(), `${routeId}.json`)
486
- )
487
 
488
  if (direct?.developer && Array.isArray(direct.models)) {
489
  return direct
@@ -499,12 +522,7 @@ async function readDeveloperDetail(routeId: string) {
499
  return null
500
  }
501
 
502
- const resolved = await readJsonFile<IndexedDeveloperDetail>(
503
- path.join(
504
- getDeveloperSubdirectory(),
505
- `${getDeveloperRouteId(matchedDeveloper.developer)}.json`
506
- )
507
- )
508
 
509
  if (resolved?.developer && Array.isArray(resolved.models)) {
510
  return resolved
@@ -641,12 +659,7 @@ export async function getDeveloperList() {
641
  const details = await Promise.all(
642
  developersIndex.map(async (entry) => ({
643
  developer: entry.developer,
644
- detail: await readJsonFile<IndexedDeveloperDetail>(
645
- path.join(
646
- getDeveloperSubdirectory(),
647
- `${getDeveloperRouteId(entry.developer)}.json`
648
- )
649
- ),
650
  }))
651
  )
652
 
 
371
  }
372
 
373
  function getDeveloperRouteId(developer: string) {
374
+ return pipelineSlugify(developer.trim().toLowerCase())
375
+ }
376
+
377
+ function getDeveloperSlugCandidates(developerOrRouteId: string) {
378
+ const normalized = developerOrRouteId.trim()
379
+ const lowercased = normalized.toLowerCase()
380
+ const candidates = new Set([
381
+ pipelineSlugify(normalized),
382
+ pipelineSlugify(lowercased),
383
+ ])
384
+
385
+ return Array.from(candidates)
386
+ }
387
+
388
+ async function readDeveloperDetailFile(developerOrRouteId: string) {
389
+ for (const slug of getDeveloperSlugCandidates(developerOrRouteId)) {
390
+ const detail = await readJsonFile<IndexedDeveloperDetail>(
391
+ path.join(getDeveloperSubdirectory(), `${slug}.json`)
392
+ )
393
+
394
+ if (detail?.developer && Array.isArray(detail.models)) {
395
+ return detail
396
+ }
397
+ }
398
+
399
+ return null
400
  }
401
 
402
  function getModelDetailSlugCandidates(modelId: string) {
 
506
  }
507
 
508
  async function readDeveloperDetail(routeId: string) {
509
+ const direct = await readDeveloperDetailFile(routeId)
 
 
510
 
511
  if (direct?.developer && Array.isArray(direct.models)) {
512
  return direct
 
522
  return null
523
  }
524
 
525
+ const resolved = await readDeveloperDetailFile(matchedDeveloper.developer)
 
 
 
 
 
526
 
527
  if (resolved?.developer && Array.isArray(resolved.models)) {
528
  return resolved
 
659
  const details = await Promise.all(
660
  developersIndex.map(async (entry) => ({
661
  developer: entry.developer,
662
+ detail: await readDeveloperDetailFile(entry.developer),
 
 
 
 
 
663
  }))
664
  )
665