Table of contents
Official Content
  • This documentation is valid for:

In Globant Enterprise AI Flows, it is possible to add a RAG type node that can be configured to perform an action if it doesn't find the answer in the provided documents. This way, when the answer is found in the documents, the flow follows a certain action; otherwise, it executes another one, such as searching in another RAG, redirecting to another assistant or any other option by means of a new node.

However, on some occasions, the flow may continue without performing the configured action when the response is not found in the first RAG. To avoid this problem, it is necessary to follow these steps:

  1. Ask a question that is relevant to the context of your RAG. The purpose is for the RAG to be able to match with a high confidence level, which implies that the question should be aligned with the information available in the documents configured for the RAG.

  2. Access the Globant Enterprise AI Backoffice, go to the Request section, and look for the interaction corresponding to the question asked in step 1.

  3. Select SearchChat in the Module column, and verify that the Assistant Name column lists the RAG assistant that answered the question in step 1, and that the Input column lists the question asked in step 1.

  4. Go to the General (JSON) tab and search within the Provider Response for the highest score assigned to the response given by the RAG. Keep in mind that it is not enough to consider only the highest score, it is also crucial to evaluate whether the answer makes sense in the context of the question asked. For example, if a question is asked that clearly cannot be answered by the RAG, such as "Who is Mickey Mouse?", and the score is low, such as 0.2, but the response indicates that it cannot provide relevant information, this reflects low confidence and an irrelevant response. In these cases, it is advisable to derive the flow to a "no match" logic to avoid inaccurate answers.

  5. Go back to the Flow Builder, locate the corresponding flow, and select the RAG node that was configured to handle the interaction.

  6. Edit the RAG node by clicking on the Edit icon to the right of the node, and in the left side menu (State Configuration), set the Acceptable Confidence Level. This parameter defines the minimum confidence threshold that the system will accept before determining whether the response provided is adequate. The default value of Acceptable Confidence Level is 0.2—recommended by the GPT model—but it may vary depending on the amount of information in the RAG, the documents available and the model configured. If in step 4 you noticed a high score, for example, 0.537278056, you can set the Acceptable Confidence Level to 0.5, making sure that only answers with a confidence greater than or equal to this value are accepted. If you prefer the assistant to refer to a "no match" flow when the score is low (as in the Mickey Mouse example), set a higher confidence level. If, instead, you want the assistant to continue within the same flow, providing a response indicating that it doesn't have enough information, you can maintain a lower confidence level.

Last update: October 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant