Knowledge Base

This page explains how to add knowledge base documents to your agent

Uploading Documents

You can set certain parameters for the indexing process. These parameters can be found in Build -> Agent Configuration -> Call Control -> Knowledge Base

To upload a file:

  • Go to Knowledge Base page

  • Click + Add

  • Choose format: file, raw text, or URL

File upload

Currently supported file formats:

URL upload

You can paste in a URL and the agent will retrieve information from it automatically. The URL must be publicly available.

Crawling websites costs credits! Processing websites is a complex task and as such, it costs credits depending on the length and amount of crawled websites.

Crawl depth: This is a parameter that controls the bahavior of the agnet when retrieving the provided website. If crawl depth is set to more than 0, the agent will follow links up to crawl depth. If you wish to retrieve only the specified website, leave the depth set to the default value of 0.

Text upload

This is the simplest form of a knowledge base document, you can simply paste text that you want the acgent to be able to access.

Knowledge Base node

Once you have uploaded knowledge base documents, you can add them to knowledge base nodes. This applies to all document types, including XLSX files. Select one or more documents in the node dropdown and the agent will be able to use them to answer the user while in that node. If you upload many documents and wish for all of them to be available, simply select the Use all knowledge bases in this agent option.

Global knowledge base

If you wish, you can make certain knowledge base documents available to the agent in the entire pathway. To add this, go to Build -> Agent Configuration -> Conversational Flow -> Global Prompt and select documents in the Select Knowledge Bases dropdown. Same as the KB node, you can select the Use all knowledge bases in this agent option.

Keep in mind that this will increase the agent's response latency, because KB lookups take additional time. It is recommended to use knowledge base nodes to localize KB lookups and use global KB only when absolutely necessary.

Table Retrieval node

In some cases, you may wish for your agent to be able to query structured data. You can use the table retrieval node for this. In this node, you can select one XLSX document from your uploaded files. The agent will be able to query that document using SQL. For best results, we highly recommend reading and following the list below.

Requirements and recommendations:

  • You must upload the data as a .xlsx file

  • Do not upload large files with hundreds of thousands of rows. If you have a need for large file support, contact us. If your uploaded file is too big, the call will fail and you will see an error in Live Logs.

  • The file name should be descriptive (good: customers.xlsx, bad: excel_sheet2.xlsx)

  • The file should contain a single sheet. Any sheets except the first one will be ignored.

  • The first row is treated as a header. All columns must have names in the first row, and column names should be descriptive.

  • Adhere to consistent data types in columns. Types are inferred automatically and cells not conforming to the inferred column type are (silently) replaced with NULL.

  • Structure the data consistently and logically. The agent may get confused if your table contains inconsistent or confusing data.

Monitoring:

The agent has access to your table via a tool. If you're having issues with the agent retrieving incorrect information or being unable to retrieve, please check the Live Logs (Insights -> Call Logs -> green Live Logs button). Enable trace logs at the top, and search for call.tool.invocation logs. They will contain the agent's queries and results, so you can see why it answered the way it did.

Last updated