You can run graders locally or remotely. Each grader assesses specific aspects of AI models and their outputs.
Configure and run graders
Azure OpenAI graders use the OpenAI Evals API and are configured differently from built-in evaluators, which use theazure_ai_evaluator type. Use graders when you need custom LLM-based classification or scoring with full control over the prompt, or when you need deterministic string or similarity checks without an LLM judge.
Azure OpenAI graders provide flexible evaluation using LLM-based or deterministic approaches:
- Model-based graders (
label_model,score_model) - Use an LLM to evaluate outputs - Deterministic graders (
string_check,text_similarity) - Use algorithmic comparison
Example input
Your test dataset should contain the fields referenced in your grader configurations.Label grader
The label grader (label_model) uses an LLM to classify text into predefined categories. Use it for sentiment analysis, content classification, or any multi-class labeling task.
passing_labels.
Score grader
The score grader (score_model) uses an LLM to assign a numeric score to model outputs, reflecting quality, correctness, or similarity to a reference. Use it for nuanced evaluation requiring reasoning.
0.85). The grader passes if the score meets or exceeds pass_threshold.
range defaults to [0, 1] if omitted. pass_threshold is optional; if not set, the grader scores but doesn’t produce a pass/fail result.String check grader
The string check grader (string_check) performs deterministic string comparisons. Use it for exact match validation where responses must match a reference exactly.
Output: Returns a score of
1 for match, 0 for no match.
Text similarity grader
The text similarity grader (text_similarity) compares two text strings using similarity metrics. Use it for open-ended or paraphrase matching where exact match is too strict.
Output: Returns a similarity score as a float (higher means more similar). The grader passes if the score meets or exceeds
pass_threshold.