Configuring your RAG system to send questions to Validate

To configure your RAG system to log questions and answers to Tonic Validate, whenever your RAG system answers a question from a user, you add a call to the Validate log function.

The call to log includes:

  • The identifier of the Validate production monitoring project to send the question to

  • The text of the question from the user to the RAG system

  • The answer that the RAG system provided to the user

  • The context that the RAG system used to answer the question

from tonic_validate import ValidateMonitorer
monitorer = ValidateMonitorer()
monitorer.log(
    project_id="<project identifier>",
    question="<question text>",
    answer="<answer>",
    context_list=["<context used to answer the question"]
)

As your RAG system sends questions to the Validate production managing project, Validate by default generates the following metrics scores for each question:

You can also request additional metrics. For information about the available metrics, go to RAG metrics reference.

Last updated