Evaluators
Create evaluator version
Create a new version of an existing evaluator. The new version becomes the latest version immediately (versioning is append-only).
Payload Requirements
- commit_message describes the changes in this version.
- Provide either template_config or code_config to match the evaluator's type. code_config.type is a separate inner discriminator (MANAGED or CUSTOM) and is unrelated to the top-level type. Schema and constraints match Create Evaluator.
Valid example (template version)
{
"commit_message": "Improve prompt template for better accuracy",
"template_config": {
"name": "hallucination",
"template": "Given the input: {input}\nand output: {output}\nIs the output a hallucination? Explain your reasoning.",
"include_explanations": true,
"use_function_calling_if_available": true,
"classification_choices": {"hallucinated": 0, "factual": 1},
"llm_config": {
"ai_integration_id": "TGxtSW50ZWdyYXRpb246MTI6YUJjRA==",
"model_name": "gpt-4o",
"invocation_parameters": {"temperature": 0},
"provider_parameters": {}
}
}
}
Invalid example (missing required commit_message)
{
"template_config": {
"name": "hallucination",
"template": "Is this a hallucination?",
"include_explanations": false,
"use_function_calling_if_available": false,
"llm_config": {
"ai_integration_id": "TGxtSW50ZWdyYXRpb246MTI6YUJjRA==",
"model_name": "gpt-4o",
"invocation_parameters": {},
"provider_parameters": {}
}
}
}
<Note>This endpoint is in beta, read more here.</Note>
post/v2/evaluators/{evaluator_id}/versions
Path parameters
evaluator_idstring required
A universally unique identifier (base64-encoded opaque string).
Example:RW50aXR5OjEyMzQ1
The unique evaluator identifier (base64)
Request body
Response
Returns an evaluator version