This topic describes how to use Data Transmission Service (DTS) to create and use a RAGFlow knowledge base.
Scope
A vector database of one of the following types is created:
An AnalyticDB for PostgreSQL instance with a Database Engine Version of 7.0 Standard Edition.
NoteThe kernel of the AnalyticDB for PostgreSQL instance must be upgraded to 7.2.1.2 or later, and vector search engine optimization must be enabled.
A Lindorm instance with the Search Engine and Vector Engine enabled.
Create an OSS Bucket in the same region as the vector database. Set the Storage Class to Standard and the Storage Redundancy Type to Zone-redundant Storage (Recommended).
Regions: This feature is available only in the China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), and China (Hong Kong) regions.
Notes
After a public endpoint is enabled for a RAGFlow knowledge base, it cannot be disabled.
A registered RAGFlow account is valid only for the RAGFlow knowledge base for which it was created.
Billing
For more information, see Billing for AI data preparation.
Procedure
Create a RAGFlow knowledge base
Go to the RAGFlow knowledge base list page for the destination region.
Log on to the Data Transmission Service (DTS) console.
In the left navigation pane, click Data preparation.
In the upper-left corner of the page, select the region where your data preparation instance is located.
Click the RAGFlow Knowledge Base tab.
Click Create Knowledge Base to open the configuration page.
Configure the RAGFlow knowledge base.
In the Deployment Scope section, specify the Instance Name for the RAGFlow knowledge base.
In the Network and Zone section, select a VPC, a Primary Zone and VSwitch, and a Secondary Zone and VSwitch for the RAGFlow knowledge base.
In the RAGFlow Knowledge Base Configuration section, specify the Number of Knowledge Base Services.
NoteFor this example, keep Configuration Plan set to Default.
In the Vector Database Configuration section, configure the vector database.
Engine: ADB PostgreSQL
Set Engine to ADB PostgreSQL. In the Database section, select the destination AnalyticDB for PostgreSQL instance and enter its Database Name, Database Account, and Password.
Engine: Lindorm
Set the Engine to Lindorm. In the Database section, select the destination Lindorm instance and enter the Database Account and Password.
In the OSS Configuration section, select the destination bucket and enter a storage path.
After completing the configuration, click Buy Now on the right side of the page.
Return to the RAGFlow knowledge base list page and wait until the knowledge base is in the Normal state (i.e., its Running Status is Running).
NoteYou can click the
icon in the upper-right corner to refresh the task list and view the latest status of the RAGFlow knowledge base.
Configure an IP whitelist
In the Actions column for the target RAGFlow knowledge base, click Configure Whitelist.
In the Configure Whitelist panel, you can add IP addresses or CIDR blocks to the whitelist based on the access method.
Access Method
Example Scenario
IP Whitelist to Add
Description
Internal network
The client and the RAGFlow knowledge base are in the same VPC.
The private IP address or CIDR block of the client.
Separate multiple IP addresses or CIDR blocks with a comma (,).
To find the public IP address of the client, run the
curl ipinfo.io/ip(recommended) orcurl ifconfig.mecommand.
Internet
The client is on your local server.
The public IP address or CIDR block of the client.
Click Set.
Log on to RAGFlow
In the Actions column for the target RAGFlow knowledge base, click Manage.
NoteYou can also click Log On To Knowledge Base in the Actions column and choose whether to log on through the internal network or the Internet.
In the Endpoint section, click Log On With Public Endpoint or Log On With Internal Endpoint.
NoteTo access the RAGFlow knowledge base over the internet, you must enable a public endpoint for the instance.
On the logon page, enter your email address and password, and then click Log On.
On the RAGFlow page, you can manage knowledge bases and perform other operations.
NoteFor more information about the operations, see the official RAGFlow documentation.

(Optional) Configure the network
By default, RAGFlow cannot access external networks. To add model providers in RAGFlow, you must configure a NAT Gateway for the VPC that the vector database uses. This allows RAGFlow to access external models.
Connect through PrivateLink (Alibaba Cloud Model Studio)
Accessing the Alibaba Cloud Model Studio platform through a private network improves the security and efficiency of data transmission. You can use PrivateLink to establish a network connection between a VPC and Alibaba Cloud Model Studio. For more information, see Access Alibaba Cloud Model Studio models or application APIs over a private network.
Connect through the internet
Configure a NAT Gateway for the VPC that the vector database uses to allow RAGFlow to access external models. For more information about NAT Gateway, see Public NAT Gateway.
Appendix
Enable a public endpoint
In the Actions column for the target RAGFlow knowledge base, click Manage.
In the Endpoint section, click Enable Public Endpoint.
In the Enable Public Endpoint dialog box, click OK.
Wait for the Running Status in the Basic Information section to change to Running.
Register a RAGFlow account
Go to the RAGFlow logon page for the target RAGFlow knowledge base.
On the RAGFlow logon page, click Register.

Enter an email address, name, and password for the account.

Click Continue.
A
message appears at the top of the page, indicating that the account is registered.