Skip to main content

Endpoint

string
default:"POST"
POST
string
/v1/evaluator/

Authentication

This endpoint requires API key authentication. Include your API key in the request headers:

Request Body

string
required
Name for the evaluator
string
required
Type of scoring. Options:
  • LLM-BOOLEAN: Binary true/false evaluation
  • LLM-CHOICE: Multiple choice selection
  • LLM-RANGE: Numeric range scoring
  • PYTHON: Custom Python code evaluation
  • LASTMILE: LastMile framework integration
object
LLM configuration (required for LLM-based scoring types)
string
Model to use for evaluation (e.g., “gpt-4”)
string
Evaluation prompt template
number
Minimum score (for LLM-RANGE)
number
Maximum score (for LLM-RANGE)
array
Available choices (for LLM-CHOICE)
object
Python code configuration (required for PYTHON scoring type)
string
Python code that evaluates the response
object
LastMile configuration (required for LASTMILE scoring type)

Response

object
Created evaluator details
string
Unique identifier for the evaluator
string
Evaluator name
string
Type of scoring
object
LLM configuration
object
Code configuration
object
LastMile configuration
string
Organization ID
string
Creation timestamp
string
Last update timestamp
string | null
Error message if the request failed, null otherwise

Example Request - LLM Boolean Evaluator

Example Request - LLM Range Evaluator

Example Request - Python Evaluator

Example Response

Notes

  • LLM evaluators use AI models to score responses automatically
  • Python evaluators give you full control with custom code
  • LastMile evaluators integrate with the LastMile evaluation framework
  • You can test evaluators before creating them using the /v1/evaluator/llm/test or /v1/evaluator/python/test endpoints