Decision Judge evaluator

Updated at:

The Decision Judge evaluator uses natural-language questions to make yes/no judgments, classify, and score an agent's responses, execution trajectories, or other business data. You can configure multiple questions for the same input and use an aggregation rule to generate one final score, while the raw result of each question is retained.

Decision Judge is based on the Model Studio decision model. It directly returns structured judgment results and does not generate natural-language evaluation reasons. For more information about the underlying model, see Decision Model API.

Use cases

Decision Judge is suitable for evaluation scenarios in which the judgment criteria can be described in natural language and the results can be expressed as probabilities, categories, or numeric values. Examples:

  • Response quality check: Determine whether a response is on-topic, complete, and consistent with the provided reference materials.

  • Business rule verification: Check whether the agent's conclusions and recommended actions comply with business policies.

  • Execution result verification: Determine whether the agent completed the task based on the user's goal and the execution trajectory.

  • Content classification and risk check: Identify the risk level, issue category, or processing status of a response.

  • Multi-dimensional comprehensive scoring: Evaluate multiple dimensions at the same time and calculate a final score based on pass conditions or weights.

Create a Decision Judge evaluator

The complete workflow for using Decision Judge is: create an evaluator → define input fields → configure judgment questions → configure aggregation scoring → save and publish → configure field mappings in an evaluation task → save and run the task → view the results.

  1. Log on to the AgentLoop console. In the left-side navigation pane, click Evaluation.

  2. Click the Evaluators tab, and then click New evaluator.

  3. Select Decision Judge. On the Basic Information tab, configure the following parameters.

    Parameter

    Required

    Description

    Evaluator name

    Yes

    Must start with a letter and can contain only letters, digits, underscores (_), and hyphens (-). The name cannot be changed after the evaluator is published.

    Display name

    No

    A friendly name for display.

    Description

    No

    Describes the evaluation goal, applicable data, and judgment criteria.

    Tags

    No

    Used to categorize and search for evaluators.

  4. Click the Judging rules tab and configure Input definition (state), Question definitions (rubric), and Aggregate scoring in sequence. For instructions, see Define input fields, Configure judgment questions, and Configure aggregation scoring.

  5. After the configuration is complete, click Save and publish in the upper-right corner, and then confirm the publishing in the dialog box.

Define input fields

State is the business data provided to the decision model. After field mapping, each piece of data to be evaluated forms a State, which is shared by all questions in the evaluator.

By default, the system provides three optional fields: input, output, and trajectory. You can add, delete, or rename fields based on your business needs, and enter descriptions and specify whether each field is required.

Field example

Recommended content

input

The user's question or task goal

output

The Agent's final response

trajectory

The agent's execution trajectory

Field configuration follows these rules:

  • At least one field must be retained, and field names must be unique.

  • A field name must start with a letter or an underscore (_) and can contain letters, digits, underscores (_), periods (.), and hyphens (-). It can be up to 128 characters in length.

  • Fields marked as required must be mapped in the task, and their actual values cannot be missing, null, or whitespace-only strings. 0 and false are valid values.

  • Even if all fields are optional, the actual input cannot be entirely empty.

If a mapped value is a JSON object or array, its structure is retained. Periods in field names are processed literally as part of the name. For example, context.extra becomes a complete key name in the State and is not automatically expanded into a nested object.

Configure judgment questions

Each evaluator supports 1 to 16 questions. For each question, you must specify the question and judgment criteria and select an appropriate question type. You can also set a question name to make the configuration and results easier to review.

Question types

Type

Scenario

Configuration and return value

Yes/No (noul)

Determine whether a condition is met

Returns the probability of "Yes" in the range of [0,1]

Single choice (choice)

Assign a sample to one category

Configure 1 to 255 categories. Returns the identifier of one category

Ordinal scale (score)

Score by quality or degree

Configure 2 to 255 level descriptions ordered from low to high. Returns a numeric score

A Yes/No question must clearly state what "Yes" means. Example:

Based on the policy in the State, determine whether the return conditions and time limit described in output are correct.

A higher return value for this question indicates that the model is more inclined to judge "Yes". If the question is changed to "Does the response violate the return policy?", a higher value indicates a greater likelihood of a violation. When you configure the pass condition, you must adjust the comparison direction accordingly.

