How we used DSPy to turn AI evaluations into better responses in Dash chat

Simran Jumani, Dmitriy Meyerzon25 Jun 2026

Problem

Dropbox's Dash chat agent answers questions from documents, messages and meetings. LLM judges score its whole trajectory, not only the final answer. Nobody can trust those judges until they agree with human reviewers. The agent's system prompt was also tuned by hand: engineers read failures, edited the prompt and retested, which was hard to scale and could not show reliably that a change improved production quality.

Example from the article: the agent produced incomplete answers and missed key aspects of user requests, and a judge that over-scored answers built on outdated information would need its instructions corrected.

Solution in brief

First calibrate each judge against a small set of human-labeled chats, using DSPy optimizers (GEPA, MIPROv2) to rewrite the judge prompt until it matches the humans. Then use the calibrated judges as the scorer in a loop: replay historical chats with a candidate agent prompt, score the outputs, and give scores and judge reasoning to GEPA to propose the next prompt.

Questions this case answers
  • How to calibrate an automated LLM grader against a small set of human-labeled examples so its scores can be trusted as an optimization signal
  • How to optimize the instructions of a multi-step LLM agent using replayed historical requests and automated scoring instead of manual prompt edits
  • How to make an LLM judge agree with human reviewers before trusting its scores?
  • How to improve an agent's system prompt automatically instead of by manual trial and error?

Tools and methods

  • DSPy — open-source framework that optimizes prompts from evaluation feedback
  • GEPA — DSPy algorithm that proposes the next prompt from scores and textual feedback
  • MIPROv2 — DSPy algorithm used to improve judge prompts
  • LLM-as-a-judge — scores the agent's trace and answer on a rubric
  • Human labeling — benchmark scores, notes and failure codes
  • Counterfactual replay — reruns historical chats with a candidate prompt
Continue reading — it's free

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