Evaluation Harnesses and Reproducibility › Checking Whether Outputs Repeat

Michael BrenndoerferDecember 1, 20262 min read
Language AI HandbookAll chapters
Part 57 of 67Dynamic, Interactive, and Agentic Evaluation
Chapter 436Evaluation Harnesses and Reproducibility › Checking Whether Outputs Repeat
Reading section 8 of 18 · Checking Whether Outputs Repeat · 2 minSection 8 of 18 · 2 min

Section 8 of 18 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Keep the request inputs fixed. Compare two calls on the same mock backend, then change only its identifier as a controlled test of unrecorded backend variation.

The rate is the fraction of full responses that match byte for byte. A formatting difference can reduce byte agreement even when the grader gives both responses the same score. Report these two outcomes independently.

PythonIn [21]
CollapseExpand
def replay_rate(
    model, prompt, grader, temperature, items, first_backend, second_backend
):
    if not items:
        raise ValueError("Replay requires at least one item.")
    first = run_eval(model, prompt, grader, temperature, items, first_backend)
    second = run_eval(model, prompt, grader, temperature, items, second_backend)
    identical = sum(
        a.response == b.response for a, b in zip(first, second, strict=True)
    )
    return identical / len(items), len(items)


same_backend, k = replay_rate(
    model_a,
    prompt,
    grader,
    model_a_cfg.temperature,
    dataset,
    "mock-backend-1",
    "mock-backend-1",
)
changed_backend, _ = replay_rate(
    model_a,
    prompt,
    grader,
    model_a_cfg.temperature,
    dataset,
    "mock-backend-1",
    "mock-backend-2",
)
ConsoleOut [22]
CollapseExpand
Replay with pinned mock backend: 100.0% of 8
Replay after backend change, same seed and temperature: 62.5% of 8

Exact byte agreement holds when all mock inputs are unchanged. With a different backend identifier, the report measures an observed response agreement for those same tasks and seed. A deployed service may expose less of its execution state. Re-run it under named settings and keep byte agreement separate from changes in scored answers.

Seed is a hint, not a guarantee

A seed controls only randomness that a particular implementation ties to it. Record the remaining settings and measure repeated output agreement. This check does not turn the seed into a cross-runtime guarantee.

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