Strengthens the Benchmark Submissions code-forward evidence with real artifacts instead of pitch-deck claims alone, per owner direction: - hackathons/geekroom-2026/demo.mp4 (+poster.png, raw demo-raw.webm) — a real Playwright-driven Chromium screen recording against an actual running `npm run dev`: create a real API key, submit two real answer sources through the live /submit-model form, scroll to the real /leaderboard rows showing the computed scores. No staged footage. - A second, genuinely different example submission: "uniform-baseline-v1" (generate-baseline-submission.ts), a content-blind uninformed baseline that never imports the scoring engine and never reads gold-suite expected answers (no test-set leakage, not a disguised system-one replay). Scored 35.0% accuracy / 13.1% strict pass / 0.027 ECE vs system-one-replay's 85.6% / 100.0% / 0.096 — both now real "Community submitted" rows on /leaderboard, proving the platform scores more than one self-referential submission. - generate-system-one-replay.ts saves the previously ad-hoc 93-case system-one replay payload as a reusable fixture for the demo and judges. No changes to benchmark-scoring.ts / benchmark-submissions.server.ts / outbound-guard.server.ts. Verified: npm run typecheck clean, npm test 138/138 passing (1 pre-existing skip, unchanged), npm run gold 61/61 unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
92 lines
3.7 KiB
TypeScript
92 lines
3.7 KiB
TypeScript
/**
|
|
* Build a REAL, genuinely different example submission for the Benchmark
|
|
* Submissions leaderboard: "uniform-baseline-v1".
|
|
*
|
|
* Why this exists: the one submission the hackathon write-up had verified
|
|
* end-to-end (see HACKATHON-SUBMISSION.md / plans/geekroom-hackathon.md,
|
|
* 2026-11-07) replayed `system-one`'s OWN answers through the external
|
|
* submission path — proof the plumbing reproduces `evalGold()` exactly, but
|
|
* not proof a genuinely different third-party model can use the platform.
|
|
*
|
|
* `uniform-baseline-v1` is content-blind: it never reads `state`, never
|
|
* imports the scoring engine (`engine.ts`), and never looks at the gold
|
|
* suite's expected answers (`expect`) — it would be dishonest to "tune" a
|
|
* baseline to the test set it's being scored on. For every question it
|
|
* answers with the structurally "least informative" response and reports
|
|
* confidence that honestly matches having zero real signal:
|
|
* - choice: the alphabetically-first criteria key, uniform probabilities
|
|
* (1/N each), confidence 1/N (exactly what an uninformed guess over N
|
|
* options should claim).
|
|
* - noul: 0.5 (maximal uncertainty on the true/false axis).
|
|
* - score: the midpoint band index, uniform probabilities over bands.
|
|
*
|
|
* This is the standard ML "uninformed / majority-class-shaped" baseline
|
|
* pattern — a real, honest, independently-computed answer source, not a
|
|
* disguised copy of `system-one`. Expect LOW accuracy (it has no real
|
|
* signal) but a calibration profile that should look reasonable (confidence
|
|
* tracks the real uninformed-guess accuracy rate), which is exactly the
|
|
* kind of contrast a benchmarking platform for agents should be able to show
|
|
* side-by-side with a competent model.
|
|
*
|
|
* Usage:
|
|
* node --experimental-strip-types hackathons/geekroom-2026/generate-baseline-submission.ts
|
|
* Writes hackathons/geekroom-2026/uniform-baseline-v1-answers.json, the exact
|
|
* map-shaped payload /submit-model's "answers" textarea accepts
|
|
* ({"<case id>": {"<question id>": Answer}}).
|
|
*/
|
|
import { writeFileSync } from "node:fs";
|
|
import { dirname, join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { GOLD } from "../../src/lib/jev/gold.ts";
|
|
import type { Answer, EntryType, Question } from "../../src/lib/jev/types.ts";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
|
function uniformAnswer(q: Question): Answer {
|
|
if (q.type === "choice") {
|
|
const keys = Object.keys(q.criteria).sort();
|
|
const n = keys.length || 1;
|
|
const p = 1 / n;
|
|
const probabilities: Record<string, number> = {};
|
|
for (const k of keys) probabilities[k] = p;
|
|
return {
|
|
type: "choice",
|
|
choice: keys[0] ?? "",
|
|
probabilities,
|
|
confidence: p,
|
|
};
|
|
}
|
|
if (q.type === "score") {
|
|
const n = q.criteria.length || 1;
|
|
const legend: Record<string, EntryType> = {};
|
|
const probabilities: Record<string, number> = {};
|
|
const p = 1 / n;
|
|
q.criteria.forEach((c, i) => {
|
|
legend[String(i)] = c;
|
|
probabilities[String(i)] = p;
|
|
});
|
|
return {
|
|
type: "score",
|
|
score: (n - 1) / 2,
|
|
legend,
|
|
probabilities,
|
|
confidence: p,
|
|
};
|
|
}
|
|
// noul: maximal uncertainty, no claimed signal either way.
|
|
return { type: "noul", noul: 0.5 };
|
|
}
|
|
|
|
const payload: Record<string, Record<string, Answer>> = {};
|
|
for (const g of GOLD) {
|
|
const perCase: Record<string, Answer> = {};
|
|
for (const [qid, q] of Object.entries(g.questions)) {
|
|
perCase[qid] = uniformAnswer(q);
|
|
}
|
|
payload[g.id] = perCase;
|
|
}
|
|
|
|
const outPath = join(__dirname, "uniform-baseline-v1-answers.json");
|
|
writeFileSync(outPath, JSON.stringify(payload, null, 2) + "\n");
|
|
console.log(`Wrote ${Object.keys(payload).length} cases to ${outPath}`);
|