Kingbase Banner

On-Premises RAG Data Platform: Prerequisites, Configuration

A technical tutorial concept image showing precision tools arranged on a clean surface, representing the structured configuration of an on-premises RAG data platform.

Prerequisites: Network Isolation and Environment Variables

On-premises deployment begins with strict network isolation. The environment must reside in private subnets with no public internet egress for data traffic. This ensures that embeddings, metadata, and raw documents never leave the corporate firewall.

Prerequisites include specific environment variables and non-root user permissions. KingbaseES requires a dedicated installation directory and data directory.

Set the following environment variables before installation.

export KINGBASE_HOME=/opt/Kingbase/ES/V9/kingbase
export PATH=$KINGBASE_HOME/Server/bin:$PATH
export PATH=$KINGBASE_HOME/ClientTools/bin:$KINGBASE_HOME/ClientTools/guitools/KStudio:$PATH
export KINGBASE_DATA=/opt/Kingbase/ES/V9/data
export KINGBASE_PORT=54321

Verify the installation directory exists and has correct permissions.

ls -l $KINGBASE_HOME
ls -l $KINGBASE_DATA

Ensure the network configuration blocks outbound traffic to public IP ranges. Use firewall rules to allow only internal traffic. This step is critical for data sovereignty.

Architecture: Polyglot Persistence for RAG Workloads

Polyglot Persistence states that enterprise applications use multiple data storage technologies because different parts of the application have different access characteristics. RAG architectures are a prime example.

A transactional system of record stores document metadata, user permissions, and audit logs. This layer requires strong consistency. KingbaseES provides this foundation. It supports Oracle syntax compatibility mode during initialization. This mode helps legacy enterprise applications migrate smoothly.

KingbaseES RAC (Real Application Clusters) offers a shared storage cluster solution. It provides high availability and performance. The architecture includes three node types.

Node Type Role in RAG Metadata Layer
Coordination Node Manages client connections and query distribution.
Transaction Node Handles transaction processing and metadata updates.
Data Node Stores the physical data files for metadata and access control.

The vector layer handles embedding generation and similarity search. This workload is read-heavy and computationally intensive. It does not require ACID transactions for every vector query. Therefore, it should reside in a dedicated vector store or a specialized database engine.

The document layer stores raw files. These files are large and accessed sequentially. They should reside in object storage or a dedicated file system within the private network.

This separation ensures that a spike in vector search queries does not degrade the performance of metadata transactions. It also allows each layer to scale independently.

Metadata Ingestion: Migrating Legacy Systems to KingbaseES

Enterprise RAG platforms often start with existing data silos. Financial reports may live in Oracle. Legal contracts may be in SQL Server. Internal wikis may be in MySQL. Migration of this metadata is the first step in building the system of record.

KingbaseES provides a migration tool called KDMS. This tool supports migration from DB2, Oracle, SQL Server, and MySQL sources. It helps move legacy metadata into KingbaseES while maintaining data integrity in an offline environment.

Use the following steps to plan the metadata migration.

  1. Identify the source databases containing document metadata.
  2. Install KDMS on a server within the private network.
  3. Configure KDMS to connect to the source database using internal IP addresses.
  4. Define the mapping between source tables and KingbaseES tables.
  5. Run the migration in a test environment first.
  6. Verify the row counts and checksums in KingbaseES.
  7. Switch the RAG orchestration layer to read from KingbaseES.

KingbaseES supports offline delivery. This feature allows the database to be installed and configured without internet access. This is essential for air-gapped environments.

KingbaseES control files are stored logically in the sys_global tablespace. The physical location is $KINGBASE_DATA/global/sys_control. Ensure this path is backed up regularly.

Vector Layer Integration: Handling Embeddings On-Premises

RAG retrieval requires vector similarity search. KingbaseES is a commercial database software. It does not have verified native vector search capabilities for RAG embeddings in the current evidence package. Therefore, the architecture must treat the vector layer as a separate component.

The orchestration layer handles document chunking and embedding generation. It sends the resulting vectors to the dedicated vector store. The vector store performs the similarity search.

To maintain data sovereignty, the vector store must also reside on-premises. It connects to KingbaseES for metadata filtering. This creates a hybrid search pattern.

  1. The orchestration layer queries KingbaseES for metadata filters. For example, filter documents by department or date.
  2. KingbaseES returns a list of candidate document IDs.
  3. The orchestration layer sends the query vector and the candidate IDs to the vector store.
  4. The vector store performs a restricted similarity search within the candidate set.
  5. The vector store returns the top results.
  6. The orchestration layer fetches the raw documents from the document layer using the returned IDs.

This pattern ensures that the vector store only processes relevant data. It also keeps the metadata in KingbaseES, where access control is enforced.

KingbaseES supports JSONB columns which can be used for metadata filtering in conjunction with a vector store, but specific RAG optimization is not documented.

Access Control: Application-Layer Identity Management

Data governance requires fine-grained access control. Users should only see documents they are authorized to access. This control must be enforced at the data platform level.

Enterprise identity providers like LDAP or Active Directory (AD) are the standard for user management. The RAG platform must integrate with these providers.

KingbaseES does not have verified native LDAP configuration steps in the provided evidence. Access control integration is an application-layer responsibility. The orchestration layer acts as the gatekeeper.

  1. The user submits a query to the RAG application.
  2. The application authenticates the user against LDAP/AD.
  3. The application queries KingbaseES for the user’s permissions.
  4. KingbaseES returns the allowed document categories or IDs.
  5. The application applies these filters to the metadata query.
  6. The restricted metadata is sent to the vector store.
  7. The vector store returns results that match both the query and the permissions.

