All Products
Search
Document Center

PolarDB:Use enterprise knowledge spaces

Last Updated:Sep 14, 2026

This topic describes how to create and manage knowledge spaces, create knowledge bases, upload documents, and test retrieval in the console.

Scope of application

The enterprise knowledge space engine is built on the integrated architecture core of PolarDB. It includes an orchestration engine, an intelligent search engine PolarSearch (based on inverted indexes and vector database), and PolarDB for MySQL for metadata management. The supported regions and zones are as follows:

Region

Zone

China (Hangzhou)

Zone I, Zone J, Zone K

China (Shanghai)

Zone E, Zone F, Zone L, Zone N

China (Beijing)

Zone F, Zone L, Zone I, Zone K

China (Shenzhen)

Zone C, Zone D, Zone F

China (Ulanqab)

Zone B, Zone C

Singapore

Zone A, Zone B

Create a knowledge space

You can create a knowledge space in the PolarDB console. After you create a knowledge space, the system automatically creates and associates a corresponding PolarDB cluster. You can view the associated PolarDB cluster on the details page of the knowledge space.

Warning
  • Each knowledge space corresponds to a dedicated, newly created PolarDB cluster. You cannot select or associate an existing PolarDB cluster.

  • Do not modify or delete the doc_search account or the polar_rag_meta database that the enterprise knowledge space automatically creates in the target PolarDB cluster.

  1. Log on to the PolarDB console.

  2. In the left-side navigation pane, choose PolarDB AI > PolarDB Enterprise Knowledge Space.

  3. Click Create Knowledge Space.

  4. In the Create dialog box, configure the following parameters.

    Parameter

    Required

    Description

    Knowledge Space Name

    Yes

    Enter a name for the knowledge space. Maximum length: 128 characters.

    Knowledge Space Notes

    No

    Enter a description for the knowledge space. Maximum length: 512 characters.

    Database Type

    Yes

    Select the database type. The default is MySQL. You do not need to change this value. This setting cannot be changed after creation.

    Large Language Model

    Yes

    Select a large language model. The valid options are dynamically provided by the platform and vary by region.

    Vector Model

    Yes

    Select a vector model. The default is text-embedding-v4. This setting cannot be changed after creation.

    Vector Dimensions

    Yes

    Set the vector dimension, which must match the selected vector model. The default value is 1024.

    Sorting Model

    No

    Select a reranker model to reorder the retrieval results. The default is qwen3-rerank. You can also select gte-rerank-v2.

    Sharding Strategy

    Yes

    Select a document chunking strategy. By default, Intelligent Sharding is used.

    Chunk Size (tokens)

    No

    Set the maximum number of tokens for a single chunk. The default value is 512.

    OSS Bucket

    Yes

    Enter the name of the OSS bucket that stores the source documents.

    OSS AccessKey

    Yes

    Enter the AccessKey ID for your OSS bucket.

    OSS Secret Key

    Yes

    Enter the AccessKey Secret for your OSS bucket.

    VPC Network

    Yes

    Select a VPC.

    Zone and vSwitch

    Yes

    Select a zone and a vSwitch. The zone must be one of the supported zones listed in Scope of application.

    Document ACL

    No

    After you enable this option, a permission-aware space is created, and all retrieval requests perform document-level ACL filtering. After you disable this option, an open space is created, and document-level ACL filtering is not performed. This setting can be configured only when you create the knowledge space and cannot be changed afterwards. Confirm whether to enable it based on the permission management requirements of your business before you create the knowledge space. Default: disabled.

  5. Click OK.

Enable public network access

  1. Create a public NAT gateway: Go to the NAT Gateway - Public NAT Gateway purchase page to create a gateway. During creation, make sure that you select the same VPC and vSwitch as your enterprise knowledge space.

  2. Configure an SNAT entry: Go to the Public NAT Gateway page. In the Operation column of the target gateway, click Configure SNAT , and then click Create SNAT Entry. Configure the parameters as follows:

    • SNAT Entry: VPC.

    • Select EIP: Select the EIP that provides public network access from the drop-down list.

Note

Enabling public network access incurs fees for the public NAT gateway and public network traffic. For more information, see NAT Gateway billing.

Manage knowledge spaces

After you create a knowledge space, you can view and manage existing knowledge spaces on the Enterprise Knowledge Space tab.

Edit a knowledge space

On the knowledge space card, click Edit to modify the name and description of the knowledge space.

Delete a knowledge space

Warning

Deleting a knowledge space also deletes all associated resources (indexes, pipelines, models, and connectors). This operation cannot be undone. Proceed with caution.

On the knowledge space card, click Delete, and then click Delete in the confirmation dialog box.

View knowledge space details

On the knowledge space card, click View Details to go to the Storage Management page. This page displays the basic information of the knowledge space (Vector Model, Dimension, Sorting Model, Sharding Strategy, OSS Bucket, ACL Mode, PolarDB Instance, and more), as well as the list of knowledge bases under the space.

Note
  • ACL Mode indicates whether document-level permission verification is enabled for the knowledge space. The value is determined by the Document ACL setting when the knowledge space was created, and cannot be changed afterwards.

  • PolarDB Instance is a link. Click it to go to the basic information page of the corresponding PolarDB cluster, where you can obtain the search node address required for subsequent MCP Server integration.

Create and manage knowledge bases

A knowledge base is a logical grouping unit within a knowledge space for organizing and managing documents. You can create multiple knowledge bases under a single knowledge space.

Create a knowledge base

  1. On the knowledge space details page, click Create Knowledge Base.

  2. In the Create dialog box, configure the following parameters.

    Parameter

    Required

    Description

    Knowledge Base Name

    Yes

    Enter a name for the knowledge base. Maximum length: 128 characters.

    Remarks

    No

    Enter a description for the knowledge base. Maximum length: 512 characters.

    Search Mode

    Yes

    Select a retrieval mode. Valid values:

    • Balanced Mode (default, BM25 50% + KNN 50%)

    • Precise Mode (BM25 70% + KNN 30%)

    • Semantic Mode (BM25 30% + KNN 70%)

    • KNN (pure vector retrieval)

    • RRF Fusion (rank fusion)

    Knowledge Base Type

    Yes

    Select the access scope of the knowledge base. Valid values:

    • Public (default): Available to authorized users within the knowledge space. The uploader receives management permissions, and other authorized users receive read-only permissions.

    • Private: Accessible only to the knowledge base owner. Suitable for personal materials, work notes, and draft content. Personal knowledge bases can be created only in permission-aware spaces where Document ACL is enabled.Before use, you must assign an owner and activate the knowledge base on the instance page in MCP Server.

  3. Click Create.

Edit a knowledge base

On the knowledge base card, click Edit to modify the name, retrieval mode, and description of the knowledge base.

Delete a knowledge base

On the knowledge base card, click Delete, and then click Delete in the confirmation dialog box.

Upload and manage documents

You can upload documents through the console or upload files to the OSS path corresponding to the knowledge base. After upload, the system automatically parses, chunks, and generates vector indexes for the documents.

Note

If Document ACL is enabled for the knowledge space, the permission sources for different access methods are as follows:

  • For documents uploaded through the console or synchronized from OSS, the system automatically derives the access scope based on the Knowledge Base Type setting. Public knowledge bases are accessible to authorized users within the space, and personal knowledge bases are accessible only to the owner. No manual Document ACL configuration is required.

  • Enterprise content sources (such as Feishu and SharePoint) connected through Add Synchronization Link carry source-side ACL. Users, user groups, and departments are mapped to normalized permission principals and synchronized to the retrieval index along with the documents.

  • For documents uploaded through MCP Tool, the server generates trusted permission context based on the authenticated identity and knowledge base policies. Clients cannot specify permission principals or override identity information. Open spaces do not perform document-level ACL filtering, but are still subject to knowledge base admission and space binding constraints.

Upload through the console

  1. On the knowledge space details page, click the target knowledge base to go to the knowledge base details page.

  2. On the File Overview tab, click Upload File.

  3. In the Upload dialog box, select a file and click OK. The maximum file size is 5 GB.

Upload through OSS

You can also upload files directly to the OSS path corresponding to the knowledge base. The path format is:

oss://<Bucket name>/<Knowledge space ID>/<Knowledge base ID>/

Example: oss://my-rag-bucket/space_001/kb_001/report.pdf

Document synchronization

Files uploaded through OSS are automatically synchronized to the knowledge base on a scheduled basis. To synchronize immediately, go to the File Overview tab on the knowledge base details page and click Trigger Sync.

Document processing status

Uploaded documents go through the following statuses during processing:

Status

Description

Pending

Submitted and waiting for processing resources to be allocated.

Chunking

The document is being chunked.

Vectorizing

Vector indexes are being generated.

Completed

The document has been processed and is available for retrieval.

Failed

Processing failed. Check the file format or contact technical support.

View document chunks

In the corresponding document row, click View Shards to view the chunk details of the document in the pop-up window.

Delete a document

Warning

Deleting a document also deletes the document from your OSS Bucket (<Bucket name>/<Knowledge space ID>/<Knowledge base ID>/). This operation cannot be undone. Proceed with caution.

In the corresponding document row, click Delete, and then click Delete in the confirmation dialog box.

Retrieval test

After documents are processed, you can test the retrieval results on the knowledge base details page.

  1. On the knowledge base details page, click the Retrieval Test tab.

  2. Configure the retrieval parameters.

    Parameter

    Description

    Query Statement

    Enter the text to retrieve.

    Search Method

    Select AISearch or Keyword Search.

    Return Count (Top-K)

    Set the number of most relevant results to return.

    Similarity Threshold

    Set the minimum similarity threshold. Results below this value are filtered out.

    Reranking

    Select whether to enable the reranker model to reorder the results. You can select Enabled - Use Sorting Model or Close.

  3. Click Start Retrieval to view matched document chunks in the Search Results section, including the source file, similarity score, and chunk content.