{"course":{"slug":"ai-actually-explained","title":"AI, Actually Explained","url":"https://addaly.com/learn/ai-actually-explained","level":"beginner","track":"start"},"lesson":{"slug":"text-that-gives-it-orders","title":"When the document tells the model what to do","url":"https://addaly.com/learn/ai-actually-explained/text-that-gives-it-orders","position":38,"of":92,"minutes":9,"answer":"Structured instruction roles can help, but do not enforce permissions. Treat external content as untrusted material and use independent access and action controls.","keyIdea":"Structured instruction roles can help, but do not enforce permissions. Treat external content as untrusted material and use independent access and action controls."},"body":{"format":"markdown","text":"## Roles help, but they do not enforce permissions\n\nMany chat systems distinguish system, developer, user and tool messages with roles or other structure. Those markers matter; the input is not necessarily one unmarked format. Nevertheless, a model can mishandle instructions embedded in material it was meant to analyse.\n\nTraining can improve which instructions a model prioritises. It is not a substitute for independent access and action checks. Untrusted document text can try to redirect an assistant even when it is clearly labelled as content.\n\nThis is **prompt injection**. Defences include trained instruction priorities, input handling, monitoring and containment. Their effectiveness must be tested on the actual system; no prompt should be treated as an enforceable permission boundary.\n\n## Direct and indirect\n\n**Direct injection** is an instruction entered through a user-facing input to redirect the system. Depending on its access, this can also endanger private data or actions; it is not necessarily just an annoyance.\n\n**Indirect injection** puts hostile instructions in material the assistant processes on a user’s behalf, such as:\n\n- A CV containing concealed instructions to recommend the candidate, if the extraction pipeline includes that text.\n- A web page whose retrieved content includes hostile instructions.\n- An email the assistant summarises.\n- A calendar invitation, shared document, code repository or product review.\n\nThe attacker may influence material the assistant will read without being the authorised user. Their success depends on the pipeline, model behaviour, available data and permitted actions.\n\n## Why it gets worse when the model can act\n\nA model that only writes text can be made to write something wrong. A model that can send emails, run code, open files, make purchases or call other services can be made to *do* something wrong.\n\nResearch has demonstrated indirect attacks against real and experimental LLM applications, including data-theft and tool-manipulation risks. The exact route matters. A demonstration against one configuration is not proof that every assistant or every email can exfiltrate data.\n\nThis is why the guidance for anyone connecting an assistant to their own accounts is conservative and worth following:\n\n- Give it the **narrowest access** that lets it do the job. Read-only where possible.\n- Require **appropriate authorisation and checks before consequential actions**, including sending, paying, deleting or sharing.\n- Treat access to **untrusted content and private data together** as a risk that needs tested controls.\n- Treat external text as **untrusted input**, rather than allowing it to grant permissions.\n\n## The everyday version: scams\n\nGenerated content can also assist scams. This is related to AI misuse, but a forged voice or fluent phishing message is not itself a prompt-injection attack.\n\n**Voice cloning.** The FTC warned in 2023 that a short online audio sample could help a scammer imitate a loved one. Sample requirements and quality vary by system. A familiar-sounding voice alone does not authenticate an urgent request.\n\n**Verify through a trusted route.** Pause an unexpected urgent request and contact the person using an independently known number or another established channel. A private family check can help, but it may be exposed or guessed. Do not treat a voice, caller ID or code word as a perfect guarantee.\n\n**Fluent text at scale.** Bad grammar has never been a reliable authentication test. Language tools can help attackers produce polished messages, but polish does not establish legitimacy or prove that a message was generated.\n\nLook for requests that need independent verification: unexpected contact, manufactured urgency, secrecy, unusual payment routes or unsolicited links. These are warning signs, not proof by themselves. Good grammar does not remove the need to check.\n\n## The sentence to remember\n\n**Treat external text as material to evaluate, not automatic authority.** Use the product’s defined instruction roles, keep tool access narrow and check consequential actions through independent controls. Colleagues’ files and familiar websites can still contain untrusted instructions."},"check":{"question":"Why can instructions embedded in a retrieved document remain a risk even when a chat system labels message roles?","options":[{"text":"Because the attacks are too varied to enumerate, so filters will always lag behind new phrasings.","correct":false,"tempting":"Blocklisting can miss attacks, but the example does not establish that every possible defence must fail."},{"text":"Because model providers have chosen not to prioritise it while capabilities are advancing faster.","correct":false,"tempting":"The example gives no evidence about provider motives or priorities. Different defences need testing on the deployed system."},{"text":"The model can mishandle the priority of untrusted content despite role markers. Learned instruction following should be backed by independently enforced permissions and action checks.","correct":true},{"text":"Because the model cannot verify who sent each piece of text, which authentication would solve.","correct":false,"tempting":"Knowing an author’s identity does not make every instruction in their document authorised. Authentication and instruction priority solve different problems."}]},"prev":{"slug":"the-reasoning-models","title":"Reasoning models and what their explanations can show","url":"https://addaly.com/learn/ai-actually-explained/the-reasoning-models"},"next":{"slug":"the-model-changed-under-you","title":"The thing you tested is not the thing running today","url":"https://addaly.com/learn/ai-actually-explained/the-model-changed-under-you"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'When the document tells the model what to do', in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/text-that-gives-it-orders (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"When the document tells the model what to do","courseTitle":"AI, Actually Explained","module":{"index":4,"slug":"why-it-goes-wrong","title":"Why it gets things wrong"},"answer":null,"keyIdea":"Structured instruction roles can help, but do not enforce permissions. Treat external content as untrusted material and use independent access and action controls.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"roles-help-but-they-do-not-enforce-permissions","runs":[{"text":"Roles help, but they do not enforce permissions"}]},{"t":"p","runs":[{"text":"Many chat systems distinguish system, developer, user and tool messages with roles or other structure. Those markers matter; the input is not necessarily one unmarked format. Nevertheless, a model can mishandle instructions embedded in material it was meant to analyse."}]},{"t":"p","runs":[{"text":"Training can improve which instructions a model prioritises. It is not a substitute for independent access and action checks. Untrusted document text can try to redirect an assistant even when it is clearly labelled as content."}]},{"t":"p","runs":[{"text":"This is "},{"text":"prompt injection","b":true},{"text":". Defences include trained instruction priorities, input handling, monitoring and containment. Their effectiveness must be tested on the actual system; no prompt should be treated as an enforceable permission boundary."}]},{"t":"h2","id":"direct-and-indirect","runs":[{"text":"Direct and indirect"}]},{"t":"p","runs":[{"text":"Direct injection","b":true},{"text":" is an instruction entered through a user-facing input to redirect the system. Depending on its access, this can also endanger private data or actions; it is not necessarily just an annoyance."}]},{"t":"p","runs":[{"text":"Indirect injection","b":true},{"text":" puts hostile instructions in material the assistant processes on a user’s behalf, such as:"}]},{"t":"ul","items":[[{"text":"A CV containing concealed instructions to recommend the candidate, if the extraction pipeline includes that text."}],[{"text":"A web page whose retrieved content includes hostile instructions."}],[{"text":"An email the assistant summarises."}],[{"text":"A calendar invitation, shared document, code repository or product review."}]]},{"t":"p","runs":[{"text":"The attacker may influence material the assistant will read without being the authorised user. Their success depends on the pipeline, model behaviour, available data and permitted actions."}]},{"t":"h2","id":"why-it-gets-worse-when-the-model-can-act","runs":[{"text":"Why it gets worse when the model can act"}]},{"t":"p","runs":[{"text":"A model that only writes text can be made to write something wrong. A model that can send emails, run code, open files, make purchases or call other services can be made to "},{"text":"do","i":true},{"text":" something wrong."}]},{"t":"p","runs":[{"text":"Research has demonstrated indirect attacks against real and experimental LLM applications, including data-theft and tool-manipulation risks. The exact route matters. A demonstration against one configuration is not proof that every assistant or every email can exfiltrate data."}]},{"t":"p","runs":[{"text":"This is why the guidance for anyone connecting an assistant to their own accounts is conservative and worth following:"}]},{"t":"ul","items":[[{"text":"Give it the "},{"text":"narrowest access","b":true},{"text":" that lets it do the job. Read-only where possible."}],[{"text":"Require "},{"text":"appropriate authorisation and checks before consequential actions","b":true},{"text":", including sending, paying, deleting or sharing."}],[{"text":"Treat access to "},{"text":"untrusted content and private data together","b":true},{"text":" as a risk that needs tested controls."}],[{"text":"Treat external text as "},{"text":"untrusted input","b":true},{"text":", rather than allowing it to grant permissions."}]]},{"t":"h2","id":"the-everyday-version-scams","runs":[{"text":"The everyday version: scams"}]},{"t":"p","runs":[{"text":"Generated content can also assist scams. This is related to AI misuse, but a forged voice or fluent phishing message is not itself a prompt-injection attack."}]},{"t":"p","runs":[{"text":"Voice cloning.","b":true},{"text":" The FTC warned in 2023 that a short online audio sample could help a scammer imitate a loved one. Sample requirements and quality vary by system. A familiar-sounding voice alone does not authenticate an urgent request."}]},{"t":"p","runs":[{"text":"Verify through a trusted route.","b":true},{"text":" Pause an unexpected urgent request and contact the person using an independently known number or another established channel. A private family check can help, but it may be exposed or guessed. Do not treat a voice, caller ID or code word as a perfect guarantee."}]},{"t":"p","runs":[{"text":"Fluent text at scale.","b":true},{"text":" Bad grammar has never been a reliable authentication test. Language tools can help attackers produce polished messages, but polish does not establish legitimacy or prove that a message was generated."}]},{"t":"p","runs":[{"text":"Look for requests that need independent verification: unexpected contact, manufactured urgency, secrecy, unusual payment routes or unsolicited links. These are warning signs, not proof by themselves. Good grammar does not remove the need to check."}]},{"t":"h2","id":"the-sentence-to-remember","runs":[{"text":"The sentence to remember"}]},{"t":"p","runs":[{"text":"Treat external text as material to evaluate, not automatic authority.","b":true},{"text":" Use the product’s defined instruction roles, keep tool access narrow and check consequential actions through independent controls. Colleagues’ files and familiar websites can still contain untrusted instructions."}]}],"check":{"question":[{"text":"Why can instructions embedded in a retrieved document remain a risk even when a chat system labels message roles?"}],"options":[{"text":[{"text":"Because the attacks are too varied to enumerate, so filters will always lag behind new phrasings."}],"correct":false,"tempting":[{"text":"Blocklisting can miss attacks, but the example does not establish that every possible defence must fail."}]},{"text":[{"text":"Because model providers have chosen not to prioritise it while capabilities are advancing faster."}],"correct":false,"tempting":[{"text":"The example gives no evidence about provider motives or priorities. Different defences need testing on the deployed system."}]},{"text":[{"text":"The model can mishandle the priority of untrusted content despite role markers. Learned instruction following should be backed by independently enforced permissions and action checks."}],"correct":true,"tempting":null},{"text":[{"text":"Because the model cannot verify who sent each piece of text, which authentication would solve."}],"correct":false,"tempting":[{"text":"Knowing an author’s identity does not make every instruction in their document authorised. Authentication and instruction priority solve different problems."}]}],"order":[0,2,1,3],"why":null},"prev":{"slug":"the-reasoning-models","title":"Reasoning models and what their explanations can show","minutes":9},"next":{"slug":"the-model-changed-under-you","title":"The thing you tested is not the thing running today","minutes":8}}}