RAG at Scale in 2026: Vector Search Without the Bill
Retrieval is where RAG budgets die: naive setups re-embed and re-search everything on every turn. The 2026 playbook — quantized HNSW, hybrid BM25+vector, query caching, and rerank only the top-k — cut our clients retrieval spend by 70%.
Model tokens get the attention, but retrieval infrastructure decides whether RAG is profitable: embedding recomputation, oversized top-k fetches, and full reranks on every turn compound fast at scale. The stack we run for clients — custom HNSW indexes with scalar quantization plus Postgres pgvector for metadata filtering — is the same vector-search practice behind the case studies on the ATLAS homepage (/).
Architectural Pillars & Findings
- 01.Quantize the index: scalar or binary quantization cuts vector memory ~70% with negligible recall loss, letting 20M+ embeddings fit on one node.
- 02.Go hybrid: BM25 keyword search plus vector similarity beats either alone on real queries — especially for names, SKUs, and error codes.
- 03.Cache the query layer: agent sessions repeat the same grounding lookups; a semantic cache with 0.97 similarity threshold absorbs most of them.
- 04.Rerank only top-20, return top-5: cross-encoder reranking is the most expensive step — never rerank the full candidate set.
- 05.Chunk for retrieval, not for humans: 300–500 token overlapping chunks with section headers outperform pretty document splits on recall@10.
-- Hybrid retrieval: vector similarity + keyword rank
SELECT id, content,
(embedding <=> $1) * 0.7 + ts_rank(tsv, q) * 0.3 AS score
FROM chunks, plainto_tsquery($2) q
WHERE tsv @@ q OR (embedding <=> $1) < 0.6
ORDER BY score LIMIT 20; -- rerank these, return 5RAG at scale is an infrastructure discipline: quantize, hybridize, cache, and measure recall like an SLO. If your agent answers are slow or expensive, the fix is almost never a bigger model — it is the retrieval layer. See how we build it in the project case studies linked from the ATLAS homepage (/).