MLflow 3 GenAI agent evaluation. Use when writing mlflow.genai.evaluate() code, creating @scorer functions, using built-in scorers (Guidelines, Correctness, Safety, RetrievalGroundedness), building eval datasets from traces, setting up trace ingestion and production monitoring, aligning judges with MemAlign from domain expert feedback, or running optimize_prompts() with GEPA for automated prompt improvement.
Use when writing mlflow.genai.evaluate() code, creating @scorer functions, using built-in scorers (Guidelines, Correctness, Safety, RetrievalGroundedness), building eval datasets from traces, setting up trace ingestion and production monitoring, aligning judges with MemAlign from domain expert feedback, or running optimize_prompts() with GEPA for automated prompt improvement.
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
For comparing agent versions and finding regressions.
Step
Action
Reference Files
1
Establish baseline
patterns-evaluation.md (Pattern 4: named runs)
2
Run current version
patterns-evaluation.md (Pattern 1)
3
Compare metrics
patterns-evaluation.md (Patterns 6-7)
4
Analyze failing traces
patterns-trace-analysis.md (Pattern 7)
5
Debug specific failures
patterns-trace-analysis.md (Patterns 8-9)
Workflow 5: Custom Scorer Development
For creating project-specific evaluation metrics.
Step
Action
Reference Files
1
Understand scorer interface
CRITICAL-interfaces.md (Scorer section)
2
Choose scorer pattern
patterns-scorers.md (Patterns 4-11)
3
For multi-agent scorers
patterns-scorers.md (Patterns 13-16)
4
Test with evaluation
patterns-evaluation.md (Pattern 1)
Workflow 6: Unity Catalog Trace Ingestion & Production Monitoring
For storing traces in Unity Catalog, instrumenting applications, and enabling continuous production monitoring.
Step
Action
Reference Files
1
Link UC schema to experiment
patterns-trace-ingestion.md (Patterns 1-2)
2
Set trace destination
patterns-trace-ingestion.md (Patterns 3-4)
3
Instrument your application
patterns-trace-ingestion.md (Patterns 5-8)
4
Configure trace sources (Apps/Serving/OTEL)
patterns-trace-ingestion.md (Patterns 9-11)
5
Enable production monitoring
patterns-trace-ingestion.md (Patterns 12-13)
6
Query and analyze UC traces
patterns-trace-ingestion.md (Pattern 14)
Workflow 7: Judge Alignment with MemAlign
For aligning an LLM judge to match domain expert preferences. A well-aligned judge improves every downstream use: evaluation accuracy, production monitoring signal, and prompt optimization quality. This workflow is valuable on its own, independent of prompt optimization.
Step
Action
Reference Files
1
Design base judge with make_judge (any feedback type)
patterns-judge-alignment.md (Pattern 1)
2
Run evaluate(), tag successful traces
patterns-judge-alignment.md (Pattern 2)
3
Build UC dataset + create SME labeling session
patterns-judge-alignment.md (Pattern 3)
4
Align judge with MemAlign after labeling completes
patterns-judge-alignment.md (Pattern 4)
5
Register aligned judge to experiment
patterns-judge-alignment.md (Pattern 5)
6
Re-evaluate with aligned judge (baseline)
patterns-judge-alignment.md (Pattern 6)
Workflow 8: Automated Prompt Optimization with GEPA
For automatically improving a registered system prompt using optimize_prompts(). Works with any scorer, but paired with an aligned judge (Workflow 7) gives the most domain-accurate signal. For the full end-to-end loop combining alignment and optimization, see user-journeys.md Journey 10.
Data format:{"inputs": {"query": "..."}} (nested structure required)
predict_fn: Receives **unpacked kwargs (not a dict)
MemAlign: Scorer-agnostic (works with any feedbackvaluetype -- float, bool, categorical); token-heavy on the embedding model so set embedding_model explicitly
Label schema name matching: The label schema name in the labeling session MUST match the judge name used in evaluate() for align() to pair scores
Aligned judge scores: May be lower than unaligned judge scores -- this is expected and means the judge is now more accurate, not that the agent regressed
GEPA optimization dataset: Must have both inputs AND expectations per record (different from eval dataset)
Episodic memory: Lazily loaded -- get_scorer() results won't show episodic memory on print until the judge is first used
optimize_prompts: Requires MLflow >= 3.5.0
See GOTCHAS.md for complete list.
Related Skills
[databricks-docs](../databricks-docs/SKILL.md) - General Databricks documentation reference
[databricks-model-serving](../databricks-model-serving/SKILL.md) - Deploying models and agents to serving endpoints
[databricks-agent-bricks](../databricks-agent-bricks/SKILL.md) - Building agents that can be evaluated with this skill
[databricks-python-sdk](../databricks-python-sdk/SKILL.md) - SDK patterns used alongside MLflow APIs
[databricks-unity-catalog](../databricks-unity-catalog/SKILL.md) - Unity Catalog tables for managed evaluation datasets