How we optimized Dash's relevance judge with DSPy

Eric Wang, Dmitriy Meyerzon17 Mar 2026

Problem

Dropbox Dash uses an LLM judge that rates how relevant a document is to a query on a 1-5 scale. The judge feeds ranking, training-data generation and offline evaluation. The best judge ran on o3 and tracked human ratings well, but cost too much for the volume of pairs Dash needed to label. The prompt tuned for o3 lost quality on a cheaper open model, and rewriting it by hand took weeks and caused regressions in unexpected cases.

Example from the article: the o3 prompt lost quality on gpt-oss-120b.

Solution in brief

Fix the task, the human-labeled dataset and one metric (normalized mean squared error against human ratings, with broken JSON counted as wrong). Let DSPy search for prompts against that metric, using the human and model explanations of each disagreement as feedback. For a strong production judge, restrict the search to choosing among short instruction bullets distilled from human explanations.

Questions this case answers
  • How to adapt an LLM grader prompt to a cheaper model so that its scores still match human ratings
  • How to make a small model emit valid structured output when invalid outputs count as errors
  • How to improve a critical production prompt in small, testable steps instead of a full rewrite
  • How to move an LLM relevance judge to a cheaper model without losing agreement with human raters?

Tools and methods

  • DSPy — framework that optimizes prompts against a defined task, dataset and metric.
  • GEPA — DSPy optimizer that revises the prompt from textual feedback on each disagreement.
  • MIPROv2 — DSPy optimizer, run on gemma-3-12b and compared with GEPA.
  • gpt-oss-120b, gemma-3-12b — cheaper target models for the judge; the 12b model stress-tests output format.
  • Normalized mean squared error (NMSE) — disagreement with human ratings on a 0-100 scale, lower is better.
Continue reading — it's free

Google or a one-time email code. No password.