Indirect prompt injection occurs when a model treats text from a web page, document or retrieved data as instructions. The risk grows when a model response can invoke tools, access more sources or transmit information.

Separate data from authority

Label the origin of retrieved content and keep operating rules in a separate channel. Retain source references and show reviewers the relevant context. Filters and normalisation can remove artefacts, while plain text can still carry instructions. Enforce authorisation and validation outside the model, where the action executes.

Reduce possible consequences

Give the summarisation component access only to authorised documents. Run tools with dedicated identities and permissions, destination and parameter constraints, and an approval step for high-impact actions. Record control outcomes and source references while limiting personal data and secrets in logs.

Hypothetical example and test

An assistant extracts deadlines from a supplier PDF. The PDF requests sending data to an external destination. The test passes if the assistant reports the deadlines with sources and the system blocks the transmission. Repeat with visible text, notes and material retrieved from a web page.

Sources