Knowledge AI

Knowledge AI is a solution to extract and generate context-sensitive answers documents uploaded to the platform. It doesn't rely on conventional intent-based model to identify user questions and provide predefined answers, which makes it ideal for FAQs, product descriptions, institutional content, manuals, chit chat, etc.

This process transforms PDF and TXT file types into a structured and easily accessible format for a more efficient and comprehensive knowledge base.

Important: When enabling Kowledge AI you are subject to the terms of a third-party service and you agree to share information in the documents with the Generative AI model provider to which you are connecting.

How it works

In short, Knowledge AI:

  • Finds an answer to the user's question in one or multiple documents

  • Has a QnA functionality for documents by registering pairs of questions and answers. Those are brief and accurate.

  • Serves as a secondary cognitive engine, independent of your primary knowledge base's NLP

  • Is multi-language

  • Has the ability to identify if there is no answer to a question, given the context of the document

  • Can read images with text, but not graphic images.

How image reading works (OCR)

OCR stands for Optical Character Recognition, an AI model designed to identify text characters in images. It can read images with text but doesn't interpret graphic images.

Applying OCR is essential to avoid losing relevant information contained in images within PDF files. This ensures that all textual content is utilized, even if it's an image.

When do we use OCR in Knowledge AI?

OCR is used during the training in the following scenarios:

  • TXT: OCR is not applied as these files only contain pure text.

  • PDF: All pages of the PDF are converted into images, after that the resolution of these images is improved, and then processed by the OCR model to extract the text.

Frequently accessed and/or transactional use cases must be handled via Intent engine

When the user interacts with the virtual agent, the system arranges knowledge in a hierarchical manner to ensure a precise answer delivery. The hierarchical structures are as described below.

  1. First search for an intent that starts a flow

  2. If it doesn't find a match, it will search for an intent that has an even answer, i.e. an FAQ flow.

  3. If once again there is no match, the intelligence searches in a document in Knowledge AI (the functionality must be enabled, otherwise it goes straight to the next step).

  4. Finally, if none of the previous cases apply, the user falls into a Not Expected flow.

Knowledge AI

Go to the Extensions page for Advanced Resources to enable it, as it comes disabled by default. Click the switch of the corresponding card.

Important: Enabling this feature may result in additional costs for each new request.

You will be asked to set the number of previous user inputs you want to consider as context when generating a response. This allows to go back in the conversation and comprehend the context when a previously discussed topic is revisited. For example, if a user asks about "unlock new credit card" and then follows up with "how do I do it?", the system can understand that the follow-up question refers to "unlock new credit card".

The range of previous interactions to be considered can be set from 0 to 5. You can change this number after enabled.

Import

Once you've enabled it, go back to the Knowledge AI section to upload your file by clicking on the New Document button to upload a document in PDF (up to 5MB and 100 pages) or in a TXT (up to 500KB) formats.

Just like the cells in the Dialog Manager, you can use tags to label the documents and questions and analyze them with Tag Funnels.

After the documents are imported, you will see them listed as in the image below. On each document bar, you can check all questions linked to it, view its content, edit, delete, and disable or enable it.

Knowledge AI has an upload limit of 20 documents.

Edit and View

Click the pencil icon to update file, edit name or tags. If you change the file, we recommend updating the questions linked to the document. To view the contents of each document, click on its name and the file will open in a new browser tab.

Enable and Disable

Training

After uploading a document, you have to make sure that they are now part of the knowledge base. You do that by using the training process. Click on the button Training on the top right corner. A second tab will appear for Knowledge AI, just like the image below.

Retrain your Knowledge AI content whenever you make changes to a document or FAQ. This includes both content changes or enabling/disabling.

The training process of a PDF may take a little longer than training TXT files. If you face any issues with specific files in cases of very large trainings (which may involve too many documents or PDFs close to the 100-page limit), wait a few moments and try training again.

Set Request Timeout

You can set this timeout value between 1 to 10 seconds, with the recommended default being 3 seconds. In case the request exceeds this time limit or times out waiting for OpenAI, the system delivers a Not Expected flow. This parameter can be configured in the Parameters section.

Questions

Although Knowledge AI is able to find answers without the need of creating Questions, you can use this resource to improve the system's capability to provide accurate and contextually relevant answers. The extraction of knowledge into questions enhances the virtual agent's ability to match user inquiries with the right information.

You can also edit or customize the answers for each channel and to make sure it's up-to-date or consistent with the agent's voice tone, for example. Another use of Questions is to create questions-answers for specific cases without having to make a new generation request for the LLM model.

Important: When you disable a document, all questions attached to it are also disabled. When you delete a document, all questions attached to it are also deleted.

Utterance Examples

Just like in a Intent cell, insert here other ways in which users would request the same subject. For instance, when users want to know about visiting hours in a Hospital, they may ask it in different ways:

“Are hospitalized patients entitled to a full-time companion?”

“Do inpatients have the right to a full-time companion?”

“Can I accompany a hospitalized patient?”

Add different examples to your Questions to improve inference

Once you've added the utterances examples, proceed to the next step, where you can fine-tune the content. This process is similar to what you'd do in a regular answer cell, allowing you to incorporate buttons and/or technical text if needed.

After you click save the question-answer pair will be stored in the Questions repository.

Important: Remember to always train the virtual agent after creating or deleting a question. It's a different training from the NLP.

Assist Answer

Another great tool to help you save time and improve the quality of your answers. If enabled, the Assist Answer feature will show the same options available in the Answer cell:

  • Improve writing

  • Shorten text

  • Expand text

  • Fix spelling and grammar

  • Change tone

Text good practices

Follow these good practices when preparing the documents for better results.

a) Longer paragraphs

Knowledge AI works better if you provide more context. Also, the longer the content, the better the inference. It you have two short paragraphs, it's better to combine them into a single, longer paragraph with four sentences. For example:

b) Avoid bulleted lists

Bullet lists are an example of the lack of context in short paragraphs. Try to convert those lists into full paragraphs. For example:

If you have a large list, try to split it. For ex., if you have a list with 30 items, you can split it into three lists in three different paragraphs, like this:

List A – Items 1 to 10

List B – Items 11 to 20

List C – Items 21 to 30

c) Avoid tables and forms

Knowledge AI won't read well tables and forms. A more effective approach is to reformat the content into paragraphs for better comprehension.

d) Remove elements that aren't relevant

Headers, footers containing addresses or phone numbers, summaries, and similar elements may include unnecessary information, potentially hindering the delivery of a more precise answer.

e) Tips for FAQs (Frequently Asked Questions)

Before uploading a FAQ, make sure that you have removed the questions from the document. Upload the FAQ file with only the answers. Knowledge AI performs more effectively with FAQs when questions are not included.

Last updated