For a Single choice question, you must set a unique identifier for each category. We recommend that you also provide a clear category description. Example:

Category identifier

Category description

low

No commitments beyond the policy

high

Contains commitments on refunds, compensation, or processing time that are not supported by the policy

For an Ordinal scale question, we recommend that you configure 3 to 7 clearly distinguishable levels. Example:

Level index

Level description

0

Does not answer the user's core question

1

Provides a conclusion but lacks necessary conditions or operation guidance

2

Provides a correct conclusion and explains the necessary conditions and operation guidance

Level indexes start from 0, so the score range of the preceding scale is [0,2]. The return value is the probability-weighted expected value of the level indexes. It can be a decimal such as 1.43 and is not limited to integer levels.

Configure aggregation scoring

After all questions are judged, the platform generates one final numeric score based on the aggregation configuration. Each evaluator produces only one final evaluation result for each sample, and the raw results of all questions are retained.

The following three aggregation methods are available.

Aggregation method

Scenario

Constraints

Final result

Conditional judgment (default)

Check whether each dimension meets business requirements

The pass condition of each question must be explicitly configured.

1 if the overall condition is met, otherwise 0

Average or weighted average

Combine multiple comparable numeric scores

All questions must be Yes/No or Ordinal scale questions with the same score range.

Returns the average score and retains the common score range

Custom SPL

Implement custom conversion, deduction, or comprehensive calculation

The SPL statement must output exactly one row that contains a finite numeric score_value field for the current sample.

Returns the numeric value calculated by SPL

Conditional judgment

Configure a pass condition for each question, and then select an overall judgment method:

  • All conditions: If all questions pass, the final score is 1. Otherwise, the final score is 0. This method is used by default.

  • Any condition: If at least one question passes, the final score is 1. Otherwise, the final score is 0.

The following table describes the conditions supported by each question type.

Question type

Supported conditions

Example

Yes/No, Ordinal scale

Greater than or equal to, less than or equal to, greater than, less than

Policy accuracy ≥ 0.9

Single choice

Equal to, not equal to, in, not in

Risk level equal to low

The pass condition of each question must be explicitly configured. The system does not automatically apply a default threshold. A numeric threshold must be within the score range of the corresponding question, and a category condition must reference categories defined for that question.

Comparisons use the raw values without rounding. For example, if the condition is ≥ 0.9, 0.9 passes and 0.8999 does not.

Average or weighted average

All questions must be Yes/No or Ordinal scale questions with the same score range. Single choice questions cannot be directly included in the average.

If all questions have the same weight, a simple average is calculated. If the weights differ, the score is calculated as follows:

Final score = Σ(question score × question weight) ÷ Σ question weights

The weight of each question must be greater than 0. The default weight is 1.

For example, if the accuracy score is 0.9 with a weight of 2 and the completeness score is 0.6 with a weight of 1, the final score is:

(0.9 × 2 + 0.6 × 1) ÷ 3 = 0.8

Questions included in the average must use the same score range. For example, a Yes/No result in the range of [0,1] cannot be directly averaged with an Ordinal scale result in the range of [0,4]. In such scenarios, adjust the scale range or use custom SPL to explicitly convert the values.

Custom SPL

After you select Custom SPL, you can write calculation logic based on the raw results of all questions.

SPL reads the input JSON from the content column. The question results are stored in scores and are organized by question ID. For example, if the ID of a Yes/No question is Q1, the following statement converts its raw score to a 100-point scale:

*
| extend score_value = cast(json_extract_scalar(content, '$.scores.Q1.score_value') as double) * 100.0
| project score_value

Replace Q1 with the actual question ID.

Custom SPL must output exactly one row for the current sample, and the row must contain a finite numeric field named score_value. You cannot use statistical aggregation across samples or use filter statements to remove samples that fail.

New custom SPL configurations retain the calculated result directly. The result is not limited to [0,1] by default, and no score range or normalized score is automatically generated.

Use the evaluator in an evaluation task

After you publish the evaluator, you must select it in an evaluation task and bind actual data to the State fields.

  1. On the Evaluation Tasks tab, click New task, and configure the task name and data source.

  2. In the evaluator selection step, select the published Decision Judge evaluator from the Custom evaluator list.

  3. View the preview samples and configure the field mappings one by one.

