---
title: "How we used DSPy to turn AI evaluations into better responses in Dash chat"
description: "Dropbox improved its Dash chat agent with a two-stage DSPy loop."
url: "https://swe.quest/articles/how-we-used-dspy-to-turn-ai-evaluations-into-better-responses-in-dash-chat-742eadaf5e0748b5"
canonical: "https://dropbox.tech/machine-learning/how-we-turned-ai-evaluations-into-better-responses-in-dash-chat"
source: "Dropbox Tech"
published: "2026-06-25"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["evals","llms","ai-agents"]
---

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

A post on [Dropbox Tech](https://swe.quest/sources/dropbox.md), published 2026-06-25, 9 min read, Case study. Original: [https://dropbox.tech/machine-learning/how-we-turned-ai-evaluations-into-better-responses-in-dash-chat](https://dropbox.tech/machine-learning/how-we-turned-ai-evaluations-into-better-responses-in-dash-chat)

## Summary

Dropbox improved its Dash chat agent with a two-stage DSPy loop. First, LLM-as-judge evaluators were calibrated against a small set of human-labeled chat traces scored on five dimensions, with reasoning notes and failure codes. The calibrated judges then drove GEPA-based optimization of the agent's system prompt, using offline counterfactual replay of historical internal chats. Launch results included 26% fewer incomplete answers, 13% fewer missed key aspects, 5.4% lower token usage and 9.8% shorter completions. The team stresses guardrails: small targeted prompt edits plus automated checks on prompt structure, caching behavior and size.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)

## Prerequisites

- LLM-as-judge evaluation ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- prompt engineering
- LLM agents and tool calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

DSPy, GEPA, MIPROv2, Dropbox Dash, LLM-as-judge

## Related posts

- [Why human insight is a strategic advantage for building better agents](https://swe.quest/articles/why-human-insight-is-a-strategic-advantage-for-building-better-agents-376e4fe4ac199796.md): LangChain · 2026-11-04 · Easy · 7 min read · Evaluation, AI agents, Observability, LLMs
  Human review of agent traces supplies the domain judgment that automated evals lack, and it works best when reviewers see the full multi-turn conversation rather than an isolated step.
- [Building production-ready agentic systems: Lessons from Shopify Sidekick](https://swe.quest/articles/building-production-ready-agentic-systems-lessons-from-shopify-sidekick-338be221de1210c1.md): Shopify Engineering · 2025-08-26 · Medium · 6 min read · AI agents, Evaluation, Model training, LLMs
  Shopify's Sidekick merchant assistant outgrew a monolithic system prompt once its tool count passed ~50, so the team moved to just-in-time instructions returned alongside tool results, which kept prompt caches intact and improved maintainability and metrics.
- [What Is Eval-Driven Development? How to Improve AI Agents](https://swe.quest/articles/what-is-eval-driven-development-how-to-improve-ai-agents-b74ea0bdd23f7298.md): LangChain · 2026-11-12 · Medium · 11 min read · Evaluation, AI agents, Testing, LLMs
  Eval-driven development adapts test-driven development to non-deterministic agents: write a pass/fail spec for one behavior, build a dataset and evaluator before implementing, run a baseline, then hill-climb by comparing experiments per example.
- [The Most Common Questions About Agent Evals, Answered](https://swe.quest/articles/the-most-common-questions-about-agent-evals-answered-40ebbb294f8cf253.md): LangChain · 2026-10-15 · Medium · 15 min read · Evaluation, AI agents, Observability, LLMs
  Agent evals score agent runs to handle nondeterminism, multiple valid answers and variable execution paths: start by reading traces, pick one behavior, build a 10-20 example dataset from real traces, run a baseline experiment, and fold new failures back in.
- [Aligning LLM-as-a-Judge with Human Preferences](https://swe.quest/articles/aligning-llm-as-a-judge-with-human-preferences-ffa838b947416549.md): LangChain · 2026-08-26 · Easy · 6 min read · Evaluation, LLMs
  LangSmith evaluators now store human corrections to LLM-as-a-Judge scores as few-shot examples, optionally with explanations, and inject them into the judge prompt on later runs so the evaluator aligns with team preferences without manual prompt engineering.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
