Retrieval-augmented generation is the pattern that has graduated from clever-trick to default-architecture in approximately eighteen months. The open-source tooling is mature, the decisions are well-understood, and the engineering effort to stand up a self-hosted RAG stack is a fraction of what it was at the beginning of the cycle. The interesting question in 2026 is not whether to do RAG — almost everyone with a corpus is doing some version of it — but how to make the architectural choices that survive the second year of operation rather than the first three months.
This piece is the practitioner's tour of those choices. Vector database selection, embedding model selection, chunking discipline, hybrid retrieval, citation pipeline — the components every serious RAG stack contains, and the tradeoffs nobody warns you about until you are already living with them.
Vector database selection — the decision that most teams overthink
The vector database is, in 2026, the most over-discussed component of a RAG stack. The pattern I see repeatedly: teams spend six weeks comparing vector database options before they have built any retrieval at all, settle on one based on benchmarks that do not match their workload, and then discover that the operational characteristics that actually matter for their use case are not the ones the benchmarks measured. The result is a perfect choice on the wrong axis.
The honest framing is that for most workloads, the choice between the leading open-source vector databases is not load-bearing. They are all fast enough, scale well enough, and have query interfaces that meet the requirements of typical RAG workloads. The decision should be made on operational maturity, not on theoretical performance. Three questions matter, in order:
- How does it back up and restore? A vector database with no clean backup story is a database you will eventually regret. Test the backup and restore process before you trust it with a corpus.
- How does it handle concurrent writes during a re-index? The naive read-only-then-swap pattern is fine for small corpora. At any meaningful scale, the ability to write during a re-index without downgrading query performance is the difference between routine maintenance and a maintenance window.
- What happens at the storage limit? Some vector databases handle storage growth elegantly; others require a manual capacity event. Find out which class you are in before you hit the wall.
Beyond these three operational questions, the choice between leading options is mostly aesthetic. Pick the one with the documentation your team finds clearest and the operational model your team can run.
The vector DB tradeoff matrix
The shorthand comparison that captures the choice for the three options that show up in most procurement conversations:
| Dimension | Dedicated vector DB | PostgreSQL with vector extension | SQLite + vector extension |
|---|---|---|---|
| Query speed at 10M vectors | Excellent | Good | Adequate |
| Query speed at 100M vectors | Excellent | Adequate with tuning | Not viable |
| Hybrid (dense + sparse) | Built-in or strong | Native via SQL | Manual |
| Operational complexity | New service to run | Existing Postgres muscle | None |
| Filter-then-search | Strong | Native (SQL) | Native (SQL) |
| Backup story | Vendor-specific | Standard Postgres tools | File copy |
| Suits team scale | Mid-large | Most teams | Small teams, single-node |
The under-recognised result here is that for most teams under ten million vectors, an existing Postgres instance with a vector extension is the right answer. It avoids introducing a new operational dependency, it inherits the team's existing backup discipline, it handles filter-then-search natively through SQL, and it is fast enough. The dedicated vector database becomes the right answer at scale or when the workload has specific properties — very high query concurrency, very low latency requirements, or specific advanced retrieval features — that justify the operational tax.
Embedding model selection — the decision that actually matters
Embedding model selection is, in 2026, considerably more consequential than vector database selection and considerably less discussed. The embedding model is what determines whether semantically related material gets clustered correctly in vector space; everything else in the retrieval stack works downstream of that decision.
The honest framing on quality: open-weights embedding models have closed the gap with closed-weights alternatives on most domain-specific corpora to the point that the marginal advantage of going closed is small to invisible. The exception is the last two or three percentage points of recall on very general corpora, where closed-frontier embedders still hold a measurable edge. Most production corpora are narrow enough that this edge does not materialise.
Things that matter and tend to be underweighted: embedding dimension (smaller is faster and cheaper to store but loses nuance, and the right dimension is corpus-dependent), maximum input length (some models truncate aggressively in ways that silently break chunking strategies that exceed it), and multilingual coverage (matters more than people realise the moment a corpus contains anything non-English). The decision that survives is to evaluate two or three open-weights candidates against a representative test set of the team's own queries — fifty to a hundred queries is usually enough to see the shape — and pick on the data, not on the leaderboard.
The chart shows a representative result on a domain-specific corpus. The shape is consistent across corpora I have benchmarked: large open is close to closed frontier, and the gap between small open and large open is meaningful. Choose the largest open-weights embedder that runs economically; the marginal step to closed frontier is rarely worth the dependency.
Chunking strategies that actually preserve semantics
Chunking is where most of the engineering effort and most of the quality variance live. The default — fixed-size sliding windows — is fine on the surface and quietly broken at the edges. A document split mechanically every five hundred tokens will cut a paragraph in the middle of a sentence, a list in the middle of an enumeration, a table between its header and its body. Each of these cuts destroys the relevance signal at exactly the chunks that should have been most useful.
The disciplined chunker reads the document's structure first. Headings, sections, paragraphs, bulleted lists, tables, code blocks, and quoted passages are all structural units that should be respected. The chunking pass produces semantically coherent units — usually a paragraph or a small group of related paragraphs — with overlap at boundaries to retain context across chunk transitions. The implementation is more work than a sliding window. The retrieval quality difference is the entire ball game.
Equally important is chunk-level metadata. Every chunk should carry the source document identifier, the section path, the document timestamp, and any tags relevant to access control or filtering. Retrieval queries can then filter on metadata before vector similarity, which dramatically tightens the relevance of results and lets a single index serve multiple use cases without cross-contamination.
The chunking failure modes I see most often: chunks that are too small (the dense-model fails to find enough signal); chunks that are too large (the dense-model finds the right chunk but generation has to wade through irrelevant text); chunks that ignore document structure (the right facts are scattered across multiple chunks and retrieval surfaces only one of them); and chunks without metadata (filtering is impossible, so the relevance work all has to happen in vector space, which is expensive and imprecise).
Hybrid retrieval — why dense alone is not enough
Pure dense retrieval — embedding the query, doing nearest-neighbour search in vector space — is the popular pattern and the wrong default. It misses keyword matches that are semantically out-of-distribution, it over-weights surface similarity in ways that surface near-matches over real matches, and it has no good way to handle queries that ask for specific identifiers, codes, or terms that should match exactly.
Hybrid retrieval combines dense semantic search with sparse keyword search — the canonical example is BM25 — and merges the results. The mechanism is simple. Dense retrieval is good at semantic alignment; sparse retrieval is good at exact-term matching; the combination handles the cases either alone misses. The merge logic varies (reciprocal rank fusion is a popular choice, simple weighted score combination is another), but the principle is consistent: two complementary signals beat either alone on most production workloads.
The implementation cost is small. Most modern vector databases either include sparse search natively or pair cleanly with a sparse index. The retrieval pipeline runs both queries in parallel, merges the results, and returns the combined ranking. The result on a representative corpus is typically a five-to-fifteen-percent improvement in recall@5 over dense-only, with no measurable cost in latency at the scales most teams operate at. It is the highest-leverage retrieval improvement available short of upgrading the embedding model.
The citation pipeline — the discipline that catches problems
A retrieval call that does not produce citations is half a retrieval call. The citation is what lets a downstream consumer — a user, an auditor, another agent in the loop — verify what the retrieval layer actually returned. The minimum citation payload is the source document identifier, the chunk identifier, the relevance score, and enough text to anchor a reader's eye to the cited material in the source.
The discipline that catches problems early is wiring citations through the entire generation pipeline. When the generation model produces an answer, every claim should be tied to a citation that came back from retrieval; claims without citations are flagged. This catches hallucination at generation time, when it can still be corrected, rather than at deployment time when the buyer notices a fabricated fact.
It also unlocks a meaningful share of audit-grade and institutional use cases. A retrieval layer that surfaces citations cleanly can participate in proof-of-process verification work; a retrieval layer that does not cannot. The implementation cost of citations is small if designed in from the start; the retrofit cost is large. Build it from day one.
Why most teams over-engineer this layer
The pattern I see in teams that have been doing RAG for less than a year: they build a stack with five layers of abstraction, four optional re-ranking passes, three different retrieval strategies that can be selected at runtime, and an evaluation harness that compares all of them on every query. The system is enormously sophisticated and produces retrieval quality that is roughly equivalent to a much simpler stack with one good embedding model, one good chunking pass, hybrid retrieval, and a citation pipeline.
The over-engineering happens because the framework ecosystem encourages it — every framework offers configurable knobs for every component, and teams turn the knobs without measuring whether the knob mattered. The result is a stack that is harder to operate, harder to debug, and not measurably better than a simpler one.
The minimal stack that is enough for the overwhelming majority of production workloads:
- One open-weights embedding model, evaluated against the team's queries.
- One vector database, chosen on operational fit.
- Disciplined structural chunking with chunk-level metadata.
- Hybrid retrieval (dense + sparse) with a simple merge.
- A citation pipeline that wires through to generation.
- An evaluation harness that runs on a representative test set.
That is six components. They are all simple. None of them are exotic. Together they handle most of what production RAG actually requires. The extra layers — re-ranking, query rewriting, multi-hop retrieval, agentic retrieval — are real techniques that move the needle on specific workloads, but they are interventions to make once the basics are measured and known to be insufficient, not defaults to bake in from the start.
The operational reality at scale
The operational concerns that dominate at any scale beyond a single-node deployment are not the ones the architecture diagrams emphasise. The actual operational pain points: re-indexing windows during embedding-model upgrades; storage growth in the vector database; the long tail of corpus updates where individual documents change without triggering a full re-index; and the discovery, three months in, that the queries the team built for are not the queries users actually issue.
The disciplines that handle these gracefully: every chunk has a content hash and an embedding-model identifier, so re-embedding is incremental rather than catastrophic; storage growth is monitored and capped before it becomes urgent; corpus updates trigger targeted re-embedding rather than full rebuilds; and the evaluation harness runs against real production queries (sampled and anonymised) rather than the synthetic test set the team built initially. None of this is exotic. All of it is invisible in the architecture diagram and load-bearing in production.
Self-hosted RAG in 2026 is mature, well-understood, and considerably less heroic to deploy than the framework ecosystem would suggest. The decisions that actually matter — embedding model, chunking discipline, hybrid retrieval, citation pipeline — are a small set, well-bounded, and have right answers that hold up across most production workloads. The decisions teams over-think — vector database benchmark performance, abstraction layers, configurable retrieval strategies — are mostly aesthetic, and the time spent on them is time not spent on the components that move the needle.
The minimal stack is enough for almost everyone. Build it carefully, evaluate it on real queries, instrument the operational concerns from day one, and the system will outperform considerably more sophisticated alternatives across the kinds of workloads that real businesses actually run. The teams getting this right in 2026 are not the ones with the cleverest architecture; they are the ones with the most disciplined evaluation harness and the most boring deployment.
Get on the newsletter Long-form analysis on sovereign infrastructure, retrieval architecture, and the engineering choices that compound across years. Once a fortnight, no upsell. Join the newsletter →