How veDB-Search Enables Scalable AI Hybrid Retrieval with a Single SQL

This article explains how veDB-Search provides a one‑stop hybrid search service that combines vector, full‑text, and scalar queries using only SQL, reducing development complexity and operational overhead for AI agents and large‑scale AI applications.

Volcano Engine Developer Services
Volcano Engine Developer Services
Volcano Engine Developer Services
How veDB-Search Enables Scalable AI Hybrid Retrieval with a Single SQL

AI Hybrid Retrieval: Challenges and Complexity

Hybrid retrieval is critical in AI applications, requiring vector recall, full‑text search, and scalar filtering/aggregation.

“Help me find SKU whose first image is similar to this shoe, sales in the last 7 days are non‑zero, the merchant has submitted certification, usage is outdoor climbing, material is quick‑dry breathable, supported max size at least 47, then aggregate average price by product ID and show the top 50.”

Developers face business complexity and operational complexity when using traditional infrastructure.

Business complexity : multiple systems, different SDKs, cross‑system joins and aggregations increase code complexity.

Operations complexity : deploying many independent services, building data‑sync pipelines (DTS/ETL), high deployment cost and low troubleshooting efficiency.

veDB‑Search, built on veDB MySQL, provides a one‑stop hybrid data management & retrieval service, improving development efficiency and reducing ops burden.

veDB‑Search: SQL is Everything

veDB MySQL is 100 % MySQL‑compatible. veDB‑Search extends it to store and retrieve vector + full‑text + scalar data using only SQL.

Key advantages:

Plug‑in service, transparent intelligent index acceleration.

Existing veDB users can enable hybrid search on demand.

Standard SQL, no changes for existing workloads; new workloads can use extended syntax.

Automatic hybrid index detection, query‑path optimization, and accelerated retrieval.

Billions‑scale, supports many algorithms, distributed parallel search.

Cloud‑native distributed architecture, seconds‑scale read scaling for 1 billion records.

Supports multiple SOTA indexes, quantization, and retrieval algorithms for diverse scenarios.

High‑concurrency read/write, distributed processing for high‑throughput mixed search.

Enterprise‑grade, high cost‑performance, high availability.

Millisecond CDC index builds, eliminating extra ETL configuration.

At billion‑scale, 0.95 recall and millisecond‑level P99 latency.

Comprehensive monitoring, load balancing, and failover support.

ByteDance AIGC Hybrid Retrieval Case

veDB‑Search powers a real AIGC asset‑management scenario where multiple embeddings per asset are queried together. The workload handles tens of millions of assets with daily growth of hundreds of thousands.

Using veDB‑Search reduces the system count from at least three (KV store, RDS, vector store) to a single veDB‑Search instance, cutting architecture complexity and decreasing operational cost by about two‑thirds.

Developers no longer need to integrate multiple SDKs or write complex join, filter, and aggregation code; a single SQL statement handles multi‑vector recall, scalar filtering, and aggregation, boosting development productivity and code maintainability.

AI Agent RAG Integration Example

Steps:

Data preprocessing: convert rich‑text SOP documents into segmented paragraphs.

Write to database.

Hybrid SQL query for multi‑path recall.

/* Create table with SOP metadata, image embedding, text content */
CREATE TABLE devops_sop(
  id INT NOT NULL AUTO_INCREMENT,
  content TEXT NOT NULL,
  content_emb VECTOR(1024) NOT NULL,
  img_url TEXT NOT NULL,
  img_emb VECTOR(1024) NOT NULL,
  censored TINYINT NOT NULL,
  env ENUM('cn-north','cn-south','cn-east','cn-west','others'),
  ANN KEY sop_hybrid_idx (content_emb, content, img_emb) SECONDARY_ENGINE_ATTRIBUTE='{"distance":"cosine","scalar_fields":"censored"}'
);

INSERT INTO devops_sop(content, content_emb, img_url, img_emb, censored, env) VALUES
  ("线上扩容教程,首先说明各运维动作前后所必须的检查逻辑,包括...",
   TO_VECTOR('[0.1,0.2,...]'),
   "http://img1",
   TO_VECTOR('[0.05,0.06,...]'),
   1,
   'cn-north');

SELECT content FROM devops_sop
WHERE env='cn-north' AND censored=1
  AND MATCH(content) AGAINST('xx 硬件型号缩容')
ORDER BY COSINE_DISTANCE(img_emb, TO_VECTOR('[0.1,0.3,0.02,...]'))
LIMIT 10;

The RAG case shows that a single SQL can perform complex hybrid retrieval, embodying the “SQL is Everything” principle.

Technical Architecture: Intelligent Index Acceleration

veDB‑Search uses hybrid ANN indexes and a deep‑optimized query engine, pushing vector and full‑text indexes to Volcano Engine Cloud Search.

Index creation, transparent sync via built‑in binlog CDC, and three query paths enable efficient mixed retrieval:

Pre‑filter : apply high‑selectivity scalar filter first, then vector KNN on the reduced set.

Post‑filter : perform vector KNN first, then scalar filter on the retrieved keys.

Full push‑down (KNN‑Filtered Query) : push both vector and scalar conditions to Cloud Search for a single remote execution.

AI Ecosystem Integration

veDB‑Search currently integrates with LangChain and Eino, allowing developers to use it as a standard VectorStore component. Future plans include adding more AI frameworks, exposing model capabilities, and turning the database from a data container into a next‑generation cognitive engine.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

SQLAIdatabaseRAGHybrid RetrievalveDB-Search
Volcano Engine Developer Services
Written by

Volcano Engine Developer Services

The Volcano Engine Developer Community, Volcano Engine's TOD community, connects the platform with developers, offering cutting-edge tech content and diverse events, nurturing a vibrant developer culture, and co-building an open-source ecosystem.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.