CertLumen

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 of inputs as 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.metrics holds aggregates such as correctness/mean.
  • Retrieval judges (RetrievalGroundedness, RetrievalRelevance, RetrievalSufficiency) need a RETRIEVER span whose outputs are documents with page_content.
  • Ground truth is required by Correctness (expected_facts or expected_response) and RetrievalSufficiency, and by ToolCallCorrectness in Databricks' table. ExpectationsGuidelines needs 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?

  1. AGuidelines, configured once with every rule from the dataset
  2. BCorrectness, with the rules supplied as expected_response
  3. CRelevanceToQuery, which reads the rule from the user's question text
  4. DExpectationsGuidelines, with rules in each row's expectations
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

← Previous objective · All 56 objectives · Next objective →