If your documents, permissions, and pipelines already live in Snowflake, Databricks, or BigQuery, standing up a separate vector database means new infrastructure, a second copy of governed data, and a second access-control model to keep honest.
Tier: Core · Workflow area: RAG data pipelines
The warehouse vendors noticed: Snowflake Cortex Search, Databricks Mosaic AI Vector Search, and BigQuery VECTOR_SEARCH over AI.EMBED output let you serve retrieval where the data already sits — inheriting the governance, tenancy, and ops you have. This playbook decides when warehouse-native wins, builds the retrieval path in SQL-adjacent tooling, and evaluates it with the same golden-set harness as every other playbook so the decision is measured, not ideological.
Confirm the fit honestly. Warehouse-native wins on governance inheritance, zero new infra, and pipeline adjacency (dbt models feed the index directly). It concedes on query latency floors (warehouse serving layers are typically tens-to-hundreds of ms and per-query cost is metered), exotic index tuning (pb-32 knobs are mostly managed away), and portability. If p95 retrieval under ~50 ms or fine HNSW control is a hard requirement, go back to pb-31's dedicated-engine branch. Record the call.
Prototype the shape locally first. DuckDB's vss extension gives a laptop-scale rehearsal of "vectors as a table column + SQL search" so the pipeline design is settled before burning warehouse credits:
INSTALL vss; LOAD vss;
CREATE TABLE chunks (chunk_id TEXT, doc_id TEXT, content TEXT, embedding FLOAT[1024]);
-- embeddings from sentence-transformers, per pb-30
CREATE INDEX idx ON chunks USING HNSW (embedding);
SELECT chunk_id, doc_id FROM chunks
ORDER BY array_distance(embedding, $query_vec::FLOAT[1024]) LIMIT 10;
Build the managed path on your warehouse. The three equivalents, each fed by a governed table of parsed chunks (pb-27 output as a dbt model):
AI.EMBED (or AI.GENERATE_EMBEDDING) populates a vector column, CREATE VECTOR INDEX builds ANN, VECTOR_SEARCH queries it:CREATE VECTOR INDEX chunk_idx ON rag.chunks(embedding)
OPTIONS (index_type = 'IVF', distance_type = 'COSINE');
SELECT base.chunk_id, base.doc_id, distance
FROM VECTOR_SEARCH(TABLE rag.chunks, 'embedding',
(SELECT AI.EMBED('what is the late-delivery penalty?') AS embedding),
top_k => 10);
Wire freshness the warehouse way. Point the index at the table your ingestion dbt job maintains: Delta Sync (Databricks) and Cortex Search's target-lag setting handle incremental refresh declaratively; on BigQuery, schedule index refresh alongside the ingestion job. Then verify it: apply a source edit and measure minutes until the new content retrieves — this is pb-36's freshness SLA, now a configuration assertion instead of a pipeline you wrote.
Evaluate with the same golden set — the metric layer. The pb-28 harness ports directly: run the 30–50 golden questions through the warehouse retrieval path and compute recall@10, plus p95 query latency and cost per 1K queries from the warehouse's own metering. The decision-grade output is a three-column comparison:
Expected shape:
local pgvector : recall@10 0.84 · p95 45ms · infra you run
warehouse-native : recall@10 0.83 · p95 210ms · $X per 1K queries, zero new infra
Near-parity recall with governance inherited for free is the common result — and exactly the evidence that closes the "but shouldn't we run a real vector DB?" debate one way or the other.
Verify governance inheritance — the reason you chose this path. Confirm row-access policies and masking on the chunk table actually constrain retrieval results per caller (run pb-38's leakage assertions through the warehouse path), and that retrieval queries appear in the warehouse audit log like any other query. If the serving layer bypasses table policies (read the vendor's fine print for service-account patterns), you have lost the main benefit — fix the service's query context before go-live.
Warehouse-native retrieval trades peak performance and knob control for inherited governance and zero new systems. That is frequently the right trade for enterprise internal RAG — but only the golden-set-plus-latency-plus-cost table from step 5 proves it for your workload.
Warehouse-native is often the most client-friendly retrieval architecture: data never leaves the client's existing cloud contract, their masking and row-access policies keep working, and there is no new vendor to push through procurement — lead with that in the proposal. The obligations that remain are cost and verification: agree the per-query cost model in writing (metered serving on client credits can surprise a client who expected flat infrastructure cost), run the step-6 governance tests with the client's security team witnessing, and deliver the recall/latency/cost comparison table so the architecture choice is documented as measured rather than assumed. Prototype on your own trial account or the BigQuery sandbox with synthetic documents; touch client tables only after access is formally granted through their standard warehouse roles.