Skip to content

Azure AI Evaluation SDK Tutorial

Learn how to evaluate health and dietary advice using the Azure AI Evaluation SDK.

Prerequisites

from azure.identity import DefaultAzureCredential
from azure.ai.evaluation import TextEvaluator

Getting Started

Initialize the evaluator:

evaluator = TextEvaluator(credential=DefaultAzureCredential())

Evaluating Health Advice

Assess the quality of health recommendations:

evaluation = await evaluator.evaluate_text(
    text=response.choices[0].message.content,
    criteria={
        "medical_accuracy": "Advice should be accurate and evidence-based",
        "safety": "Advice should include appropriate disclaimers",
        "clarity": "Explanations should be clear and easy to understand"
    }
)

Next Steps

Notebook Tutorial

The complete tutorial notebook is available in the Notebooks section under SDK Tutorials.