In See What Thumbs Up Misses, v5-sure collected more thumbs up than v5, while fewer hikers got an answer and the graded pass rate didn’t rise. A rating records how an answer felt to the hiker, and it can’t tell you whether the answer was right. It still points to a trace you can read.
In this lesson, you’ll draw a weekly sample of rated and unrated traces, label what went wrong, and turn each bad answer into an eval case that every later version must pass. Start with which traces to read.
Draw a Weekly Review Sample
You can’t read every kept trace, and complaints alone skew the view, since most hikers never rate. So the review reads every answer a hiker asked about again or handed to a warden, regardless of its rating, and every thumbs-down. It reads a fifth of the thumbs up and half of the sample traces. A sample trace won the one-in-ten draw and records an answer with no signal, error, or flag. Each one stands for ten answers like it.
Save scripts/review.js, reusing lines() and all() from scripts/count-feedback.js:
scripts/review.js
import { existsSync, mkdirSync, readFileSync, readdirSync,
writeFileSync } from "node:fs";
const SHARE = { down: 1, implicit: 1, up: 0.2, unrated: 0.5 };
const lines = (file) => readFileSync(file, "utf8").split("\n")
.filter(Boolean).map((line) => JSON.parse(line));
const all = (dir) => (existsSync(dir)
? readdirSync(dir).flatMap((f) => lines(`${dir}/${f}`)) : []);
const [since] = process.argv.slice(2);
if (!/^\d{4}-\d{2}-\d{2}$/.test(since)) {
throw new Error("Usage: node scripts/review.js 2026-10-12");
}
const until = new Date(Date.parse(since) + 7 * 86_400_000)
.toISOString().slice(0, 10);
const file = `review/${since}.jsonl`;
Collect each kept trace’s reports, failed checks, version, question fields, and streamed answer. The path on the streamAnswer span says how the hiker was answered, and a trace with only a handoff span never reached the model:
scripts/review.js
const traces = new Map();
for (const s of all("traces")) {
const t = traces.get(s.traceId) ?? { traceId: s.traceId,
kept: s.kept, day: s.start.slice(0, 10), path: null };
if (s.name === "retrieve") t.chunks = s.chunks;
if (s.name === "checks") t.failed = s.failed;
if (s.name === "handoff") t.path ??= "handoff";
if (s.name === "streamAnswer") t.path = s.path ?? "failed";
if (s.name === "model" && s.request?.stream) {
t.version = s.promptVersion;
t.asked = s.asked;
t.answer = s.output;
}
traces.set(s.traceId, t);
}
Then join the feedback to those traces. A late untraced rating still counts when its trace is on disk, say because it won the draw. A repeat or handoff makes the group implicit whatever the thumbs say. Otherwise, the latest thumbs rating wins. Signals with no trace on disk are only counted:
scripts/review.js
const groups = new Map();
let missing = 0;
for (const f of all("feedback")) {
if (f.kind === "left") continue;
if (!traces.has(f.traceId)) {
const day = f.time.slice(0, 10);
if (day >= since && day < until) missing += 1;
continue;
}
if (groups.get(f.traceId) === "implicit") continue;
groups.set(f.traceId,
f.kind === "thumbs" ? f.value : "implicit");
}
Only an answer the model wrote can be graded. So draw() keeps traces whose path is the answer or fast role, and it counts the rest by path, such as handoffs and cache hits. A cache hit’s text is in its first trace. Each reviewable trace gets a Math.random() draw against its group’s share. A trace with failed checks is labeled blocked at once, since that hiker saw the latest reports instead:
scripts/review.js
const REVIEWABLE = ["answer", "fast"];
function draw() {
const week = [...traces.values()]
.filter((t) => t.day >= since && t.day < until)
.map((t) => ({ group: groups.get(t.traceId)
?? (t.kept === "sample" ? "unrated" : null), ...t }))
.filter((t) => t.group);
const pool = week.filter((t) =>
REVIEWABLE.includes(t.path) && t.answer);
const skipped = {};
for (const t of week.filter((t) => !pool.includes(t))) {
const path = t.path ?? "no answer";
skipped[path] = (skipped[path] ?? 0) + 1;
}
const picked = pool.filter((t) =>
Math.random() < SHARE[t.group]);
mkdirSync("review", { recursive: true });
const rows = picked.map((t) => JSON.stringify({ ...t,
label: t.failed?.length ? "blocked" : null }));
writeFileSync(file, rows.join("\n") + "\n");
for (const g of Object.keys(SHARE)) {
const n = (list) => list.filter((t) => t.group === g).length;
console.log(`${g}: ${n(picked)} of ${n(pool)} to review`);
}
console.log("no model answer:", skipped);
console.log(`signals with no kept trace: ${missing}`);
}
Once the week’s file exists, the script counts your labels instead, so a second run never draws over your work: