v1

latestOpenAPI 3.0.02026-07-1346146138.4 KB
evaluators

Execute topic-adherence evaluator

Evaluate topic adherence

Request Body:

  • input.question (string, required): The original question
  • input.completion (string, required): The completion to evaluate
  • input.reference_topics (string, required): Comma-separated list of expected topics
post/v2/evaluators/topic-adherence/execute

Request body

Example request

{
  "input": {
    "completion": "Machine learning is a subset of AI that enables systems to learn from data.",
    "question": "Tell me about machine learning",
    "reference_topics": "artificial intelligence, data science, algorithms"
  }
}

Response

OK

adherence_scorenumber

Example response

{
  "adherence_score": 0.95
}