The following mappings use trace data as an example. The context field is not provided by default. Add the context field in the input definition before you map it.

State field

Data field example

input

trace.input

output

trace.output

trajectory

trace.agent_trajectory

context

trace.rag_context or trace.tool_context

When you use a dataset, you can map State fields directly to the corresponding data columns. For example, map policy to the business policy column in the dataset.

When you configure mappings, check the field content against actual samples to ensure that the reference materials, user goals, and execution results referenced by the questions are all passed in.

Run the task and view results

Before you submit the task, check the State field mappings against the preview samples, and confirm that the judgment questions and aggregation rules are completely configured. After you confirm the configuration, click Save and run to submit the task.

We recommend that you first create an evaluation task with a small number of representative samples. After the task is complete, check the following items before you expand the evaluation scope:

  • Whether each State field obtains the expected content.

  • Whether the question descriptions are ambiguous.

  • Whether the itemized results are consistent with human judgment.

  • Whether the aggregation conditions, weights, and final score meet expectations.

In the evaluation result details, you can view the final score and raw items, which include the question ID, question content, type, raw value, pass condition, whether the question passed, and execution status. Aggregation methods other than conditional judgment do not automatically generate a pass conclusion for each question.

Distinguish between execution status and business score:

Case

Meaning

Execution succeeded, final score is 0

The evaluation is completed normally. 0 is a valid score, and its business meaning is determined by the scoring rule.

Execution failed, score is empty

The evaluation is not completed due to reasons such as missing input, model invocation failure, invalid question results, or SPL execution errors.

When you use conditional judgment, a score of 0 indicates that the overall pass condition is not met. When you use average or custom SPL, interpret the score based on the scoring rule. For example, a custom risk score of 0 can indicate no risk. Even if you select Any condition, all questions must return valid results. If the answer to a question is missing, the error is not ignored even if other questions pass.

Configuration example: customer service response quality check

This example checks the policy accuracy, completeness, and risk level of a response at the same time, and requires all three to pass.

Input definition

Add the policy field, set input, output, and policy as required, and map them to the columns with the same names in the dataset.

The following is a sample:

{
  "input": "I received the product 3 days ago and haven't opened it yet. Can I return it?",
  "output": "Yes. Products received within 7 days and still unopened are eligible for a no-reason return. Please submit the request on the order details page.",
  "policy": "Products received within 7 days and still unopened are eligible for a no-reason return. Requests are submitted on the order details page."
}

Question definitions and pass conditions

Question name

Type

Question and judgment criteria

Pass condition

Policy accuracy

Yes/No

Based on policy, determine whether the return conditions and time limit described in output are correct

≥ 0.9

Response completeness

Ordinal scale

Determine whether output answers the user's question and provides the necessary conditions and request path

≥ 1.5

Commitment risk

Single choice

Determine whether output contains commitments not supported by policy

Equal to low

Response completeness uses three levels: 0 indicates that the core question is not answered, 1 indicates that a conclusion is given but the necessary conditions or request path are missing, and 2 indicates that the conclusion is correct and the information is complete.

Commitment risk is configured with two categories: low indicates no commitments beyond the policy, and high indicates commitments not supported by the policy.

Aggregation result

Select Condition → All conditions. Assume that the model returns the following results:

Question

Raw result

Passed

Policy accuracy

0.96

Yes

Response completeness

1.8

Yes

Commitment risk

low

Yes

All three items are met, so the final score is 1. If any item is not met, the final score is 0. The preceding values are examples.

Authoring recommendations

The following recommendations apply to the design of judgment questions and scoring rules:

  • Focus each question on one dimension. Define accuracy, completeness, and risk separately to make it easier to locate the cause of a low score.

  • Provide the basis required for judgment. For questions that depend on business policies or reference answers, add the corresponding materials to the State.

  • Clearly define level and category boundaries. Write level and category descriptions that are easy to distinguish.

  • Calibrate thresholds with samples. Test with manually labeled passing, failing, and borderline samples instead of directly applying a uniform threshold.

  • Keep the scoring criteria stable. After you modify questions, levels, or aggregation rules, run an evaluation task on a fixed small sample set first, and check the results before you expand the evaluation scope.