Skip to content
mentoor

Topic 3 of 5 · 5 min read

Running judges on live traffic

Goal: Set up sampled online judging with an alert rule and check that it respects cost and privacy limits.

Run judges on a sample of live traces, after the response is sent, and alert on the trend, not on single scores. An online judge is an automated check, often an LLM with a rubric, that scores real production outputs. It gives you a quality signal on all the traffic users will never rate.

Check yourself · 1 of 3

Where should an LLM judge for production quality scoring run?

Choose one answer

Why it matters

Offline datasets go stale. Online judging finds failures your dataset never contained, and it detects drift when a provider changes a model or your inputs shift. It must not slow users down or leak data, so the design matters.

How to set it up

  1. Make it asynchronous. The user's response returns first. A queue or background worker reads the finished trace and scores it. Blocking checks belong to guardrails, not evals.
  2. Sample. Judge a fixed share, for example 5%, plus every trace that was flagged (thumbs-down, guardrail hit, escalation). Sampling caps cost and keeps the flagged ones.
  3. Use the same rubric as offline. A judge that you validated against human labels offline is reusable. A new, unvalidated judge online only adds noise.
  4. Store scores on the trace with the judge version, so a score change can be told apart from a judge change.
  5. Alert on aggregates. Compare a rolling window to a baseline: fire when the pass rate drops more than 5 points over 24 hours with at least 200 judged traces.
  6. Respect privacy. Redact personal data before it reaches the judge, check the provider's data-retention terms, and keep judge inputs inside the same retention rules as the traces.
SAMPLE_RATE = 0.05
MAX_JUDGE_USD_PER_DAY = 40

def should_judge(trace, spend_today):
    if spend_today >= MAX_JUDGE_USD_PER_DAY:
        return False
    if trace.flagged:          # thumbs-down, guardrail hit, escalation
        return True
    return random.random() < SAMPLE_RATE

def judge(trace):
    text = redact_pii(trace.output)
    score = run_rubric(text, rubric="groundedness-v3")
    save_score(trace.id, "groundedness", score, judge_version="v3")

What goes wrong

  • Unvalidated judges. If you never checked the judge against human labels, a falling score may be the judge, not the product.
  • Judging inline. Adding a judge call to the request path doubles latency and cost.
  • No budget cap. Traffic spikes turn a 5% sample into a large bill.
  • Alerting on noise. One bad score is not drift. Use a window, a minimum count and a baseline.
  • Sending raw user data to a third-party judge without redaction or a contract that allows it.

Examples

Drift caught after a provider update

Judged groundedness sits near 91% for weeks, then falls to 82% over two days with 600 judged traces in the window. Nothing in the code changed. The model version behind the API alias had been updated. The alert fires, the team pins the older version and opens failing traces to add to the dataset.

A judge that was the problem

Scores drop 10 points the day someone edits the judge rubric. The judge version stored with each score shows the change. The product was fine; the judge became stricter.

Key points

  • Score traces asynchronously after the response is sent; blocking checks are guardrails, not online evals.
  • Sample a fixed share of traffic and always include flagged traces, and cap daily judge spend.
  • Reuse a judge you validated offline against human labels, and record the judge version with every score.
  • Alert on a rolling window with a minimum sample and a baseline, not on single scores.
  • Redact personal data before judging and keep judge inputs inside your retention rules.

Common mistakes

  • Putting the judge call in the user's request path.
  • Judging every trace with no budget limit.
  • Alerting on a single low score or on a window with too few traces.
  • Sending unredacted user text to an external judge model.

Check yourself · 2 of 3

A judged pass rate falls from 92% to 88% over an hour with 12 judged traces. What is the best response?

Choose one answer

Check yourself · 3 of 3

Which step best protects users' privacy when a third-party model judges production outputs?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic