exp48: validate the aboutness judge on negatives too (smoke only checked yes-cases)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EandClaude Opus 5.5 committed 2026-10-02 11:47:09 -04:00
1 parent 01145acf45
commit 44546f462c
2 files changed
+22 -12

No files matched your search

+4 -1
View File
@@ -51,7 +51,10 @@ about *cryptocurrency*?" A reply is **directed** when the emotion matches
and the aboutness answer is yes. Before any steered text is scored, the and the aboutness answer is yes. Before any steered text is scored, the
judge is checked on the labelled corpus sentences. If it gets under 80% judge is checked on the labelled corpus sentences. If it gets under 80%
right on emotion or subject, judge-based outcomes are reported as right on emotion or subject, judge-based outcomes are reported as
unreliable and keyword counts become primary. Keyword counts and unreliable and keyword counts become primary. (Added after the smoke run,
before the full run: the aboutness question is also checked on sentences
where the right answer is "no", since the smoke check only covered "yes"
cases, which a yes-biased judge would also pass.) Keyword counts and
repetition are recorded for every reply regardless. repetition are recorded for every reply regardless.
## Pre-registered hypotheses ## Pre-registered hypotheses
+18 -11
View File
@@ -385,25 +385,32 @@ def main():
for (e, t), sents in JOINT.items(): for (e, t), sents in JOINT.items():
for s in sents[:5]: for s in sents[:5]:
val.append((s, e, t, e, t, True)) val.append((s, e, t, e, t, True))
for e, sents in EMOTION.items(): # aboutness negatives: the pair's question asked of emotion-only and
for s in sents[:3]: # subject-only sentences, where the right answer is "no" (added after the
val.append((s, e, "other", e, None, None)) # smoke run showed about-yes 1.00 on positives only, which a yes-biased
for t, sents in SUBJECT.items(): # judge would also score)
for s in sents[:3]: for e, t in JOINT:
val.append((s, "none", t, None, None, None)) for s in EMOTION[e][:3]:
val.append((s, e, "other", e, t, False))
for s in SUBJECT[t][:3]:
val.append((s, "none", t, e, t, False))
for s in LAY_EGG[:5]: for s in LAY_EGG[:5]:
val.append((s, "none", "egg", None, None, None)) val.append((s, "none", "egg", None, None, None))
vrows = [] vrows = []
for s, e_lab, t_lab, e_q, t_q, _ in val: for s, e_lab, t_lab, e_q, t_q, about_lab in val:
j = judge(s, e_q, t_q if t_q else None) j = judge(s, e_q, t_q if t_q else None)
vrows.append(dict(text=s, emotion_label=e_lab, subject_label=t_lab, **j)) vrows.append(dict(text=s, emotion_label=e_lab, subject_label=t_lab,
about_label=about_lab, **j))
acc_e = float(np.mean([r["emotion"] == r["emotion_label"] for r in vrows])) acc_e = float(np.mean([r["emotion"] == r["emotion_label"] for r in vrows]))
acc_t = float(np.mean([r["subject"] == r["subject_label"] for r in vrows])) acc_t = float(np.mean([r["subject"] == r["subject_label"] for r in vrows]))
acc_about = float(np.mean([r["about"] for r in vrows if "about" in r])) acc_about = float(np.mean([r["about"] for r in vrows if r.get("about_label") is True]))
about_no = float(np.mean([not r["about"] for r in vrows if r.get("about_label") is False]))
validation = dict(n=len(vrows), emotion_acc=acc_e, subject_acc=acc_t, validation = dict(n=len(vrows), emotion_acc=acc_e, subject_acc=acc_t,
about_yes_on_joint=acc_about, passed=acc_e >= 0.8 and acc_t >= 0.8, rows=vrows) about_yes_on_joint=acc_about, about_no_on_controls=about_no,
passed=acc_e >= 0.8 and acc_t >= 0.8, rows=vrows)
(out / "judge_validation.json").write_text(json.dumps(validation, indent=1)) (out / "judge_validation.json").write_text(json.dumps(validation, indent=1))
print(f"judge validation: emotion {acc_e:.2f}, subject {acc_t:.2f}, about-yes {acc_about:.2f}", flush=True) print(f"judge validation: emotion {acc_e:.2f}, subject {acc_t:.2f}, about-yes {acc_about:.2f}, "
f"about-no {about_no:.2f}", flush=True)
def record(row): def record(row):
with (out / "generations.jsonl").open("a") as f: with (out / "generations.jsonl").open("a") as f: