Skip to main content
POST
Run evaluator
Executes an evaluator against provided input/output data for testing purposes. This endpoint allows you to test your evaluator configuration before using it in production.

Authentication

All endpoints require API key authentication:

Path Parameters

Unified Evaluator Inputs

All evaluator runs now receive a single unified inputs object. This applies to all evaluator types (llm, human, code). The same fields are also recorded and visible on the Scores page for every evaluation.

Request Body Structure

Field Descriptions

Generation Method Options

New Feature: The generation_method parameter allows you to control which automation is used, since evaluators can now have both LLM and code configs.
  • "auto" (default): Automatically selects the best available automation method in order: LLM → Code → Legacy config
  • "llm": Force use of LLM-based evaluation (requires llm_config to be configured)
  • "code": Force use of code-based evaluation (requires code_config to be configured)
Note: Human scoring is done through the UI/Scores API, not via this test/run endpoint. Notes:
  • These fields are stored with each evaluation and shown in the Scores page alongside the resulting score
  • When running evaluators from LLM calls, inputs is auto-populated from the request/response and tracing data
  • Legacy {{llm_input}}/{{llm_output}} placeholders remain supported and transparently map to the unified fields
  • New templates should reference {{input}} and {{output}}

Examples

Test LLM Evaluator

Test Code Evaluator

Test Human Categorical Evaluator

Legacy Format Support

Response

LLM Evaluator Response

Status: 200 OK

Code Evaluator Response

Human Categorical Evaluator Response

Response Fields

Score Types by Evaluator

Numerical Evaluators

  • Score: Number (e.g., 4.5, 8.2)
  • Range: Defined by evaluator’s min_score and max_score
  • Passing: Determined by passing_score threshold

Boolean Evaluators

  • Score: Boolean (true or false)
  • Passing: true = passed, false = failed

Categorical Evaluators

  • Score: Array of selected category names (e.g., ["Good", "Accurate"])
  • Values: Corresponding numeric values from categorical_choices
  • Note: Human evaluators return placeholder values for testing

Comment Evaluators

  • Score: String with detailed feedback
  • Content: Varies based on evaluator configuration
  • Length: Can be extensive for detailed feedback

Error Responses

400 Bad Request

401 Unauthorized

404 Not Found

422 Unprocessable Entity

500 Internal Server Error

Testing Best Practices

1. Test with Realistic Data

Use actual examples from your use case:
Python

2. Test Edge Cases

Python

3. Validate Configuration

Test your evaluator configuration before production use:
Python