v1

latestOpenAPI 3.0.02026-07-1346146138.4 KB
evaluators

Execute answer-correctness evaluator

Evaluate factual accuracy by comparing answers against ground truth

Request Body:

  • input.question (string, required): The original question
  • input.completion (string, required): The completion to evaluate
  • input.ground_truth (string, required): The expected correct answer
post/v2/evaluators/answer-correctness/execute

Request body

Example request

{
  "input": {
    "completion": "World War II ended in 1945.",
    "ground_truth": "1945",
    "question": "What year did World War II end?"
  }
}

Response

OK

correctness_scorenumber

Example response

{
  "correctness_score": 0.91
}