Hi, Humans. How may we help you?

04. Intelligent response based on file in Chatbot
5 min
Created by Maria Malheiro on 2/8/2024 3:00 PM
Updated by Ligia Sarmento on 4/1/2024 3:19 PM

The action Intelligent Response based on file is used to automatically generate intelligent messages using Artificial Intelligence based on the files uploaded to the AI Library. This action is commonly applied in cases where the chatbot is prepared to respond to a series of topics regarding the brand's product/service in a generative way, using only the user's question and the document previously loaded into the solution.

For example, if your flow includes a field for general doubts about your products, you can upload a document containing the details of each product/service, which will allow the chatbot to understand and respond to users' questions.

Even if these responses come in an unstructured and nuanced way, the AI understands, searches for the answer in the document linked to the action, and then generates a response text according to the information found. A good example would be: "Hello, I'm not feeling well and I need a doctor. Do the health plans from company XXX have a waiting period for surgeries?"

How to Access

The Intelligent Response based on file content is available in the Constructor, and to access it, simply click on the three dots or anywhere within it.

This will open the Block Details modal, then follow these instructions:

Click on Add content > Conversation actionsIntelligent Response based on file
Fill in the fields:

  1. Base file: document that should be the knowledge base for the AI.
  2. Command: description that will define the tone of voice and limits of the AI.
  3. Describe how the response will be for other subjects: text you want to send to the customer if they ask something outside of the topics described in the previous field.
  4. Default response: text you want to send to the customer in case there is a failure in locating the response.
  5. Maximum response size: select Standard if you have no preference. By selecting Custom, you can specify the maximum number of characters for the AI to respond to a question.
  6. Finally, click outside of the block to save.

To use the intelligent response based on file, you will use a variable called response_ia_file.response. Example of return:

{
"response_ia_file": {
"intention": "iphone_definition",
"trust": "0.9",
"temperature": "neutral",
"response": "An iPhone is a line of smartphones designed and manufactured by the company Apple Inc. It is one of the most popular mobile devices in the world and has been a market leader since its launch in 2007. It runs on the iOS operating system, which is developed by Apple and is known for its distinctive features and integration with the Apple ecosystem.",
"documentName": "demo_what_is_iphone.pdf"
}
}

Document Best Practices

Before adding a document, we have gathered some important information regarding best practices:

  • Uploaded documents should have more text than images. The knowledge to be conveyed should primarily be in the text, as the current functionality reads texts and disregards images.
  • Uploaded documents should contain complete texts, i.e., they should have a structure with a beginning, middle, and end. Basically, a text that would be presented for others to read. If it is a document only with keywords and scattered information, the solution may not offer the best responses or may not reach the confidence level necessary to display the generated response.
  • Information on a specific subject should preferably be in the same part of the document. Manuals that use the "for more information, check page xxx" feature, and when it reaches that page, sends you to another part of the document, may not contribute to AI finding the best answer to the question.
Did this article solve your doubts?
Recently viewed