A language model can produce convincing text while disclosing confidential information or initiating an incorrect tool call. Assess the whole application: which data can it access, which permissions does it hold and what consequences can its outputs have? A model name alone does not answer these questions.
A document assistant as a concrete case
Suppose an internal assistant searches employee handbooks. Some documents are available to all employees, while others are restricted to human resources. The first boundary is authorisation before retrieval. Documents a user cannot read must not enter the model context and then be hidden merely by a polite system instruction.
Use two artificial documents and two test accounts. Place a distinctive identifier only in the restricted document. The unauthorised account must receive neither its text nor that identifier or a revealing extract. Check direct document links and search previews as well as model responses.
External text is not authorisation
A document can contain instructions intended to change an assistant’s behaviour. OWASP describes this as indirect prompt injection. RAG and additional system instructions do not automatically remove the risk. Retrieved content must be treated as data; it must not authorise new data access or actions.
For a controlled trial, add an obvious instruction unrelated to the task to the artificial document. Check that it causes neither additional access nor a tool call. One passing case does not establish general resistance to attack. Repeat relevant cases after changing the model, prompt, retrieval logic or tools.
Limit consequences through independent boundaries
A read-only assistant does not need permission to send email, modify accounts or delete files. Where an application needs actions, their targets, parameters and authorisation must be checked outside the model. A model claiming that permission exists is not user approval.
For each test, record the request, expected behaviour, observed result and software version. Use synthetic content and restrict access to logs. This creates repeatable checks rather than a blanket claim that a model is secure.
Sources and scope
The OWASP prompt injection description explains the attack path. The NIST AI Risk Management Framework structures AI risk assessment. The document scenario here is an original hypothetical test case, not a report of a security test performed.