Vector Search & RAG

HeliosDB Lite keeps vectors and business data in one database for AI applications: embeddings stored in VECTOR columns beside the rows they describe are searched through HNSW indexes, and ordinary SQL predicates such as a category filter narrow the same query, so a retrieval-augmented application gets relevant, filtered context without synchronising a separate vector database.

Executive Summary

HeliosDB Lite eliminates the operational complexity of building RAG (Retrieval-Augmented Generation) systems by combining PostgreSQL-compatible relational data, built-in HNSW vector indexing, and embedding management in a single embedded database.


Problem Being Solved

Core Problem Statement

This fragmentation forces engineering teams to manage two data pipelines, two consistency models, and two operational systems - creating deployment bottlenecks, increasing latency, and making edge/embedded AI deployments impossible.

Who Suffers Most

  • AI Platform Engineers: Managing embedding pipelines across microservices (vector generation → storage → indexing → cleanup) requires custom orchestration. HeliosDB Lite eliminates the entire pipeline.
  • Edge AI Startups: Building autonomous vehicles, IoT devices, or drone swarms cannot use cloud vector DBs (no connectivity). Local FAISS lacks SQL, making hybrid queries impossible. HeliosDB Lite enables offline-capable AI.
  • Enterprise Search Teams: Maintaining separate PostgreSQL (documents) + Pinecone (embeddings) with nightly ETL sync creates 24-hour staleness and data sync bugs.
  • LLM Application Builders: Using LangChain/LlamaIndex frameworks fighting with vector store abstractions and embedding management. HeliosDB Lite is the native solution.

HeliosDB Lite Solution

Architecture Overview

┌──────────────────────────────────────────────────────────────────┐
│                 HeliosDB-Lite RAG Application                      │
├──────────────────────────────────────────────────────────────────┤
│                                                                    │
│  ┌─────────────────┐  ┌──────────────┐  ┌──────────────────┐     │
│  │   SQL Layer     │  │ Vector Search│  │ Embedding Mgmt   │     │
│  │ (PostgreSQL)    │  │   (HNSW)     │  │ (Auto-indexing)  │     │
│  └────────┬────────┘  └──────┬───────┘  └────────┬─────────┘     │
│           │                   │                    │               │
│           └───────────────────┼────────────────────┘               │
│                               │                                    │
│  ┌────────────────────────────▼──────────────────────────┐        │
│  │         Unified Transaction Context (MVCC)           │        │
│  │    - Atomic SQL + Vector updates                      │        │
│  │    - Snapshot isolation across both layers            │        │
│  │    - ACID guarantees for embeddings                   │        │
│  └────────────────────┬─────────────────────────────────┘        │
│                       │                                            │
│  ┌────────────────────▼──────────────────────────────┐            │
│  │     Storage Engine (LSM + Columnar)               │            │
│  │  - Row storage for SQL data                       │            │
│  │  - Column storage for vectors (SIMD optimized)    │            │
│  │  - Compression: ALP for vectors, Zstd for data   │            │
│  └─────────────────────────────────────────────────┘            │
│                                                                    │
└──────────────────────────────────────────────────────────────────┘

Concrete Examples with Code, Config & Architecture

Example 1: Customer Support AI Agent - Embedded Configuration

Scenario: SaaS company building AI-powered customer support agent that answers questions using knowledge base (docs + previous resolved tickets). 10,000 documents, 100K embedding vectors, 1,000 concurrent agents.

Architecture:

Customer Application (Rust/Python)
    ↓
HeliosDB-Lite Embedded Client
    ↓
In-Process HNSW Index + LSM Storage
    ↓
Local File System (./support.db)

Configuration (heliosdb.toml):

[database]
path = "/var/lib/support-ai/support.db"
memory_limit_mb = 512
enable_wal = true
page_size = 4096

[vector]
enabled = true
dimensions = 384                # OpenAI embedding size
metric = "cosine"               # Cosine similarity
index_type = "hnsw"
hnsw_m = 16                     # Connections per node
hnsw_ef_construction = 200      # Quality vs speed tradeoff

[embedding]
auto_generate = false           # Manual embedding generation
embedding_service = "openai"
batch_size = 100
cache_embeddings = true

[monitoring]
metrics_enabled = true
verbose_logging = false

Example 2: Recommendation Engine - Python Integration

Scenario: E-commerce platform with 1M products, embedding-based recommendations. Python backend generating recommendations for 100K concurrent users.

Performance Results:

  • Throughput: 100,000 recommendations/second per instance
  • Memory per 1M products: 512MB (with int8 quantization)
  • No external dependencies needed

Example 3: Local RAG for Edge Devices - Offline Knowledge Retrieval

Scenario: Offline AI assistant on iOS/Android device with knowledge base (Wikipedia articles, user docs) cached locally. Must work without internet.

Configuration (heliosdb.toml):

[database]
path = "/data/edge_knowledge.db"
memory_limit_mb = 256         # Mobile devices have limited RAM
enable_wal = true
page_size = 2048

[vector]
enabled = true
dimensions = 128              # Smaller embeddings for mobile
metric = "cosine"
quantization = "int8"
index_type = "hnsw"
hnsw_m = 8                    # Smaller index for mobile

[mobile]
enable_sync = true
sync_endpoint = "https://api.example.com/sync"
sync_interval_secs = 3600
battery_aware = true          # Reduce operations when low battery

Adoption Strategy

Phase 1: Proof of Concept (Weeks 1-4)

Target: Validate RAG performance vs. existing vector DB

Tactics:

  • Deploy HeliosDB Lite alongside existing vector DB
  • Migrate 1000 documents + embeddings
  • Run parallel queries, compare latency/cost
  • Measure dev effort for single RAG feature

Phase 2: Pilot Deployment (Weeks 5-12)

Tactics:

  • Monitor performance, consistency, errors
  • Measure user engagement metrics (conversion rate, etc.)
  • Migrate 10K documents from cloud vector DB

Phase 3: Full Rollout

Tactics:

  • Migrate all embedding services to HeliosDB Lite
  • Decommission external vector DB
  • Train team on new architecture
  • Publish internal case study

Conclusion

Vector search is reshaping how applications deliver personalized AI experiences - but the operational complexity of managing separate vector databases alongside relational stores is strangling RAG adoption.

HeliosDB Lite is the answer for teams that value developer productivity, operational simplicity, and real-time performance.

Performance depends on workload and hardware. Published figures are measured on representative fixtures; see the benchmarks page and reproduce them on your own workload.