Vector Search: Storing and Querying Embeddings for RAG
Who this is for:
Architecture / Concept Overview: Vector Search: Storing and Querying Embeddings for RAG
Vector Search syncs embeddings from Delta tables into an optimised index served by a dedicated endpoint.
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
flowchart LR
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
DELTA[Delta Table] -->|Sync| PIPELINE[Embedding Pipeline]
PIPELINE -->|Embed| EMB_MODEL[Embedding Model Endpoint]
EMB_MODEL -->|Store| INDEX[Vector Search Index]
QUERY[Query Text] -->|Embed| EMB_MODEL
QUERY -->|Search| INDEX
INDEX -->|Top-K Results| APP[Application / RAG Chain]
DELTA:::source
PIPELINE:::ingestion
EMB_MODEL:::processing
INDEX:::storage
QUERY:::source
APP:::serving
*Vector Search syncs from Delta, computes embeddings automatically, and serves similarity queries.*
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
graph TD
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
INDEX_TYPES[Index Types] --> DELTA_SYNC[Delta Sync Index]
INDEX_TYPES --> DIRECT[Direct Access Index]
DELTA_SYNC --> TRIGGERED[Triggered Pipeline]
DELTA_SYNC --> CONTINUOUS[Continuous Pipeline]
DELTA_SYNC --> AUTO_EMB[Auto-Computed Embeddings]
DIRECT --> MANUAL[Manual Upsert]
DIRECT --> PRE_EMB[Pre-Computed Embeddings]
INDEX_TYPES:::governance
DELTA_SYNC:::processing
DIRECT:::storage
TRIGGERED:::ingestion
CONTINUOUS:::ingestion
AUTO_EMB:::source
MANUAL:::serving
PRE_EMB:::source
*Vector Search index types: Delta Sync (automatic) and Direct Access (manual).*
Key Terms
Prerequisites and Setup
- Unity Catalog enabled.
- A Vector Search endpoint created in the workspace.
- For auto-embedding: a Foundation Model embedding endpoint (e.g.,
databricks-bge-large-en). SELECTon the source table andCREATEon the target schema.
Step-by-Step Implementation
Configuration Reference
| Parameter | Default | Description |
|---|---|---|
endpoint_type | STANDARD | Vector Search endpoint type |
index_type | DELTA_SYNC | Index type: DELTA_SYNC or DIRECT_ACCESS |
pipeline_type | TRIGGERED | Sync mode: TRIGGERED or CONTINUOUS |
embedding_dimension | model-dependent | Dimension of embedding vectors |
num_results | 10 | Number of nearest neighbours to return |
filters | None | Metadata filters as SQL-like predicates |
score_threshold | None | Minimum similarity score to include |