Update Your AI Agent's Knowledge Base

Add Documents to the Agent's Knowledge Base

To add custom knowledge to your AI Agent, click on the "Knowledge base" tab in the Agent details page. Here you can click on the Add document button to add documents to the Agent's knowledge base. You can either upload a file, copy over some text, or provide a URL for the system to scrape the webpage.

Below we shown how to add a new document by copying over some textual content. Adding new documents through file upload works similarly.

Click on the "Text" tab, and you should see two text input boxes as shown below. The upper input field is designated for entering the full textual content of the document you'd like to add, which will serve as the "new knowledge" for the AI Agent. The metadata input field is optional and can be used to provide a concise summary of the document. This summary can help streamline the chatbot’s processing and improve the relevance of responses when referencing the document.

For example, let us paste the text on the What is Theta Network on the lower input field such that the chatbot is aware of the latest development of the Theta Network. In the upper input box, we can simply type in "This document provides a high-level overview of Theta Network".

Next, click the "Add Document" button to incorporate the new knowledge as a document into the chatbot's knowledge base. Once successfully added, a card representing the newly uploaded document will appear on the page. To view the document and/or edit it, click on "Edit" which will open the file in a modal. If you want to update the document's description, you can update its metadata by clicking on the corresponding button.

You can add more documents to the knowledge anytime you want! With the new knowledge about Theta Network and Theta EdgeCloud added to the knowledge base, we can go back to the playground tab and ask it questions about Theta!

Adding Documents Programmatically

The docs can be managed programmatically through API as well. With this feature you can update realtime information, such as the score of a basketball match, stock price actions, etc. for the Agent. Please check out Configure the AI Agent via APIs for more details.


More ways to add AI Agent Knowledge

Direct URL

Add a URL to automatically parse the page and get its content added to your agent's knowledge


CSV File

You can add files in CSV format. This format will help your agent to give precise response for different types of knowledge like scheduling, statistics or anything else that could benefit from using a database. Upload your CSV file, and provide a description in the sql_description text field under the "Advanced" tab. Leave the rest of the metadata unchanged.


Index the Documents using PageIndex

You can check the "Structured document: use PageIndex" box for well-structured documents such as manuals, legal codes, policy documents, and similar materials, indexing with pageIndex tends to be more effective for retrieval than standard vector-only indexing. This is especially useful when the document has a clear hierarchy and users are likely to reference information in a page- or section-oriented way.


Next, let's further customize our AI Agent.