Skip to main content
Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
A rubric evaluator scores an agent or model response against custom, weighted criteria that you define, using an LLM as the judge. It gives you full control over what “good” means for your use case while applying that judgment consistently at scale. A rubric is a set of criteria that defines how to rate the response. Each rubric contains scoring dimensions; each dimension has a description of what it measures and a weight that reflects its relative importance. The LLM judge scores each applicable dimension from 1 to 5 on a single response or multi-turn conversation. The overall rubric score is the weighted average of those scores, normalized to a 0–1 range. Use rubric evaluators as your primary measure of agent quality, because they let you express the exact criteria that matter for your use case. Pair them with built-in evaluators for safety, groundedness, and content harm to cover risks the rubric doesn’t measure. The rest of this article describes how to generate a rubric, the fields it contains, how to choose an LLM judge model, and how to review the results.

Generate a rubric evaluator

You can create a rubric evaluator in two ways: You can automatically create a rubric evaluator by selecting an LLM model to generate the rubric from your agent’s context. Provide at least one of the following base inputs:
  • Foundry agent — Select an existing Foundry agent. The service pulls the agent’s instructions (for prompt agents) or its description (for hosted agents) to use as the generation context.
  • Agent system prompt — Paste the instructions that define your agent’s intended behavior. Use this when the agent isn’t registered in Foundry or when its registered context doesn’t fully capture its behavior.
  • Reference files — Documents, knowledge-base content, or domain guidelines that describe your agent’s context and the expected response quality.
For best results, add agent production traces on top of any base input above to ground the rubric in real usage:
  • Traces — Agent production traces collected from Foundry tracing in Application Insights. Traces can’t be used alone; pair them with a Foundry agent, an agent system prompt, or reference files.
Each generated rubric contains the following fields:

Choose an LLM judge model

Not all models perform equally as rubric judges. The following table ranks models by judge quality.
Avoid using gpt-4o-mini as a rubric judge. This model produces noticeably less reliable scores compared to newer models. For the best balance of performance and cost, use gpt-5.4-mini.

Manually create a rubric

Write your own rubric by defining each dimension’s id, description, and weight. Use this approach when you already have a rubric defined elsewhere that you want to bring into Foundry.
Start by creating an auto-generated rubric evaluator and refine it manually. Auto-generation gives you a strong baseline that you can adjust to fit your specific quality standards.

Review and adjust the rubric

After you generate or create a rubric, review the dimensions to confirm they match your expectations for agent quality. You can:
  • Edit id, description, and weight — Refine the language to be more specific about what qualifies for each dimension level. Precise descriptions and weight improve scoring consistency.
  • Add or remove dimensions — Insert quality dimensions that matter for your domain, or remove ones that don’t apply.
  • Adjust thresholds — Set the pass threshold to control what overall score qualifies as passing. Values range from 0.0 to 1.0, where 1.0 is the highest score. Raise the threshold for a stricter quality standard, or lower it to be more permissive.
  • Set always applicable — Select or clear the Always applicable checkbox for a criterion. When selected, the LLM judge scores this criterion for every response without checking relevance first.
In the advanced settings for each rubric, you can also view the evaluation level and category for this rubric evaluator. Iterate on the rubric until it reliably distinguishes between acceptable and unacceptable agent responses. Run a small evaluation on a sample dataset to validate that the rubric scores align with your own judgment before using it at scale.

Example rubric

The following example shows a rubric for a restaurant reservation agent. Each criterion targets a specific quality dimension, with weights reflecting relative importance:
In this rubric, intent_recognition has the highest weight (9) because correctly identifying what the user wants is the most outcome-decisive factor. The general_quality criterion uses always_applicable: true so the judge scores it for every response, even when other criteria might not apply.

Use rubric evaluators to run evaluation

Rubric evaluators work well for domain-specific or organization-specific quality criteria that general-purpose evaluators can’t capture. Define a rubric when you need scoring that reflects your team’s specific quality standards—for example, customer support tone, medical accuracy, or legal compliance. The LLM judge reads the rubric, examines the mapped input data, assigns a score, and provides a reason for its scoring decision. This approach combines the flexibility of custom criteria with the consistency of LLM-based evaluation. For details on running evaluations and configuring data sources, see Run evaluations from the SDK. For a runnable example, see sample_rubric_evaluator_generation_basic.py. For additional rubric samples (all-sources generation, iterative editing, full lifecycle, and manual authoring), see the evaluations samples README.

Example output

The rubric evaluator returns a weighted score for each dimension, an overall score, a pass/fail label, and a reason explaining the decision. The default pass threshold is 0.5. Scores at or above the threshold are considered passing.

Pass example

In this example, a user asks to book a table for 4 on Friday at 7:30 PM. The agent correctly identifies the booking intent, calls the reservation tool with valid parameters, and confirms the reservation:

Fail example

In this example, a user asks to book a table for 12 people on Saturday. The maximum party size is 8, but the agent proceeds to book anyway without flagging the policy violation:
Each output item includes per-dimension scores with reasons. Dimensions marked "applicable": false are skipped and don’t contribute to the overall score. The overall score is a weighted average of all applicable dimension scores, normalized to a 0–1 range.
Rubric evaluators use LLM-as-judge scoring and incur model inference costs per evaluation call. Scoring reliability might vary for very short responses. Write rubric descriptions that are specific and unambiguous to improve scoring consistency across evaluations.

Set up continuous evaluation with rubric evaluators

Once your rubric evaluator reliably reflects your quality standards, configure it for continuous and scheduled evaluation in Monitor settings. Continuous evaluation runs the rubric automatically against new agent traffic, so you can catch quality regressions in production as they happen — without triggering manual runs. For setup steps, see Monitor agents in the dashboard.