Skip to main content

Connecting to external knowledge bases

The XpertAI Agent Platform supports connecting to external knowledge bases, expanding the knowledge boundaries of agents through system integration. This feature allows your agent to directly access and utilize specialized information stored in external knowledge bases without the need for repeated uploads or data migration, ensuring data consistency while enhancing the accuracy and professionalism of the agent's responses.

This article will provide a detailed guide on how to configure and use the external knowledge base feature on the XpertAI platform.

Preparationโ€‹

Before starting the configuration, ensure you have the following information ready:

  1. External Knowledge Base API Endpoint: This is the URL address XpertAI uses to access your knowledge base, typically provided by your knowledge base service provider.
  2. Authentication Key (if required): If your knowledge base requires an API Key, AK/SK, or other forms of authentication, obtain it in advance.
  3. Knowledge Base Identifier (ID or Name): If your external knowledge base system manages multiple bases, you need to specify the ID or name of the specific knowledge base to connect.
info

Currently supported knowledge base providers include: RAGFlow, Dify, and FastGPT.

Configuration Stepsโ€‹

Below are the detailed steps to connect an external knowledge base on the XpertAI platform.

Step 1: Access the System Integration Pageโ€‹

  1. Log in to the XpertAI Settings module.
  2. In the left navigation bar, locate and click "Integrations."
  3. On the "Integrations" page, select the provider type related to the knowledge base.
  4. Enter the base address and authorization information, then click Create.

Step 2: Add an External Knowledge Base Connectionโ€‹

Navigate to the "Knowledge Base" page in the workspace: Click to connect an external knowledge base, fill in the basic information, and select a knowledge base integration connection.

Step 3: Advanced Settings (Optional)โ€‹

The XpertAI platform provides advanced retrieval parameter configurations to optimize recall performance:

  • Top K: Sets the number of the most relevant text segments returned per retrieval. Increasing this value may return more relevant information but could also introduce more irrelevant data. The default is typically 3โ€“5.
  • Score Threshold: Sets the relevance score threshold; only text segments with scores above this value will be returned. Increasing this value can make results more precise but may reduce the number of results. The default is typically 0.5.

You can adjust these parameters based on subsequent test results.

Step 4: Save and Test the Connectionโ€‹

  1. After filling in all necessary information, click the "Connect" button.
  2. If the configuration is correct, the system will display a connection success message.
  3. It is strongly recommended to use the "Test Recall" function. Enter a test question or keyword to verify whether XpertAI can correctly retrieve relevant text segments from your external knowledge base.

Applying the External Knowledge Base in Agentsโ€‹

Once the connection is successful, you can use this external knowledge base when creating or editing an agent.

Troubleshootingโ€‹

IssuePossible CauseSolution
No results from test recallIncorrect API endpoint or knowledge base IDVerify the endpoint URL and knowledge base ID are correct.
Authentication failureInvalid or expired API KeyCheck and update the API Key.
Irrelevant retrieval resultsImproper retrieval parameter settingsAdjust Top K and Score Threshold; check the document quality and indexing settings of the knowledge base.
Connection timeoutNetwork issues or firewall restrictionsCheck network connectivity and ensure XpertAI services can access your knowledge baseโ€™s API address.

Conclusionโ€‹

By connecting to an external knowledge base, the XpertAI Agent Platform can deeply integrate into your enterpriseโ€™s knowledge ecosystem, fully leveraging the value of existing knowledge assets to build smarter and more professional AI applications. If you encounter any issues during the configuration process, please feel free to contact our technical support team.