Skip to main content

How do you keep departments and clients apart in one AI assistant?

When a single assistant serves several departments or clients, some barrier has to stop their documents from mixing. You can give each group its own system, give each its own walled section within a shared system, or keep everything together and tag every document so searches can filter on the tag. The sturdier the barrier, the higher the cost; the cheaper it is, the more it relies on software never slipping.

Choosing the wall is a risk decision

When one assistant serves HR and Sales, or Client A and Client B, the question is not whether to separate them but how firmly. There is no single right answer. What we look for is a barrier sized to what a mix-up would actually cost, and a clear account of how that barrier could fail.

Three ways to store the files of rival teams

Picture a records company holding archives for several customers. It could rent each customer a separate warehouse. It could keep one warehouse with a caged, padlocked bay per customer. Or it could put every box on the same shelves, each with a coloured sticker, and trust the staff to pull only the right colour.

Any of these can work. With the shared shelves, though, one worker misreading one sticker is all it takes for a box to go to the wrong customer.

Software makes the sticker approach riskier than it sounds. The "worker" checking stickers is a piece of code executed millions of times, so a single bug is not a one-off slip; it recurs on every request until somebody catches it.

The three designs

Your documents sit in a searchable catalog inside the assistant. Engineers use the word tenants for the groups that must not see each other's material, which might be departments, subsidiaries or clients.

Separate systems

Every tenant has a dedicated catalog running on a dedicated service. For its Azure search product, Microsoft calls this the option with the "highest level of data and workload separation" (Microsoft Learn).

Strength: nothing is sturdier; a defect in one tenant's system has no path to anyone else's files. Cost: money and effort. Microsoft points out that each tenant costs more to run, and every change must be rolled out again and again.

Separate sections

One shared system, divided into a fenced-off compartment per tenant. According to Pinecone, which makes a search database, its compartments are "stored separately", lowering "the risk of application bugs that could search the wrong tenant's data" (Pinecone docs).

Strength: a genuine barrier for less money, and wiping out one tenant's material is simple. Cost: on every request, the software must still route to the correct compartment.

Labels and filters

All documents share one store, each tagged with something like "HR" or "Client A", and every search is supposed to filter by that tag.

Strength: the least expensive and most adaptable option, and it copes well with people who sit in more than one group. Cost: the only barrier is the filter itself. Microsoft says this approach "offers less data and performance isolation than the other models" (Microsoft Learn).

Following a single question

  1. An attorney on Client A's matter types a question into the assistant.
  2. That question meets whichever barrier the system was built with.
  3. If nothing goes wrong, all three designs return Client A's documents and nothing else.
  4. Under the tagging design, though, one search that forgets to filter brings back Client B's documents alongside.
  5. Dedicated compartments or dedicated systems put something solid in the way, so that same bug is much less likely to cross over to another client.

Under tagging alone, a single unfiltered search can reach the entire store.

What a well-built system does

  • The barrier fits the stakes. If mixing would create legal exposure, for example two clients of one law firm, or a deal team versus the rest of the company, the sturdier designs justify their price. For ordinary tidiness between departments, tags are enough.
  • The tenant comes from the login, not from the request. Microsoft advises that a trusted component work out which tenant someone belongs to from how they signed in and "apply the corresponding filter to every query", rather than believing a tenant name sent from the person's computer or phone (Microsoft Learn).
  • Where possible, the database polices it. Certain databases can enforce the tag rules on their own, so a sloppy program cannot bypass them; in PostgreSQL the feature is known as row security (PostgreSQL manual).
  • Existing ethical walls carry over. Plenty of firms already separate teams in their email and file sharing. Microsoft's tool for this, Information Barriers, is there so that "a lawyer's data obtained from one client can't be accessed by a lawyer at the same firm who represents a different client" (Microsoft Learn). An assistant ought to honour those same separations.
  • Within each compartment, document permissions still count. Separating groups is no substitute for checking each person's access to each file; see why the check must happen before the assistant reads anything.

Where each design can break

  • The missing filter. Under tagging, a single query without it sees the whole store.
  • Loopholes in database rules. Even rules the database enforces have them. PostgreSQL's row security is inactive until configured, and highly privileged administrator accounts "always bypass" it (PostgreSQL manual).
  • Traces that cross the line. Where tenants share one catalog, Microsoft observes that other tenants' documents "can affect relevance scores". So the barrier blocks reading, yet some faint influence still passes through (Microsoft Learn).
  • Barriers with blind spots. Information Barriers, for one, "can't restrict communication and collaboration between groups and users in email messages" (Microsoft Learn). Find out exactly what each barrier does and does not protect.

A real case

Asana pulled its newly launched AI connector for close to two weeks in June 2025, having found a defect that could let users in one organization see another organization's data. The company called it "a logic flaw" and "not the result of a hack", and put the number of affected customers at about 1,000 in comments to BleepingComputer (BleepingComputer, The Register).

What to ask your IT team or vendor

  • What kind of barrier sits between our own departments, and what kind sits between our data and other customers' data?
  • At what point is a person assigned to a department or client, and could that person tamper with the assignment?
  • Does the database itself enforce separation, or only the application code? Who has accounts that can override it?
  • Will the assistant obey the information barriers or ethical walls already in place here?
  • Can you demonstrate a user in one department requesting another department's files and receiving none?

Terms you may hear

TermWhat it means
Tenant, multi-tenancyA single platform shared by groups whose data has to stay separate.
Tenant isolationThe mechanism that does the separating.
Namespace, partition, collection, shardVarious words for a fenced-off compartment within a shared system.
Metadata filteringTagging documents and restricting each search to the right tag.
Row-level securityTag rules enforced by the database rather than the application.
Ethical wall, information barrier, Chinese wallA policy forbidding two internal groups from exchanging information.
RAGRetrieval-augmented generation: the assistant finds relevant passages in your files first and builds its reply from them. See how it works.

How we help

We work through with you which groups must never mix, whether clients, deal teams or departments, and match each boundary to the right kind of barrier: separate systems, separate sections, or labels.

We check where the system decides who belongs to which group, whether the database enforces the barrier or only the application does, which administrator accounts can get around it, and whether the ethical walls you already run carry over into the assistant.

Before launch, we test it from inside one group, asking for another group's documents, to confirm nothing comes back.

Talk to us about your project

Sources

A vendor-neutral explainer on this topic is on securellm.ai, which we publish.