Evaluators
Run evaluator
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 unifiedinputs 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 (requiresllm_configto be configured)"code": Force use of code-based evaluation (requirescode_configto be configured)
- These fields are stored with each evaluation and shown in the Scores page alongside the resulting score
- When running evaluators from LLM calls,
inputsis 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 OKCode 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_scoreandmax_score - Passing: Determined by
passing_scorethreshold
Boolean Evaluators
- Score: Boolean (
trueorfalse) - 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
Run evaluator