Evaluation-Driven Development with MLflow 3.0

Yuki Watanabe from Databricks introduces Evaluation-Driven Development (EDD) as a critical methodology for building production-ready AI agents. This talk explores the five pillars of EDD and demonstrates how MLflow 3.0's new features—including one-line tracing, automated evaluation, human-in-the-loop feedback, and monitoring—provide a comprehensive toolkit to ensure agent quality and reliability.

5 min read
Evaluation-Driven Development with MLflow 3.0
source: https://www.youtube.com/watch?v=7Q2Z9CYvdRc

The number one blocker for deploying agentic AI systems into production is quality. Unlike traditional machine learning models that operate on numeric tensors, LLM-powered agents are non-deterministic, accept free-form user input, and have a multi-faceted definition of quality that goes beyond a single accuracy metric. The complexity of these systems, with many moving pieces like the LLM, vector databases, and search tools, means that updating any single component can unexpectedly break the entire agent.

Evaluation-Driven Development: A New Paradigm

To address this challenge, the industry is converging on a solution called Evaluation-Driven Development (EDD). Conceptually similar to Test-Driven Development (TDD) in software engineering, EDD uses evaluation as the cornerstone of the development lifecycle. This process is built on five key pillars:

  1. Data Collection: Good evaluation requires good data.
  2. Building: The iterative process of writing code and developing the agent through trial and error.
  3. Manual Evaluation: Human-in-the-loop assessment remains a critical step to ensure quality.
  4. Automatic Evaluation: Automating evaluation to scale the process across many agent versions.
  5. Monitoring: Continuously observing the agent’s performance in production to detect regression or concept drift.

MLflow 3.0 has been redesigned to support this entire lifecycle for both classical ML and modern generative AI systems.

The Foundation: Tracing with MLflow 3.0

Tracing is the fundamental observability solution for agentic systems. It captures detailed, structured information about an agent’s execution, including all intermediate steps like LLM calls, tool usage, and framework-specific processes.

  • Observability: A trace visualizes the agent’s execution as a tree, allowing developers to inspect the inputs, outputs, and metadata (e.g., model name, temperature) of each step. This is invaluable for debugging and understanding agent behavior.
  • Effortless Integration: To make tracing easy, MLflow provides one-line automatic tracing integrations for over 20 popular LLM providers and frameworks, including OpenAI, LangChain, DSPy, and LlamaIndex. For instance, with LangGraph, you simply add mlflow.langchain.autolog() to automatically generate detailed traces.
  • Open Standards: MLflow traces conform to the OpenTelemetry standard, the industry’s leading specification for observability. This prevents vendor lock-in, allowing you to use MLflow traces with other platforms like DataDog, Grafana, or LangSmith.

The Five Pillars of EDD in Practice with MLflow

1. Building and Debugging

During the building phase, tracing accelerates the trial-and-error process. When auto-tracing is enabled in a development environment like a notebook, MLflow displays the trace directly in the cell output. This immediate feedback allows developers to see what’s happening inside a framework call, debug data flow between steps, and quickly iterate on the agent’s logic.

2. Manual Evaluation and Human Feedback

Managing feedback, especially from multiple people and across different agent versions, can be chaotic. MLflow simplifies this with two key features:

  • Trace Annotations: You can add assessments directly to a trace in the MLflow UI. This allows for structured feedback on criteria like correctness, relevance, or proper tool usage. The feedback is persisted with metadata, including who provided it, their rationale, and a history of changes.
  • Labeling Sessions: To engage non-technical domain experts, MLflow introduces “Labeling Sessions.” This feature provides a shareable, simplified UI for annotating traces. Stakeholders can receive a direct link, provide their feedback in an easy-to-use interface, and the results are automatically synced back to the corresponding traces without requiring them to navigate the full MLflow environment.

3. Automated Evaluation

To scale the evaluation process, MLflow provides a comprehensive evaluation suite centered around the “LLM-as-a-Judge” concept.

  • Built-in and Custom Judges: The mlflow.evaluate() API allows you to evaluate traces or datasets against various built-in metrics developed by Databricks’ research team. You can also create your own custom judge using natural language prompts.
  • Custom Python Scorers: For more complex or domain-specific criteria, you can define custom evaluation logic in Python. By using a simple decorator, a function can access the model’s inputs, outputs, trace data, and ground-truth labels. This flexibility allows you to calculate metrics like precision and recall on retrieved documents or integrate third-party evaluation libraries like Ragas or Deepchecks.
  • Comprehensive Logging: All evaluation results are logged to the MLflow Tracking server, creating a clear lineage that links prompts, parameters, models, and evaluation scores. The UI allows you to see aggregated metrics and drill down into individual scored traces to diagnose the root cause of failures.

4. Production Monitoring

Static evaluation datasets cannot capture the dynamic nature of real-world user inputs. Production monitoring is essential. With MLflow on Databricks, you can set up a production monitoring system in a few clicks.

  • By enabling MLflow Tracing and configuring the monitoring settings, you can automatically compute metrics on production traffic.
  • You can reuse the same custom scorers defined during offline evaluation, creating a unified quality-assessment framework.
  • The monitoring dashboard displays charts for operational metrics (latency, errors) and the quality metrics you’ve defined. If an issue is spotted, you can click on any data point to view the underlying traces for root cause analysis.

5. Data Collection

Data is the fuel for EDD. As an agent runs in production, new failure modes and edge cases will be discovered. MLflow’s dataset management capabilities allow you to curate and grow your evaluation sets over time. You can create a dataset by selecting specific production traces, such as those with negative user feedback. This new data can then be integrated into your CI/CD pipeline to validate that fixes are effective and to prevent future regressions, closing the loop on the development lifecycle.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

Why Language Models Need a Lesson in Education

Why Language Models Need a Lesson in Education

Stephanie Kirmer, a staff machine learning engineer at DataGrail, adapts her experience as a former professor to address the challenge of evaluating LLMs in production. She proposes a robust methodology using LLM-based evaluators guided by rigorous, human-calibrated rubrics to bring objectivity and scalability to the subjective task of assessing text generation quality.

MLflow 3.0: The Future of AI Agents

MLflow 3.0: The Future of AI Agents

Eric Peter from Databricks outlines the evolution from the traditional MLOps lifecycle to the more complex Agent Ops lifecycle. He details the five essential components of a successful agent development platform and introduces MLflow 3.0, a new release designed to provide a comprehensive, open-standard solution for building, evaluating, and deploying AI agents.