InlockGoverned & cited answersWorkspace-first

LLM Multi-Zakupnost: Izolacija Radnih Prostora u Poslovnom AI

Organisations that get this right will be able to deploy AI broadly and confidently across every team, every use case, and every regulatory boundary — without sacrificing the speed and cost advantages that make shared infrastructure worth pursuing in the first place.

·9 min read
RBAC & workspace isolationPrivate AI deploymentAudit & provenance

Inlock focus

Inlock AI nameće čvrste granice radnih prostora tako da svaki tim, odeljenje ili klijent radi u potpuno izolovanom AI okruženju — deljene infrastrukture, nula curenja podataka. Ugrađeni RBAC i sloj revizije znači da možete dokazati izolaciju revizorima bez prilagođenog inženjeringa.

LLM Multi-Tenancy: Workspace Isolation in Enterprise AI

Deploying a large language model for one team is an infrastructure project. Deploying it for twenty teams — across legal, finance, HR, product, and external clients — is an architecture problem. The moment you introduce multiple consumers onto a shared AI platform, you have a multi-tenancy challenge: how do you give every group a productive, personalised AI experience while guaranteeing that one tenant's data, prompts, and model context never leak into another's?

This is not a hypothetical concern. In 2023, Samsung engineers inadvertently exposed proprietary source code by pasting it into a shared ChatGPT session. That incident involved an external, public service — but the same failure modes can appear inside enterprise deployments when workspace isolation is treated as an afterthought. The stakes are higher in regulated industries: a healthcare provider whose clinical-note assistant bleeds data between departments could face HIPAA violations; a financial institution whose trading-desk LLM exposes deal-room context to retail bankers could trigger market-abuse investigations.

This post examines the architectural patterns, failure modes, and control mechanisms that make enterprise LLM multi-tenancy safe, auditable, and operationally efficient.


Why Multi-Tenancy Is Inevitable — and Why It's Dangerous

The economic case for shared infrastructure

Running a dedicated GPU cluster for every business unit is prohibitively expensive. High-end LLM inference hardware carries five- and six-figure monthly costs, and utilisation per team is typically bursty and uneven. Multi-tenancy lets enterprises pool that compute, smooth out demand spikes, and serve dozens of internal or external tenants from a single fleet — dramatically improving the unit economics of private AI.

The data-bleed threat surface

LLMs are stateful in ways relational databases are not. A SQL database enforces row-level security at query time, independent of what any other user has queried before. An LLM, by contrast, can carry context across a conversation, cache key-value attention states, and — in some serving frameworks — reuse computation in ways that blur tenant boundaries. The principal failure modes are:

  • •Context window contamination: A previous tenant's prompt remnants survive in the active context, influencing the next tenant's response.
  • •KV-cache side channels: Shared KV-cache entries, if not properly scoped, can allow one tenant's tokens to influence another's generation probabilities.
  • •RAG index cross-contamination: A retrieval-augmented generation system backed by a shared vector store can surface documents belonging to Tenant A when Tenant B issues a semantically similar query.
  • •System-prompt leakage: Misconfigured prompt templates expose the instructions — and potentially secrets — baked into one tenant's system prompt to another.
  • •Audit log co-mingling: Without proper partitioning, compliance teams may inadvertently access another department's AI interaction history.

Isolation Layers: A Defence-in-Depth Model

Robust multi-tenancy requires isolation at multiple stack layers simultaneously. No single control is sufficient on its own.

1. Identity and authentication layer

Every API call to the LLM platform must carry a cryptographically verified tenant identity. JSON Web Tokens (JWTs) scoped to workspace identifiers, mutual TLS between services, or short-lived service-account credentials are all viable mechanisms. The key requirement is that the inference engine never processes a request without first resolving which tenant is making it.

This sounds obvious, but many early enterprise deployments treat the LLM API as an internal service that is "trusted by default" — omitting token validation entirely. That assumption collapses the moment a misconfigured service mesh routes a request to the wrong upstream, or a developer accidentally hard-codes a shared credential.

2. RBAC and workspace scoping

