Add eee source record

#9
components/eval-detail.tsx CHANGED
@@ -2038,6 +2038,7 @@ export function EvalDetail({
2038
  score={formatRawScore(modelResult.score, lb.metric_config.unit)}
2039
  sourceUrl={modelResult.source_metadata.source_url}
2040
  sourceRecordUrl={modelResult.source_record_url}
 
2041
  />
2042
  </div>
2043
  </div>
@@ -2850,6 +2851,7 @@ function MultiMetricLeaderboard({
2850
  score={formatRawScore(matchingResult.score, summary.metric_config.unit)}
2851
  sourceUrl={matchingResult.source_metadata.source_url}
2852
  sourceRecordUrl={matchingResult.source_record_url}
 
2853
  />
2854
  </div>
2855
  </div>
 
2038
  score={formatRawScore(modelResult.score, lb.metric_config.unit)}
2039
  sourceUrl={modelResult.source_metadata.source_url}
2040
  sourceRecordUrl={modelResult.source_record_url}
2041
+ eeeRecordUrl={modelResult.eee_record_url}
2042
  />
2043
  </div>
2044
  </div>
 
2851
  score={formatRawScore(matchingResult.score, summary.metric_config.unit)}
2852
  sourceUrl={matchingResult.source_metadata.source_url}
2853
  sourceRecordUrl={matchingResult.source_record_url}
2854
+ eeeRecordUrl={matchingResult.eee_record_url}
2855
  />
2856
  </div>
2857
  </div>
lib/eval-processing.ts CHANGED
@@ -39,6 +39,8 @@ export interface ModelResultForBenchmark {
39
  result: EvaluationResult
40
  /** URL to the underlying record JSON in the upstream HF dataset, when known. */
41
  source_record_url?: string
 
 
42
  aggregate_components?: Array<{
43
  evaluation_id: string
44
  composite_benchmark_key: string
 
39
  result: EvaluationResult
40
  /** URL to the underlying record JSON in the upstream HF dataset, when known. */
41
  source_record_url?: string
42
+ /** Deep-link to the raw EEE_datastore source record this score came from, when known. */
43
+ eee_record_url?: string
44
  aggregate_components?: Array<{
45
  evaluation_id: string
46
  composite_benchmark_key: string
lib/view-data.ts CHANGED
@@ -143,6 +143,7 @@ const EVAL_CELL_JOIN_COLUMNS = `
143
  CAST(to_json(r.source_metadata) AS VARCHAR) AS source_metadata,
144
  CAST(to_json(r.source_data) AS VARCHAR) AS source_data,
145
  r.source_record_url,
 
146
  CAST(to_json(r.eval_library) AS VARCHAR) AS eval_library,
147
  CAST(to_json(r.aggregate_components) AS VARCHAR) AS aggregate_components,
148
  CAST(to_json(r.evalcards_annotations) AS VARCHAR) AS evalcards_annotations,
@@ -559,6 +560,7 @@ function reshapeCellToModelResult(row: Row): ModelResultForBenchmark {
559
  source_metadata: sourceMetadataFromRow(row),
560
  source_data: sourceDataFromRow(row),
561
  source_record_url: optionalString(row.source_record_url),
 
562
  aggregate_components: asArray<NonNullable<ModelResultForBenchmark["aggregate_components"]>[number]>(
563
  aggregateComponents
564
  ),
 
143
  CAST(to_json(r.source_metadata) AS VARCHAR) AS source_metadata,
144
  CAST(to_json(r.source_data) AS VARCHAR) AS source_data,
145
  r.source_record_url,
146
+ r.eee_record_url,
147
  CAST(to_json(r.eval_library) AS VARCHAR) AS eval_library,
148
  CAST(to_json(r.aggregate_components) AS VARCHAR) AS aggregate_components,
149
  CAST(to_json(r.evalcards_annotations) AS VARCHAR) AS evalcards_annotations,
 
560
  source_metadata: sourceMetadataFromRow(row),
561
  source_data: sourceDataFromRow(row),
562
  source_record_url: optionalString(row.source_record_url),
563
+ eee_record_url: optionalString(row.eee_record_url),
564
  aggregate_components: asArray<NonNullable<ModelResultForBenchmark["aggregate_components"]>[number]>(
565
  aggregateComponents
566
  ),
tests/view-data.test.ts CHANGED
@@ -268,6 +268,7 @@ async function writeSyntheticStageJSnapshot(snapshotDir: string) {
268
  dataset_version := 'v1'
269
  ) AS source_data,
270
  'https://example.test/record.json' AS source_record_url,
 
271
  struct_pack(name := 'openai-evals', version := '1.0', fork := NULL::VARCHAR) AS eval_library,
272
  ['first_party']::VARCHAR[] AS evaluator_relationships,
273
  true AS has_first_party,
 
268
  dataset_version := 'v1'
269
  ) AS source_data,
270
  'https://example.test/record.json' AS source_record_url,
271
+ 'https://example.test/eee-record.json' AS eee_record_url,
272
  struct_pack(name := 'openai-evals', version := '1.0', fork := NULL::VARCHAR) AS eval_library,
273
  ['first_party']::VARCHAR[] AS evaluator_relationships,
274
  true AS has_first_party,