OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.5

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.5
    iconOceanBase Database
    SQL - V 4.3.5
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    AI application workflow with OceanBase vector search

    Last Updated:2026-04-09 02:53:55  Updated
    share
    What is on this page
    Core steps

    folded

    share

    This topic describes the AI application workflow with OceanBase vector search.

    Core steps

    1. Convert unstructured data into feature vectors using vector embedding

    The workflow begins with unstructured data, such as videos, documents, and images. These diverse forms of unstructured data are converted into vector representations through vector embedding models. The task of these models is to transform raw, complex unstructured data into high-dimensional vectors. These vectors capture the semantic information and features of the data, and their similarity can be expressed through distances in the vector space. For more information, see Vector embedding technology.

    2. Store vector embeddings and create vector indexes in OceanBase Database

    As the core storage layer, OceanBase Database stores all types of data, including traditional relational tables for business data, raw unstructured data, and vector data generated from vector embeddings. For more information, see Store vector data.

    To enable efficient vector search, OceanBase Database builds vector indexes internally for vector data. A vector index is a specialized data structure that significantly accelerates nearest neighbor search in high-dimensional vector spaces. Since computing vector similarity is computationally intensive, exact search (which calculates the distance for every vector) ensures accuracy but results in a significant drop in query performance. With vector indexes, the system can quickly locate candidate vectors, greatly reducing the number of vectors that need distance calculations while maintaining high accuracy and significantly improving query efficiency. For more information, see Vector index.

    3. Perform nearest neighbor search and hybrid search using SQL or SDK

    Users interact with the AI application through clients or programming languages, submitting queries that may involve text, images, or other data types. For more information, see Supported clients and languages.

    OceanBase Database uses SQL statements to query and manage relational data, enabling hybrid search for both scalar and vector data. When a user initiates a query, if it's an unstructured query, the system first converts it into a vector using the vector embedding model. Then, the system leverages vector indexes and scalar indexes to quickly search for vectors that are most similar to the query vector and meet the scalar filtering conditions. This process efficiently retrieves the most relevant unstructured data. For more information about nearest neighbor search, see Nearest neighbor search.

    4. Generate prompts and submit them to the LLM for inference

    In the final stage, the system generates optimized prompts based on the results of the hybrid search and submits them to the large language model (LLM) for complete inference. The LLM generates natural language responses based on these contextual inputs. There is a feedback loop between the LLM and the vector embedding model, meaning that the LLM's outputs or user feedback can be used to optimize the vector embedding model, creating a continuous learning and optimization cycle.

    What is on this page
    Core steps