evaluators
Execute answer-correctness evaluator
Changed onEvaluate 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
- Base URLhttps://api.traceloop.com
- AuthAPI key in header Authorization
- TypeScripthttps://skmtc.dev/traceloop/apis/traceloop-api/docs/v2/evaluators/answer-correctness/execute/post.tsA function with typed inputs. Its response is checked against the schema.
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
Example response
{
"correctness_score": 0.91
}Changes
- info
endpoint added
- info
- breaking
api path removed without deprecation
- breaking