Skip to content

Evaluate

Evaluate predictions on one or multiple documents/text.

Parameters:

Name Type Description Default
message_id str

The ID of the message associated with the uploaded documents. This ID is used to identify which set of documents/text predictions should be evaluated.

required

Returns:

Name Type Description
response dict

A JSON response from the API, containing the evaluation results, answer_relevancy, faithfulness of the predictions on the specified message's documents or text. If the message ID is not provided or invalid, the function returns an error message indicating that a valid message ID is required for the operation.

Sample usage:

from anoteai import Anote

api_key = 'INSERT_API_KEY_HERE'
Anote = Anote(api_key, isPrivate=False) #You can select isPrivate=True if you want to use private models


message_id = 5
response = privategpt.evaluate(message_id)

Response is given as a JSON in this format:

{
    'answer_relevancy': 0.88,
    'faithfulness': 1.0
}