Shared RAG index with metadata filters started cracking around 30 tenants
We've been doing customer-facing RAG for about a year. Each customer uploads their own docs, and they only see results from their own corpus.
Started in a single Pinecone index with namespaces per tenant. Worked fine through the first 10 or so customers, then namespace count itself became an ops headache, so we flipped to a single namespace and tenant_id metadata filter on every query. That carried us to maybe customer 18. Then a few things started getting weird.
Recall got noticeably worse for tenants with smaller corpora. I don't have a great theory for why, but my hunch is that hybrid scoring inside a giant shared index starts being dominated by the term distribution of larger tenants. If 80% of your docs are from three big customers, and a fourth customer searches a term that's common in their own docs but rare in the shared corpus, BM25 weights end up looking strange. The vector side was less obviously broken. With top-K retrieval and a metadata filter, small-corpus tenants were sometimes getting fewer than K candidates back at all, which then fed a reranker that didn't have enough to work with.
The other issue was operational. A reindex of any single tenant's docs meant reprocessing them inside the shared ingestion pipeline. Updates to one customer's content sometimes stalled because of an ingestion job from a different customer. Not a great look when the customer with the slow job is also the one paying the most. Granted, that one isn't really an index-topology problem. You could parallelize workers and keep the index shared. But the two failure modes started compounding, and the simplest fix for both at once was just per-tenant everything.
So now I'm trying to decide whether to flip to per-tenant isolated indexes. The downside is obvious. Thirty separate indexes to keep an eye on, plus you're paying for storage thirty times instead of once. You also lose the ability to do cross-tenant analytics, which we do use occasionally for product decisions.
What I keep going back and forth on is whether this is an architectural question or just a "your shared index needs better scoring" question. At 30 tenants both stories are plausible. At 100 I don't know which one breaks first, and the migration cost of switching topologies later is not small.
Mostly trying to figure out how other people drew the line.