v1

latestOpenAPI 3.0.02026-07-1346146138.4 KB
evaluators

Execute faithfulness evaluator

Check if a completion is faithful to the provided context

Request Body:

  • input.completion (string, required): The LLM completion to check for faithfulness
  • input.context (string, required): The context that the completion should be faithful to
  • input.question (string, required): The original question asked
post/v2/evaluators/faithfulness/execute

Request body

Example request

{
  "input": {
    "completion": "The Eiffel Tower is located in Paris and was built in 1889.",
    "context": "The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris, France. It was constructed from 1887 to 1889.",
    "question": "When was the Eiffel Tower built?"
  }
}

Response

OK

is_faithfulboolean

Example response

{
  "is_faithful": true
}