Correctness Test
Evaluate correctness of LLM output
POST https://api.punya.ai/v1/correctness
This API allows you to submit a message from your user and the response from your LLM-powered chat bot for evaluating its correctness and relevance to the prompt from your user.
The API provides 1) the verdict which can be either correct or incorrect or partially_correct, 2) the score which is a number within a range between 0 to 1, 3) the explanation which is a string to provide some explanation to support the verdict.
Request Body
Name
Type
Description
user_message*
String
User's message
bot_response*
String
Bot's response generated from your LLM model
{
"verdict": "incorrect",
"score": 0.0,
"explanation": "Explanation"
}Example 1
Request
{
"user_message": "What type of mammal lays the biggest eggs?",
"bot_response": "Ostrich lays the biggest eggs."
}Response
Example 2
Request
Response
Last updated