This pattern ensures that access control is applied before the vector search. It prevents unauthorized users from retrieving sensitive documents.

KingbaseES also supports role-based access control. Use roles to define different levels of access for different user groups. This simplifies permission management.

Validation: Verifying Data Sovereignty and Integrity

Validation is critical for on-premises RAG platforms. You must prove that no data leaves the corporate firewall. You must also ensure that the RAG pipeline functions correctly.

KingbaseES provides an intelligent handling workstation. This tool supports log analysis, 14 read-only inspections, and Word report generation. It uses natural language query matching to help administrators understand system health.

Use the following checklist to validate the platform.

  • Network Egress Check: Verify that firewall logs show no outbound traffic to public IP ranges from the RAG servers.
  • Metadata Integrity: Run a checksum comparison between the source metadata and KingbaseES after migration. Use sys_dump to verify backup integrity.
  • Vector Store Isolation: Confirm that the vector store is accessible only from the orchestration layer and KingbaseES.
  • LDAP Integration: Test user login with a non-admin user to ensure LDAP authentication works at the application layer.
  • Access Control Test: Attempt to query a document the user is not authorized to see. Verify that the result is denied.
  • Latency Check: Measure the time from query submission to result retrieval. Ensure it meets enterprise SLAs.
  • Audit Log Review: Use the KingbaseES intelligent workstation to review log files for any unauthorized access attempts.

KingbaseES supports offline delivery. This feature ensures that the database can be deployed and validated without internet access. This is essential for air-gapped environments.

Troubleshooting and Rollback Strategies

RAG platforms are complex. Updates to the orchestration layer or the vector store can disrupt enterprise search services. A rollback strategy is necessary to maintain continuity.

KingbaseES RAC provides high availability. It offers fault-perception-free operation. This feature helps minimize downtime during database maintenance.

Plan the following rollback procedures.

  1. Database Rollback: If a metadata schema change breaks the RAG pipeline, restore KingbaseES from a pre-update backup. Use sys_restore to recover the database state.
  2. Vector Index Rollback: If a new embedding model produces poor results, revert the vector store to the previous index version. Keep multiple index versions in the private storage.
  3. Orchestration Rollback: If the orchestration layer update introduces bugs, revert to the previous version of the orchestration code. Ensure the code is version-controlled.
  4. Network Rollback: If a network configuration change causes connectivity issues, revert the firewall rules to the previous state.

KingbaseES RAC architecture includes coordination nodes, transaction nodes, and data nodes. If a data node fails, the RAC solution automatically redirects traffic to healthy nodes. This ensures that metadata remains available during troubleshooting.

Use the KingbaseES intelligent workstation to generate read-only SQL for unmet queries. This tool helps administrators diagnose performance issues without risking data modification.

FAQ

How can we validate that no data leaves the corporate firewall during the RAG pipeline execution?

Check firewall logs for outbound traffic to public IP ranges. Ensure that the RAG servers are in private subnets with no public internet egress. Use network monitoring tools to alert on any unauthorized outbound connections.

What are the trade-offs between custom-built RAG pipelines and pre-packaged on-premises solutions?

Custom-built pipelines offer maximum flexibility and control over each layer. They require significant engineering effort. Pre-packaged solutions are easier to deploy but may limit customization. They may also introduce vendor lock-in. Choose based on engineering capacity and long-term maintenance goals.

How to ensure compatibility with existing legacy document formats (PDF, DOCX, PPTX) without cloud conversion?

Use on-premises document processing libraries. These libraries run within the private network. They convert documents to text or chunks locally. This avoids sending data to cloud conversion services. Ensure the libraries are updated regularly for security.

What verification steps confirm the integrity of vector search results in a closed environment?

Compare the top-k results from the vector store with a known ground truth dataset. Use precision and recall metrics to evaluate accuracy. Ensure that the metadata filtering in KingbaseES correctly restricts the candidate set before the vector search.

How to plan rollback strategies if an on-premises RAG update disrupts enterprise search services?

Keep previous versions of the orchestration code, vector indices, and database backups. Test the rollback procedure in a staging environment first. Ensure that the rollback process is documented and automated where possible. Use KingbaseES RAC to maintain database availability during the rollback.


💡 More Resources

If you would like to dive deeper into KingbaseES and its application practices across various industries, we have compiled the following official resources to help you get started quickly and develop and operate with efficiency:

  • Kingbase Community: A one-stop interactive platform for technical exchanges, Q&A, and experience sharing—join forces with fellow DBAs and developers.
  • Kingbase Solutions: One-stop full-stack database migration and cloud-native solutions, supporting smooth migration of multi-source heterogeneous data, ensuring high availability, real-time integration, and sustained high performance.
  • Kingbase Case Studies: Real-world user scenarios and implementation outcomes, showcasing KingbaseES’s outstanding capabilities in high availability, high performance, and IT adaptation.
  • Kingbase Documentation: Authoritative and comprehensive product manuals and technical guides, covering the entire lifecycle from installation and deployment to development, programming, and operations management.
  • Free Download: Get the latest installation packages, drivers, tools, and patches, supporting multiple platforms and domestic chip architectures.
  • Digital Construction Encyclopedia: Covers digital strategy planning, data integration, metrics management, database visualization applications, and more to empower enterprise digital transformation.

Open Source Resources:

Welcome to explore the resources above and begin your Kingbase journey!