Role-Based Access Control must extend beyond who can call the API to encompass:

  • •Which model versions a tenant can access (preventing exposure of fine-tuned models trained on another group's data)
  • •Which system prompts are injected (ensuring a tenant cannot override or inspect another's configuration)
  • •Which RAG indexes are searchable (enforcing document-level and collection-level tenant boundaries)
  • •Which tools and function calls are permitted (a legal team's LLM should not be able to invoke the finance team's internal APIs)

Workspace scoping means every resource — model, index, tool, prompt template, conversation history — is tagged with a tenant identifier and enforced at the platform level, not left to individual application developers to implement correctly.

3. Inference-layer isolation

At the inference engine itself, two patterns dominate:

Hard isolation (separate model instances): Each tenant runs against a dedicated model replica. This is the safest approach — zero shared state — but it multiplies compute costs and increases cold-start latency for low-traffic tenants.

Soft isolation (shared instance with strict context management): A single model instance serves multiple tenants, but the serving layer enforces per-request context flushing and prohibits KV-cache sharing across tenant boundaries. Modern inference frameworks like vLLM and TGI offer prefix-caching controls and request-level memory isolation that make this practical, but it requires careful configuration and ongoing validation.

For highly regulated workloads — healthcare, defence, legal — hard isolation is worth the premium. For internal enterprise tooling with moderate sensitivity, well-configured soft isolation is often adequate, provided it is paired with strong controls at every other layer.

4. RAG and vector store partitioning

Retrieval-augmented generation dramatically expands the value of an enterprise LLM, but it also expands the attack surface for cross-tenant data exposure. The correct architecture:

  • •Namespace-level partitioning: Every document ingested into the vector store is tagged with a namespace corresponding to its owning tenant. Queries are filtered at retrieval time — not post-retrieval — so the embeddings of tenant B's documents are never even scored against tenant A's query.
  • •Embedding model scoping: If separate fine-tuned embedding models exist per tenant, the retrieval pipeline must route each query to the correct embedding model before it reaches the vector store.
  • •Re-ranking isolation: Any LLM-based re-ranking step must be sandboxed so the cross-encoder never sees a mix of documents from different tenants.
  • •Metadata redaction: Even namespace-filtered results may carry metadata (source URLs, author names, timestamps) that constitute sensitive data for another group. Strip or redact metadata before it enters the generation context.

5. Conversation and session isolation

Conversation history — particularly in long-running agentic workflows — must be stored with tenant-scoped encryption keys. At-rest encryption is table stakes; what matters equally is that the retrieval of past conversation context is gated behind the same identity checks as a fresh API request. A support-desk agent that can retrieve conversation history by session ID, without verifying the requesting tenant matches the session's owner, is a data-access vulnerability masquerading as a feature.

6. Output and logging partitioning

Logs, traces, and prompt-completion pairs are themselves sensitive data. A centralised observability platform that aggregates LLM traces without tenant partitioning exposes one group's AI interactions to any engineer with read access to the logging backend. Partition logs at ingestion time, apply tenant-scoped retention and deletion policies, and ensure that compliance exports (for audit or e-discovery purposes) can be scoped to a single tenant without bulk-exporting the entire dataset.


Governance and Auditability

Multi-tenancy is not purely a technical problem — it is a governance problem. Enterprise AI platforms need to answer, at any point in time:

  1. •Who accessed what, and when? A complete audit trail of every inference request, indexed by tenant, user identity, model version, and timestamp.
  2. •Which documents were retrieved to generate this response? Provenance tracing from output back through the RAG pipeline to source documents, scoped per tenant.
  3. •What system prompt was active during this interaction? Version-controlled prompt templates with immutable records of which version was deployed to which workspace.
  4. •Has any cross-tenant data flow occurred? Anomaly detection on retrieval patterns, flagging cases where namespace filters may have failed or been bypassed.

This audit capability is not optional in regulated industries. GDPR Article 30 requires records of processing activities; financial regulators increasingly expect firms to demonstrate that their AI systems cannot create information barriers violations; healthcare standards demand patient data never commingles across care pathways.


Common Implementation Mistakes

Even teams that understand the principles make predictable errors in practice:

Mistake 1 — Relying on application-layer filtering alone. Putting tenant checks only in the application code, not in the platform itself, means a single application bug can expose all tenants. Defence-in-depth requires the platform to enforce isolation independently of the application.

Mistake 2 — Sharing a system prompt cache. Some prompt-caching optimisations pre-compute the KV representation of a system prompt and reuse it across requests. If the same cache slot is shared across tenants (because two tenants happen to use the same system prompt text), this can create subtle token-probability side channels. Cache keys must include the tenant identifier.

Mistake 3 — Forgetting the embedding pipeline. Teams often correctly isolate the LLM inference layer but neglect the embedding service that feeds the vector store. If the embedding API is shared without tenant tagging, a compromised or misconfigured embedding service can still cross-contaminate retrieval results.

Mistake 4 — Soft-deleting tenant data. When a tenant offboards, a soft delete that simply marks documents as inactive does not remove their embeddings from the vector store. Active embeddings from deleted tenants can still influence approximate-nearest-neighbour searches unless the index is physically rebuilt or the vectors are hard-deleted with confirmation.

Mistake 5 — Treating isolation as a one-time setup. Model upgrades, vector store migrations, and infrastructure changes can silently break isolation controls. Isolation must be validated continuously — not just at initial deployment.


Architecting for Scale: Practical Recommendations

For teams building or evaluating enterprise LLM platforms, the following principles reduce risk without sacrificing agility:

  • •Adopt workspace-first design: Model every resource (index, prompt, model, credential, log) as belonging to a workspace before writing a single line of inference code.
  • •Enforce at the platform, not the application: Treat the LLM platform as a zero-trust boundary that validates tenant identity independently of what the calling application claims.
  • •Automate isolation testing: Build integration tests that explicitly attempt cross-tenant data access — retrieval queries that should return zero results, API calls with mismatched credentials — and run them on every deployment.
  • •Use separate encryption key hierarchies per tenant: Encrypt conversation history, cached prompts, and stored embeddings with keys that are unique to each workspace and rotated independently.
  • •Build audit-first: Design your logging schema to answer "who saw what" before optimising for query performance. Retrofitting auditability onto a flat log store is significantly harder than partitioning from day one.

Conclusion

Enterprise LLM multi-tenancy is one of the most consequential architectural decisions your AI platform team will make. Done well, it unlocks the full economic and operational value of shared AI infrastructure while maintaining the data boundaries that regulation, trust, and competitive sensitivity demand. Done poorly, it creates a data-bleed risk that can undo years of compliance investment in a single misconfigured query.

The good news is that the patterns are well understood: layered isolation from identity through inference to logging, workspace-scoped RBAC, namespace-partitioned vector stores, and continuous automated validation. The discipline is in applying all of them together, consistently, at every layer of the stack — and in choosing platforms that enforce these controls by design rather than by convention.

Organisations that get this right will be able to deploy AI broadly and confidently across every team, every use case, and every regulatory boundary — without sacrificing the speed and cost advantages that make shared infrastructure worth pursuing in the first place.

Next step

Check workspace readiness

Validate connectors, RBAC, and data coverage before piloting Inlock's RAG templates and draft review flows.