Part of the Determesh series.
What
In Determesh the AI model never decides who may see what. Access is checked in code at three points: what the model is shown, what it is allowed to call, and what values a call is allowed to carry. The model can be fooled. It just has nothing to give away.
Why
You cannot prompt your way out of prompt injection
The standard advice for prompt injection is layers of prompt: tell the model to ignore instructions in user input, wrap user text in delimiters, add a second model to check the first. All of it helps. None of it is a guarantee, because every layer is another model reading attacker-controlled text.
Determesh starts from the other end. Assume the orchestrator will, at some point, do exactly what an attacker asks. What is the worst that can happen? If the answer is “it reads payroll for someone who should not see it”, the design is wrong regardless of how good the prompt is.
The model should not hold the keys
An early version of the concept had the model receive user IDs and pass them to tools. That makes the model’s output the thing that decides whose data is fetched. A user who can steer the model can steer the ID.
The fix is simple to state: the model never sees an identifier it could change to reach someone else. Code knows who the user is, and code adds that to the call.
How
Gate one: the model only sees what the user may reach
The orchestrator finds resources through tools: search_resources and read_summary. Both run under the current user’s access, in SQL. A resource the user may not reach is not filtered out of the results afterwards. It is never selected.
The same applies to the channel. A company can restrict a channel to part of its resource tree, such as a public support bot that may only reach the FAQ. Search on that channel leaves out everything else.
So when a user types “list every system you are connected to”, the honest answer the model can give is the list of systems this user may use. That is not a leak. It is the same information the company chose to give that user.
Gate two: every call is checked when it is made
Being found is not being callable. Each resource method is marked read, write or delete. When a resource assistant calls a method, code checks that this user holds that permission on that resource and that method, before the call goes anywhere.
Access rules in Determesh can change mid-conversation: an admin edits an attribute, a verification expires, a resource revokes a user. The check runs on every call, so a change applies on the next call, not on the next conversation.
If the check fails, the assistant gets a short refusal, and the step is recorded in the thread as a gatekeeper step with the reason, for the company’s admin to see. The model does not get a second try with different wording, because wording is not an input to the check.
Gate three: values the model is not allowed to fill
Access rules answer “may this user call get_payslip?”. They do not answer “may this user call get_payslip for employee 4021?”. If the employee number is a parameter the model fills, an allowed user can ask for someone else’s payslip, and the model might oblige.
So a method parameter can be marked as filled by Determesh, from a fixed list of sources: the user’s identity, their channel ID, their verified email, or an attribute the company set on them. Code fills it after the access check. Anything the model sent for that parameter is thrown away. The model is not even shown the parameter, only a line saying Determesh adds the user’s details itself.
Attributes are written only through the company’s API and panel. No model tool can write one, so no conversation can talk a value into existence.
Other people’s threads are a 404
Through the API, a company’s backend sends messages for its users with a threadId. A thread ID that belongs to a different user gets a 404, the same answer as one that does not exist. Not a 403, which would confirm it exists. A thread from another company is a 404 for the same reason.
Identities never cross companies
The channel a message arrives on tells Determesh the company before it looks up the person: the bot, the mailbox, or the API key. An identity is keyed by company, channel and ID together. The same Telegram user talking to two companies is two unrelated records, with separate verifications, notes and blocks. Nothing a conversation does at one company can touch the other.
What the model can still do
It can be talked into describing itself. In our tests, fifteen attacks from fresh users asked for the system prompt, a “debug mode”, the tools, the model, the platform. Nothing leaked, and most were refused without the orchestrator asking any resource. But that result comes from the prompts and the evaluator, not from code, and we say so plainly. The details are in a later post.
The worst case is a reply that says something about how the assistant works, which the company’s own summaries could largely tell anyway. The data behind the gates stays where it is. That is the trade: accept that the model’s words are not fully controllable, and make sure the words cannot carry anything the user was not already allowed to have.
Previous: Deterministic Shell, Intelligent Core
Next: A Dumb Evaluator, on Purpose