Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

LangChain 11 min read How-to mediumAdept

What Is Eval-Driven Development? How to Improve AI Agents

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. A worked example adds a create_ticket tool to an internal docs agent. The average score improves, but a how-to VPN question regresses, and a trace shows the cause is an overly broad tool description. Practical advice includes using code evals for deterministic checks and LLM judges otherwise, keeping a held-out set to detect overfitting, running fast checks in CI and slower judges nightly, and turning production failures into new dataset examples.

Assumes: LLM tool callingtest-driven development

Related posts

  • The Most Common Questions About Agent Evals, Answered

    LangChain mediumAdept

    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. Offline evals compare versions against datasets before shipping, while online evals score sampled production traces without reference outputs. Use code evaluators where possible, LLM judges with narrow binary questions calibrated against human review, and pairwise comparison for choosing variants. Container-based benchmarks like Terminal-Bench (run via the open-source Harbor harness) score the end state of an environment for long multi-step tasks, and online costs can be controlled through sampling, filters, code checks and cheaper judge models.

  • Demystifying evals for AI agents

    Anthropic Engineering mediumAdept

    Agent evaluations should grade both the final environment outcome and the full transcript of tool calls, turns and reasoning, because multi-turn agents modify state and compound mistakes. The post lays out a practical structure—tasks, trials, graders, harnesses and suites—with code-based graders for deterministic checks, model-based graders for nuanced rubrics and human graders for calibration. It recommends capability evals that start at low pass rates and regression evals that stay near 100%, and shows coding and conversational agent examples that combine unit tests, state checks, LLM rubrics and tool-call assertions. The takeaway is to build an eval suite early: it clarifies success criteria, enables fast model upgrades and provides baselines for latency, token usage, cost and error rates.

  • Agents are users, so your software needs evals

    Vercel mediumAdept

    Agents act as users of APIs, CLIs, MCP servers and SDKs, so measuring whether they complete tasks correctly requires evals: tests run many times and scored. An agentic testing pyramid groups checks by LLM call count (deterministic tests, one-turn evals, E2E evals), and a worked example builds an end-to-end eval for a hypothetical coffee-ordering CLI using Harbor, covering goal setting, task design with seeded environments, frozen clocks and per-constraint verifiers, and guarding against reward hacking. Metric choice should follow failure cost: a 60% success rate yields 99% pass@5 but only 8% pass^5, so products where users get no retry should optimize for pass^k, while coding agents with test feedback can lead with pass@k.

  • The Art of Loop Engineering

    LangChain easyNovice

    Agent systems can be structured as four stacked loops: the basic agent loop (model calls tools until done), a verification loop where a deterministic or LLM grader checks output against a rubric and retries with feedback, an event-driven loop where crons, webhooks or Slack channels trigger background runs, and a hill-climbing loop where an analysis agent mines production traces to rewrite prompts, tools or graders. Each level maps to a LangChain primitive (create_agent, RubricMiddleware, LangSmith Deployment triggers or Fleet channels, LangSmith Engine), illustrated with an internal docs-writing agent. Verification trades extra latency and cost for quality, and human-in-the-loop checkpoints are recommended at every level for sensitive actions. The argument is that compounding value lies in the outer event and improvement loops.

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

    Dropbox Tech mediumAdept

    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.

The quest for software engineering knowledge.

Look:
Layout: