This topic describes how to enable and use the Knowledge Platform of PolarDB for PostgreSQL.
The Knowledge Platform feature is currently in preview. To use this feature, submit a ticket.
Overview
Knowledge Platform is an ontology knowledge graph building and management platform provided by PolarDB for PostgreSQL. You can use this platform to model your enterprise data as a semantic knowledge graph and leverage large language models (LLMs) to intelligently analyze data structures, automating the transformation from data to knowledge.
Knowledge Platform provides the following core features:
ONTOLOGY building: Model business data into a semantic knowledge graph. This feature supports intelligent modeling with LLMs, rapid modeling, schema change detection, and data synchronization.
GraphRAG: An enhanced retrieval system based on graph structures. It parses document content into an entity-relation graph to support multi-modal retrieval and intelligent Q&A.
SKILLS management: Define and manage operational skills that an AI agent can call. It supports uploading and downloading skill packages and automatically generating skill definitions from the ontology.
System management: Global system configuration and operations management, including user management, role management, token management, and access control.
API: A complete RESTful API that supports integration with external systems and AI agents.
Activate Knowledge Platform
Log in to the PolarDB console. In the left navigation pane, choose .
On the PolarDB AI Overview page, click Create AI Application.
On the Create AI Application page, configure the following parameters:
For Architecture, select AI Application.
For Ecosystem, select PostgreSQL.
For AI Application, select Ontology Knowledge Graph.
Set the AI Application Name, LLM Model, Account Password, and Knowledge Platform Login Password.
NoteAccount Password: The system uses this password to automatically create a database account.
Knowledge Platform Login Password: This is the login password for the Knowledge Platform. The default username is
admin.
After completing the purchase, wait for the application to be created. This process takes about 5 to 10 minutes.
Log on to the Knowledge Platform
Return to the page. Click the Application ID/Name of your polardb_knowledge application to open the details page.
Configure Whitelist: To allow your service to access the Knowledge Platform, add your environment's IP address to the whitelist.
On the application details page, click the Whitelist tab.
Configure the whitelist policy:
Add Whitelist: Add the CIDR block of the VPC or vSwitch that needs to access the Knowledge Platform.
Select Security Groups: Add the security group that needs to access the Knowledge Platform.
Log In:
On the application details page, click the Basic Information tab.
In the upper-right corner, click Interact to open the login page.
Enter your username and password, and then click Log In.
NoteThe default username is
admin, and the password is the Knowledge Platform Login Password you set when you created the application.After logging in, the system displays the overview page.
ONTOLOGY building
The ONTOLOGY building module is the core of the Knowledge Platform. It models enterprise data into a semantic knowledge graph and supports features such as intelligent modeling with LLMs, rapid modeling, schema change detection, and data synchronization.
For detailed instructions, see ONTOLOGY building.
GraphRAG
GraphRAG is a graph-based, knowledge-enhanced retrieval system. It parses document content into an entity-relation graph to support multi-modal retrieval and intelligent Q&A. This allows the AI to answer complex semantic questions that span multiple documents and sections.
For detailed instructions, see GraphRAG.
SKILLS management
The SKILLS management module defines and manages the operational skills that an AI agent can call. It includes the following functions:
Skill CRUD: Create, edit, delete, and query skill definitions, with support for search and category filtering.
Skill definition: Use Markdown to write skill documentation, define skill parameters, specify execution methods, and associate skills with Action types.
Preset skills: Import built-in preset skill packages, with support for one-click import and version management.
Skill package management: Upload and download skill packages in ZIP format to facilitate skill distribution and reuse.
Skill generation: Automatically generate corresponding skill definitions from Action Types in the ontology.
System management
The system management module enables administrators to manage global system configuration and operations. It includes the following sub-modules:
User management: Create and maintain user accounts, with support for enabling or disabling users and storing custom attributes.
Role management: Define and assign roles, such as admin, developer, and viewer, with support for a role hierarchy.
User group management: Create user groups and manage group members to assign permissions at the group level.
Token management: Manage API keys (administrator level) and personal access tokens (user level), with support for token creation, revocation, and encrypted storage.
ACR configuration: Define and manage fine-grained access control rules (ACRs) and configure the bindings between rules and user groups.
System configuration: Configure global system settings, including database connections, document engine types, Object Storage Service (OSS), and RAGFlow service connections.
API
The Knowledge Platform provides a complete set of RESTful APIs. These APIs allow you to call all platform functions, including ontology operations, graph queries, action execution, knowledge base management, and user authentication. You can integrate these APIs into external systems and AI agents. The system also supports automatic generation of Swagger (OpenAPI) documentation to help developers get started.