Judge Calibration and Meta-Evaluation › Per-Slice Agreement

Michael BrenndoerferDecember 1, 20262 min read
Language AI HandbookAll chapters
Part 57 of 67Dynamic, Interactive, and Agentic Evaluation
Chapter 438Judge Calibration and Meta-Evaluation › Per-Slice Agreement
Reading section 12 of 20 · Per-Slice Agreement · 2 minSection 12 of 20 · 2 min

Section 12 of 20 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Break agreement down by absolute length gap. The small bucket includes a gap of zero. Report the number of comparisons that contributed to each coefficient.

PythonIn [12]
CollapseExpand
fixture["len_bucket"] = pd.cut(
    fixture["len_diff"].abs(),
    bins=[-1, 50, 200, 1e9],
    labels=["small", "medium", "large"],
)

slice_rows = []
for j in ["A", "B", "C"]:
    for b, sub in fixture.groupby("len_bucket", observed=True):
        reference = sub["ref_majority"]
        choice = sub[f"judge_{j}"]
        paired = reference.notna() & choice.notna()
        slice_rows.append(
            {
                "judge": j,
                "len_bucket": b,
                "kappa": cohen_kappa(reference, choice),
                "decided": int(paired.sum()),
                "offered": len(sub),
            }
        )

slice_df = pd.DataFrame(slice_rows)
slice_df.pivot(index="judge", columns="len_bucket", values="kappa")
ConsoleOut [13]
CollapseExpand
judge len_bucket  decided  offered  kappa
    A      small      135      143  0.670
    A     medium      298      309  0.584
    A      large      143      148  0.526
    B      small      138      143  0.509
    B     medium      294      309  0.581
    B      large      138      148  0.459
    C      small      138      143  0.590
    C     medium      297      309  0.366
    C      large      147      148  0.127

The bucket comparison describes agreement at small, medium, and large length gaps. Check the counts in each bucket. In this fixture, the length mechanism is known because it was explicitly assigned to C.

The plot shows the kappa column from the table. The decided column gives its denominator, and the offered column shows the total comparisons in the bucket. We already have slice_df with one row per judge and length bucket, so the figure only renders those precomputed values.

PythonIn [14]
CollapseExpand
# Reshape the per-slice kappa table into a judge-by-bucket matrix for plotting.
slice_pivot = slice_df.pivot(
    index="judge", columns="len_bucket", values="kappa"
)
slice_pivot = slice_pivot[["small", "medium", "large"]]
VisualizationOut [15]
CollapseExpand
Grouped kappa bars for three judges across small, medium, and large length gaps. Solid, diagonal, and crosshatched bars distinguish judges.
Cohen's kappa between each judge and the reference panel, stratified by the absolute length difference between the two candidates. The chart compares small, medium, and large length gaps rather than pooling their agreement.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy