Skip to content
RAG Explained Better

Multi-Tenancy and Isolation in a RAG Index

Namespaces, per-tenant indexes and row-level filters: isolation decides if leakage is possible.

Multi-tenancy in a RAG index is the isolation model that keeps each customer’s vectors out of every other customer’s candidate set, and the model you pick (per-tenant shards, row-level filters or separate deployments) decides whether leakage is an application bug or an architectural impossibility. Weaviate’s multi-tenancy documentation (as of September 2026) states that multi-tenancy provides data isolation, that each tenant is stored on a separate shard, and that data stored in one tenant is not visible to another. Weaviate’s shard-isolation model sits beside AWS Bedrock Knowledge Bases multi-tenant patterns, Microsoft Learn isolation guidance, Nile’s tenant-aware Postgres writing, Zilliz and Pinecone multi-tenancy primers and Data Engineer Things’ one-versus-many vector-database essay (extracted September 2026) in the same decision space. Isolation belongs under indexing for RAG because the searchable structure is where tenant boundaries become real.

What does multi-tenancy mean for a RAG index?

Multi-tenancy for a RAG index means the system can store and search many customers’ corpora while enforcing a hard boundary on which objects a query may touch. Weaviate enables that boundary with multiTenancyConfig on the collection definition; multi-tenancy is disabled by default and must be turned on explicitly. Once enabled, operations name the tenant, and objects live on per-tenant shards rather than in one undifferentiated list.

That is different from a single shared index with a tenant_id metadata field. Metadata filters can approximate isolation when every query is correct; they do not make cross-tenant retrieval structurally impossible. The product question is which failure mode you accept when a filter is missing. SaaS RAG almost always wants the structural answer for customer data.

Why do shared indexes leak without isolation?

Shared indexes leak without isolation because ANN search returns nearest neighbours in whatever set it can see. If two customers’ embeddings share one graph or one flat list, a query embedding from customer A can surface customer B’s chunks whenever those vectors sit nearby and no predicate removes them. Prompt instructions such as “only use the current customer’s context” do not bind the retriever.

Leakage shows up as the wrong company’s pricing, tickets or HR policy in an answer. The symptom taxonomy lives on when RAG returns another tenant’s documents. The fix is not a better system prompt; it is an isolation model the index enforces on every retrieve path, including admin tools, eval jobs and bulk exports.

What isolation patterns do multi-tenant RAG systems use?

Three patterns dominate. Dedicated per-tenant shards or namespaces keep each tenant’s vectors in a separate searchable set (Weaviate’s tenant shards; similar namespace features in other stores). Row-level metadata filters keep one shared index and require every query to carry a tenant predicate. Separate deployments give each customer an entire cluster or project. AWS Bedrock’s multi-tenancy design notes and Data Engineer Things’ one-versus-many essay both organise the decision around isolation strength versus operational cost.

Weaviate’s model is the shard pattern: enable multi-tenancy on the collection, create tenants, and scope reads and writes by tenant name. Activity states include ACTIVE (available; formerly HOT before v1.26 renaming), INACTIVE (on disk; formerly COLD) and OFFLOADED for cloud offload. Auto-tenant creation can create tenants on insert when enabled (batch from v1.25.0, single inserts from v1.25.2), with a caution that typos create extra tenants. Tenant names are limited to alphanumeric characters plus underscore and hyphen, length 4 to 64.

Isolation patterns for multi-tenant RAG indexes
Pattern Isolation strength Typical cost shape Fails open when
Per-tenant shards (Weaviate tenants)Hard: other tenants not in the searchable setShard and file-handle overhead scales with tenant countYou query the wrong tenant name on purpose
Row-level tenant_id filterSoft: depends on every query attaching the filterOne index to operateAny path omits the filter
Separate deployment per customerHardest operationallyHighest fixed cost per customerCredentials or network policy are wrong

Weaviate’s docs state separate shards explicitly; Pinecone, Zilliz and Microsoft materials describe overlapping menus with different product names. That isolation matrix is the decision frame; product docs decide which pattern a given store implements well. Weaviate leads the shard row because its docs state separate shards and non-visibility across tenants as of September 2026.

When are metadata filters not enough for tenant isolation?

Metadata filters are not enough when the security requirement is “impossible to retrieve across customers,” not “correct when developers remember the filter.” Eval notebooks, new API handlers, analytics exports and broken client SDKs are routine omit paths. A shared HNSW graph with a missing tenant_id equality clause will happily return foreign neighbours.

Filters remain the right tool for facets and document ACLs inside a tenant. Combining shard isolation with per-document filters is normal: the shard picks the customer; the filter picks which of that customer’s documents the user may see. Filter operator depth lives on metadata filtering. Access-control product design beyond the index lives on access control.

What operational costs does per-tenant indexing add?

Per-tenant indexing adds shard count, file descriptors, scheduling and lifecycle operations. Weaviate’s tenant activity states exist so idle tenants can sit INACTIVE or OFFLOADED instead of consuming full hot resources. Auto-tenant creation speeds onboarding and also multiplies typos into real shards. Flat indexes remain attractive for small per-tenant datasets: Weaviate’s vector-index concepts page (as of September 2026) explicitly names multi-tenancy small collections as a flat-index fit, with dynamic promotion to HNSW when a tenant grows past the threshold.

Operating system map limits, backup fan-out and noisy-neighbour CPU are the practical follow-on costs Microsoft and AWS multi-tenant write-ups emphasise. None of those costs justify collapsing back to a shared filter-only model if leakage is unacceptable; they justify capacity planning and tenant lifecycle automation.

How should you choose a multi-tenancy pattern for RAG?

Choose per-tenant shards when customers are separate security domains and you can operate shard lifecycle (Weaviate’s enabled multi-tenancy path). Choose separate deployments when contractual isolation or residency rules demand more than logical shards. Choose row-level filters only for low-sensitivity partitioning inside one trust domain, or as a second layer inside a tenant. Measure the failure mode you refuse: fail-open filter bugs versus higher shard overhead.

Stores that expose some form of tenancy or namespacing include Weaviate, Pinecone, Qdrant and Milvus; verify the isolation guarantee in that product’s own docs rather than assuming “namespace” means separate shards. After the pattern is fixed, wire delete and update paths so tenant-scoped mutates cannot orphan vectors, and keep the leakage symptom page bookmarked for incident response.

How do you enable and operate tenants in Weaviate?

Enable multi-tenancy by setting multiTenancyConfig when creating the collection; Weaviate’s docs (as of September 2026) show Configure.multi_tenancy(enabled=True) in the Python client and equivalent calls in other languages. Add tenants manually with allowed names, or enable autoTenantCreation so inserts into unknown tenants create shards. Auto-tenant is powerful for bulk onboarding and hazardous when source data contains inconsistent spellings: TenantOne, tenantOne and TenntOne become three tenants.

List tenants, update activity status, and offload idle tenants as traffic patterns change. ACTIVE tenants serve queries; INACTIVE tenants sit on disk; OFFLOADED tenants use cloud offload paths documented in Weaviate’s tenant-state concepts. Always pass the tenant name on create, update, delete and query when multi-tenancy is enabled. Omitting it is an error path, not a cross-tenant search.

How do cloud RAG products describe multi-tenant patterns?

AWS Bedrock Knowledge Bases multi-tenant guidance organises design considerations and patterns around separating tenant configuration and retrieval scope, often with a control-plane store such as DynamoDB holding per-tenant settings. Microsoft Learn materials similarly separate shared infrastructure from tenant-scoped data planes. Those recipes are useful architecture menus; they are not a reason to skip shard-level isolation when the vector store offers it.

Data Engineer Things’ one-versus-many vector-database essay frames the dilemma as operational simplicity versus isolation strength. Nile’s tenant-aware Postgres work and TigerData primers show SQL-side tenancy patterns that can back RAG when vectors live in Postgres-shaped stores. Translate every recipe into the three-pattern table: shards, filters or separate deployments. If the recipe only adds a metadata key, treat it as filter isolation unless the product also separates indexes.

How does multi-tenancy connect to leakage incidents?

Leakage incidents are how you learn the isolation model was wrong. The user-visible symptom is another tenant’s document in an answer. The mechanism fix is shard or deployment isolation plus regression tests that attempt cross-tenant retrieve and expect zero hits. The failure page cross-tenant document leakage owns detection and response narrative; this leaf owns the index structure that should have made the retrieve impossible.

Eval suites must run inside tenant scope. A golden set that mixes customers’ documents in one shared index will not catch fail-open filters. Admin tools and notebook access need the same tenant parameter as production APIs. Backups and restores must not flatten shards into one collection without re-applying tenancy config.

Map and file-handle limits surface when tenant counts climb into the thousands. Weaviate operators commonly raise operating-system limits for processes that open many shard files; capacity planning should include peak ACTIVE tenants, not only total registered tenants. Offloading idle tenants is the productised response when most customers are quiet most of the time. A design that keeps every tenant ACTIVE forever will look fine in a pilot and fail in a marketplace launch.

Backup and restore must preserve tenant boundaries. Restoring into a collection with multi-tenancy disabled, or merging shards into one flat collection for “simpler analytics,” recreates the shared-index leakage path. Analytics workloads that need cross-tenant aggregates should use a separate, access-controlled pipeline over exported data, not a God-mode vector query that disables tenancy.

Onboarding automation should create the tenant, apply default activity state, seed any baseline documents and verify a negative test: a token for tenant A must retrieve zero objects when querying tenant B’s name. That negative test belongs in CI beside ordinary recall tests. Without it, multi-tenancy is a config flag nobody proved.

Pricing and packaging sometimes push teams toward shared indexes. If contracts promise logical separation only, document that filters are the control and accept the fail-open risk explicitly with security stakeholders. If contracts promise that customer data cannot be retrieved across tenants, pay for shards or separate deployments. Weaviate’s “data in one tenant is not visible to another” statement (as of September 2026) is the Tier-1 wording that matches the stronger promise.

Small-tenant performance often favours flat indexes per shard. Weaviate’s concepts page (as of September 2026) calls out multi-tenancy small collections as a flat fit with linear search that stays acceptable while object counts are low, then points dynamic indexing at the growth path. A marketplace where most tenants have hundreds of documents should not pay full HNSW RAM per tenant on day one. A tenant that grows into millions of chunks should not stay on flat because onboarding used flat defaults.

Cross-region residency requirements can force separate deployments even when logical shards would suffice for confidentiality. If customer contracts name a region, a single multi-tenant cluster in one region may be legally wrong regardless of shard isolation. In that case the isolation pattern is geographic deployment topology first, tenants second.

Security reviews should ask three questions. Can a query omit the tenant key and still search? Can an operator run a cross-tenant aggregate in the vector API? Can a backup restore collapse tenants? If any answer is yes without a break-glass control, isolation is incomplete. Weaviate’s requirement to specify the tenant name on multi-tenant operations is the happy-path answer to the first question when multi-tenancy is enabled correctly.

Migration from filter-only to shard isolation is a project, not a config flip. You must create tenants, copy objects into tenant-scoped writes, verify counts per tenant, switch readers to pass tenant names, then delete the shared collection. Running both models in parallel during migration without clear routing is a classic leakage window. Schedule the cutover like a data migration because it is one.

Tenant lifecycle includes offboarding. Deleting a tenant must remove its shard data under the retention rules you promise customers. Soft-deleting application users while leaving tenant shards searchable is another leakage class: former customer data remains nearest-neighbour reachable to anyone who can name the tenant. Pair tenant delete with the vector delete path and with legal retention schedules on the GDPR leaf when personal data is in scope.

Load tests should include many ACTIVE tenants with realistic per-tenant corpus sizes, not one giant shared collection. Query planners and caches behave differently when the working set is one shard versus thousands. Weaviate’s efficiency claim for multi-tenancy operations assumes tenant-scoped access; prove it under the tenant count you expect at launch plus headroom.

Finally, document the isolation promise in architecture decision records so future engineers do not “simplify” back to a shared index during a performance firefight. The correct response to shard overhead is offloading, flat indexes for small tenants, or capacity, not removing the boundary that made the product safe.

GitHub multi-tenant RAG sample architectures in the live teardown set are useful for seeing request paths that pass tenant ids from auth into the vector client. Copy the wiring idea, not necessarily the shared-index shortcut some demos still use. Production isolation follows the stronger of your contract and your threat model.

Weaviate Cloud and self-hosted deployments share the same multi-tenancy concepts in the docs extract used here; operational limits differ by hosting. Re-check map counts, offload behaviour and support guidance for the environment you run before a large tenant launch.

Support runbooks should include tenant name as a required field in every ticket that involves retrieval bugs. Debugging without the tenant is how engineers reproduce “works on my shared collection” and miss shard-specific corruption or empty tenants.

Enterprise search and agent products that share one brand across many customers inherit this leaf even when marketing never says “multi-tenant.” If two customers can authenticate, the index needs an isolation story before the first shared demo goes live.

Ship the negative cross-tenant test before the marketing launch, not after the first incident review.

Multi-tenancy is the index-level answer to “whose data may this query see?” Weaviate’s separate-shard model (as of September 2026) makes cross-tenant invisibility structural; filter-only designs make it aspirational. Pick shards when leakage must be impossible, use filters inside the tenant for finer ACLs, and treat cross-tenant retrieval as the incident shape that tells you the wrong pattern shipped.