QuestionQ109

VerifiedEvaluation and Monitoring

A Generative AI Engineer is developing a customer-support agent on Databricks and must evaluate whether the agent’s responses comply with a strict company tone policy. The engineer wants to create a custom scorer in MLflow 3.x that programmatically determines whether a response includes any prohibited phrases from a predefined list and produces a binary score. The scorer must be registered and reusable across multiple evaluation runs.

Which approach correctly implements this custom scorer in MLflow v3.x?

Explanation

MLflow GenAI evaluation supports custom code-based scorers that take relevant evaluation fields such as inputs and outputs, return primitive Boolean or numeric scores, and are passed in the scorers list to mlflow.genai.evaluate(). This suits deterministic prohibited-phrase checking and permits the scorer to be reused across evaluation runs. Classic MLflow metrics and their extra_metrics or custom_metrics parameters are not interchangeable with the GenAI scorer interface.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!