Create a RAGFlow knowledge base instance

Updated at:
Copy as MD

A RAGFlow knowledge base instance combines a vector database with Object Storage Service (OSS) to provide knowledge retrieval capabilities for RAG (Retrieval-Augmented Generation) applications. This topic describes how to create a RAGFlow knowledge base instance in the AI-Native Database Service console.

Prerequisites

  • A vector database instance of one of the following types is available, and the instance version meets the requirements:

    • AnalyticDB for PostgreSQL (version 7.0 or later)

    • PolarSearch

    • Lindorm

    • PolarDB for PostgreSQL

  • An OSS bucket is created in the same region as the vector database instance. The bucket stores the raw documents for the knowledge base.

  • The vector database instance and the OSS bucket are deployed in one of the following supported regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Hong Kong), Singapore, and Indonesia (Jakarta).

Usage notes

  • The vector database instance and the OSS bucket must be in the same region. Otherwise, the knowledge base instance cannot be created.

  • After the knowledge base instance is created, you cannot change the vector database engine type. Select an appropriate engine based on your business requirements before you create the instance.

  • Make sure that the VPC and vSwitch that you select can communicate with the vector database instance over the network.

Procedure

  1. Log on to the AI-Native Database Service console.

  2. In the left-side navigation pane, in the AI Data Preparation section, click Multimodal Data Preparation.

  3. On the Multimodal Data Preparation page, click the Create RAGFlow Instance card.

    The system redirects you to the instance creation page in the Data Transmission Service (DTS) console.

  4. On the instance creation page, configure the following basic parameters.

    Parameter

    Description

    Region

    Select the region for the knowledge base instance. Supported regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Hong Kong), Singapore, and Indonesia (Jakarta).

    Important

    Select the same region as the vector database instance and the OSS bucket.

    VPC

    Select the VPC for the knowledge base instance. To ensure network connectivity, select the same VPC as the vector database instance.

    vSwitch

    Select the vSwitch for the knowledge base instance. The vSwitch determines the zone in which the instance is deployed.

  5. Configure the vector database engine.

    Parameter

    Description

    Engine Type

    Select the vector database engine type. The following engines are supported:

    • AnalyticDB for PostgreSQL: Suitable for large-scale vector retrieval and analytics. Requires version 7.0 or later.

    • PolarSearch: Suitable for hybrid full-text and vector search scenarios.

    • Lindorm: Suitable for multimodal data management and vector retrieval scenarios.

    • PolarDB for PostgreSQL: Suitable for OLTP and vector retrieval hybrid workloads.

    Database Instance

    Select an existing vector database instance. The drop-down list displays only instances in the current region that meet the version requirements.

  6. Configure OSS storage.

    Parameter

    Description

    OSS Bucket

    Select the OSS bucket that stores the raw documents for the knowledge base. The drop-down list displays only buckets in the current region.

    File Path

    (Optional) Specify the directory path in the OSS bucket for storing knowledge base documents. If you leave this parameter empty, the root directory of the bucket is used.

  7. Verify the configuration and click Create.

After the instance is created, the instance status changes to Running. Go to the Multimodal Data Preparation page in the AI-Native Database Service console to view and manage the instance. Click the instance card to go to the DTS console for instance details.

Next steps

After the knowledge base instance is created, you can perform the following operations:

  • Upload documents to the OSS bucket. The system automatically parses and vectorizes the documents.

  • Call the knowledge base API to retrieve knowledge and integrate the retrieval capability into your RAG applications.