Skip to main content

Knowledge

Introduction

The Knowledge module enhances agents by integrating information from external sources, such as product catalogs, research reports, user manuals, and documents provided by your users. Serenity* Star automatically analyzes and segments these documents, creates and stores embeddings, and uses vector search to retrieve relevant content to answer user queries.

You can add knowledge to your agent using two distinct sources: files and websites. Whether you are incorporating detailed documents or specific online content, Serenity* Star processes these sources to enrich your agent's ability to provide accurate and contextually relevant responses.

How to Use

In this example, we'll enhance an existing Assistant Agent with knowledge so that it can effectively answer questions about the 2024 Olympic Games. If you need guidance on creating an Assistant Agent, refer to this guide.

Add Knowledge

  1. Navigate to the Knowledge tab.

    image

  2. Click the "Add Knowledge" button.

    image

  3. Select your knowledge source. You can choose Websites or Files.

    image

Using Websites as Knowledge Source

To use websites as a knowledge source, press the "Add Knowledge" button in the Knowledge tab and select the Websites option. If you need further guidance, follow these instructions described above.

From this section, you can add one or multiple URLs at once. After adding the URLs, click the confirm button.

image

In a few moments, the websites will appear in the grid and start processing. Just wait a few seconds for the processing to finish, and the new knowledge will be available for the agent.

image

Tips

  • Use Accessible URLs: Make sure the website URL you provide is accessible from the internet, not restricted to private or intranet networks
  • Select Focused Sites: Choose websites with focused content, such as blogs, articles, or company websites, rather than large, complex sites like public forums or social media platforms
  • Verify Content Quality: Ensure the website contains high-quality, relevant information that aligns with the knowledge you want to extract
  • Avoid Dynamic Content: Avoid sites with rapidly changing content, such as news sites or live feeds, to maintain consistency in the extracted knowledge

Using Files as Knowledge Source

To use files as a knowledge source, press the "Add Knowledge" button in the Knowledge tab and select the Files option. If you need further guidance, follow these instructions described above.

From this section, you can upload one or multiple files at once. After uploading the files, click the confirm button.

image

In a few moments, the files will appear in the grid and start processing. Just wait a few seconds for the processing to complete, and the new knowledge will be available for the agent.

image

Wait for Processing

After you have uploaded files or added URLs and saved the changes, Serenity* Star will automatically begin processing the data. The processing involves the following steps:

  • 🔍 Extract content.
    • 📂 Files: Scanning the content of the uploaded files.
    • 🌐 Websites: Scraping the content from the provided URLs.
  • ✂️ Segment the content into sections.
  • ⚙️ Generate the embeddings.

You can track the status of each knowledge source from the "File Status" grid in the Knowledge tab. Once processing is complete, the status will change to Available, indicating that the knowledge is ready for the agent to use.

image

Manage Sections

Once the knowledge source has been successfully processed and is in the Available state, the "Show Sections" button will become visible. You can use this feature to view, edit, or delete specific sections of your knowledge source to correct or remove any unnecessary information.

Click the "Show Sections" button on the row to access the knowledge editor.

image

In the editor, all sections of the knowledge source will be listed, allowing you to view, delete, or modify them.

image

Any sections you modify, as well as the knowledge source they belong to, will be flagged to track changes.

image

image

Reprocess

If a website you've added as a knowledge source has been updated and you want these changes to be reflected in the agent’s responses, or if you’ve made modifications to the sections of a website or file and wish to restore the original content, you can reprocess the knowledge source.

The reprocess button will only be visible when the knowledge source meets one of the following conditions:

  • It's a website and it's currently in the available state.
  • It's a file and it's sections have been modified.
  • It's a website or file and it's currently in the error state.

To reprocess a knowledge source, click the dropdown button next to the file or website you wish to reprocess. From the dropdown menu, select the "Reprocess" option. This will prompt you to confirm the reprocessing.

image

Once you confirm, the knowledge source will be reset to its initial state and will be processed again as if it were a new knowledge source.

image

Delete

To delete a knowledge source, click the dropdown button next to the file or website you wish to delete. From the dropdown menu, select the "Delete" option. This action will prompt you to confirm the deletion.

image

Once you confirm, the deletion process begins. Serenity* Star will first delete the generated embeddings associated with the file. After the embeddings are removed, the file itself will be deleted from the system. This two-step process ensures that you have a chance to review and confirm your decision before the file and its associated data are permanently removed.

image

Test your agent with the new knowledge

Use the Agent Designer's preview pane to interact with the agent and check that it is using the knowledge correctly.

image

image

image

Advanced Settings

image

Within the advanced settings section, you can modify the following parameters.

  • Embedding Model: Model used to generate the vectors.

    You must have previously configured the API Key of the AI model vendor to use it.

  • Relevance: A decimal value between 0 and 1 that defines how similar the results should be when the agent searches for relevant information.

  • Limit Sections to Retrieve: An integer value between 1 and 20 that sets the maximum number of sections that can be obtained from the files.

Supported Files

FILE FORMATMIME TYPE
.txttext/plain
.pdfapplication/pdf
.docapplication/msword
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
.csvtext/csv
.mdtext/markdown