Databricks Generative AI Engineer Associate · Section 6 · 12% of the exam
Identify evaluation judges that require ground truth
One of the objectives of the Databricks Certified Generative AI Engineer Associate exam, in the section “Evaluation and Monitoring”. Here is what it covers, the points to remember and a question to try.
What it covers
MLflow 3 evaluates an agent by running it over an evaluation dataset, capturing a trace for every call and applying scorers to each trace. This lesson covers tracing with span types, mlflow.genai.evaluate(), the built-in LLM judges and which of them need ground truth, and the three ways to build custom scorers: guidelines, make_judge() and @scorer functions.
Points to remember
- MLflow 3 GenAI evaluation (
mlflow.genai.evaluate) replaces MLflow 2 Agent Evaluation (mlflow.evaluate(model_type="databricks-agent")). - Direct evaluation passes
predict_fn, which receives the keys ofinputsas keyword arguments and must produce one trace per call. Answer-sheet mode passes precomputed outputs or traces. - Evaluation results appear as an evaluation run in the experiment (Evaluation runs tab).
results.metricsholds aggregates such ascorrectness/mean. - Retrieval judges (
RetrievalGroundedness,RetrievalRelevance,RetrievalSufficiency) need aRETRIEVERspan whose outputs are documents withpage_content. - Ground truth is required by
Correctness(expected_factsorexpected_response) andRetrievalSufficiency, and byToolCallCorrectnessin Databricks' table.ExpectationsGuidelinesneeds per-row guidelines.
Try a question
In an evaluation dataset for a returns agent, each row has its own rule: for example, 'must mention the 30-day window' for one question and 'must not offer a refund for gift cards' for another. Which built-in judge applies each row's own rule?
- A
Guidelines, configured once with every rule from the dataset - B
Correctness, with the rules supplied asexpected_response - C
RelevanceToQuery, which reads the rule from the user's question text - D
ExpectationsGuidelines, with rules in each row'sexpectations
Show the answer
D. ExpectationsGuidelines judges a response against per-example guidelines stored in that row's expectations (the guidelines key). Guidelines applies the same rules to every row, so answers would be judged against rules written for other questions.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Evaluating Agents with MLflow: Tracing, Judges and Custom Scorers teaches this objective (about 55 minutes), and 8 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Select an LLM choice (size and architecture) based on a set of quantitative evaluation metrics
- Select key metrics to monitor for a specific LLM deployment scenario
- Evaluate agent performance using MLflow scoring and tracing
- Use inference logging to assess deployed RAG application performance
- Use Databricks features to control LLM costs
- Use inference tables and Agent Monitoring to track a live LLM endpoint
- Use AI Gateway (Inference Tables, Usage Tables, and rate limiting) to track an LLM or agent deployed via Agent Framework
- Use Databricks custom Scorers for evaluating agents and LLMs
- Incorporate SME feedback to improve agent performance