Just out todayAgritech: Texts to Ugandan farmers moved what they knew and what they thought, and not what they didArtificial intelligence: An AI trained on 142 cervical photographs reached an AUC of 0.70, and found the obvious casesUncategorized: Two satellites spotted wheat stem rust in Ethiopian plots before it was severe, and the blue band did the work

AI agents & MCP

A Defence That Blocked The Attack And Made The Work Better

A rare security result: attack success fell from 34.6 percent to 0.1 percent and the assistant got better at its job, at 127 times lower token cost than the previous best defence.

What the paper found

SEAL learns a soft prompt and scoring readout offline to sanitize tool outputs using a frozen task model, building its scoring queries from trusted initial context so the reference stays independent of the text being inspected. On AgentDojo it reduced attack success from 34.6% to 0.1% while raising task completion without attack success from 51.4% to 77.5%, using about 127 times fewer defence-related tokens than the previous best method. It needs no defence-generated tokens and no separate verifier model.

Grade 7 reading level5 min readPreprint · not yet peer reviewed

What happened

An AI assistant reads things it did not write. A web page, a document, a tool’s reply. If somebody hides an instruction in there, the assistant may follow it. That is called indirect prompt injection, and it is the central unsolved problem in making assistants safe to connect to anything.

The obvious defence is to clean the incoming text before the assistant acts on it. Strip out anything that looks like an instruction.

Two things usually go wrong. First, cleaning costs money: most methods run a second model, or generate a pile of extra text, and that gets expensive on every single tool call. Second, cleaning too hard removes the evidence the assistant needed, so the attack stops and the assistant also stops being useful.

This paper is worth reading because it mostly avoids both.

The test

SEAL works out offline how to score which parts of a tool’s output are suspect, learning a short prompt and a scoring readout. Then, at run time, it uses the assistant’s own frozen model to do the scoring. No second model to pay for. No long reasoning text to generate.

The design detail that matters is where the reference comes from. The scoring questions are built from the trusted context at the start — your instruction, before any outside text arrived — so the yardstick is independent of the thing being measured. The suspicious text does not get to influence the judgement of itself.

It also deliberately tries not to over-clean, using a regulariser that pushes it to keep useful evidence while deleting the injected parts.

They tested on AgentDojo and AgentDyn, two standard benchmarks, then repeated the whole thing on a second model with the same recipe.

The result

Attack success fell from 34.6 percent to 0.1 percent.

Then the number that makes this unusual. The joint score — tasks completed without the attack succeeding, which is the figure that actually matters — rose from 51.4 percent to 77.5 percent.

Read that again, because it breaks the normal shape of security news. The assistant did not get safer at the cost of being worse. It got safer and better, by a wide margin.

And it did so using about 127 times fewer defence-related tokens than the previous best method.

Why would removing an attack improve ordinary performance? This is because the injected instruction was never only a security problem. It was also noise. It pulled the assistant toward somebody else’s goal and away from yours. Take it out and the assistant has a clearer view of the job. THE ATTACK WAS ALSO A DISTRACTION.

What it means

The 127 times figure may matter more than the security numbers, for an unglamorous reason: cost decides what gets deployed. A defence that doubles your token bill on every tool call gets switched off in the first budget review, however good it is. One that is nearly free survives.

And the joint score moving up removes the usual objection. Teams resist safety measures because they expect to pay in capability. Here the trade did not exist.

Therefore the question to put to anyone selling you an injection defence is not just how much it blocks. It is what it costs per call, and what it does to the tasks that were never under attack.

Business ideas from this paper

1. Defence cost benchmarking. Vendors quote block rates. Almost none quote token cost per protected call, which is what determines whether you can afford to leave it on. Publish the comparison. Buyer: platform teams choosing a defence. First test: measure two defences’ per-call cost on one customer’s real traffic and show them the monthly difference.

2. Joint-score evaluation as a service. Most teams measure attacks blocked and separately notice their assistant feels worse. Offer the single number: tasks completed without the attack landing, before and after. Buyer: anyone who has recently added a safety layer. First test: compute it for one customer and tell them whether their defence is costing them work.

3. Sanitization tuning for specific tool outputs. SEAL is trained offline, which means it can be tuned for the particular shape of the tools a company actually uses. That is configuration work with a measurable result. Buyer: firms with distinctive internal tools. First test: tune it for one customer’s noisiest tool and report the change in both numbers.

How sure can you be?

Encouraging, and still a preprint.

The strengths: it reports the joint score rather than attack success alone, which is the honest metric and the one most papers avoid. The cost comparison is quantified. It was replicated on a second backbone with the same recipe, which is more than most defence papers do. And keeping the reference independent of the inspected text is a sound design choice rather than a trick.

The limits: no peer review yet. Both benchmarks are standard, which is good for comparison and bad for surprise — a defence tuned against known attack sets usually looks better than it will against new ones. Critically, the paper does not report an adaptive attack written specifically to defeat SEAL, and that is the test that has flattened several previous defences. Attack success of 0.1 percent against known attacks is not the same as 0.1 percent against an attacker who has read this paper.

Do this today

If you run an assistant with a safety filter on it, find out two numbers: how much the filter costs you per call, and how often the assistant finishes the job with the filter on. If you only know the first, you are managing half the system.

Mark Alex

Mark Alex

Writes Just Out Tech. Founder and Managing Director of Real Biz Digital. Connect on LinkedIn.

Every article here is read against the paper it reports, and carries its own credibility score.

Source: SEAL: Sealed Queries for Local Sanitization against Indirect Prompt Injection, October 2026. arXiv:2610.39758 · arxiv.org (preprint · not yet peer reviewed).

Just Out Tech explains new research in plain language. This article was drafted with AI assistance and checked by a human against the original source.

What to remember
  • SEAL learns a soft prompt and scoring readout offline and uses a frozen task model to sanitize tool outputs, so it needs neither defence-generated tokens nor a separate verifier model (arXiv:2610.39758).
  • Scoring queries are built from trusted initial context, keeping the reference independent of the inspected tool text.
  • On AgentDojo it reduced attack success from 34.6% to 0.1%.
  • The joint score, task completion without attack success, rose from 51.4% to 77.5%, so security and usefulness improved together.
  • It used approximately 127 times fewer defence-related tokens than PISanitizer, the previous state of the art, and was replicated on a second backbone with the same recipe.
Where this really is

Benchmark results on AgentDojo and AgentDyn, replicated on a second backbone. No production deployment reported.

Questions people ask

What is indirect prompt injection?

An instruction hidden in something the assistant reads, such as a web page or a tool's output, rather than typed by the user.

Why did blocking attacks make the assistant better?

Because injected text was also distracting it from the real task. Removing the injection removed the distraction.

What does 127 times fewer tokens mean in practice?

The defence costs far less to run, which is often what decides whether a safety measure ships at all.

About the author

Mark Alex

Mark Alex is the founder and Managing Director of Real Biz Digital, a technology company operating out of Nairobi since 2018. He works in agentic AI and the Model Context Protocol, AI governance, enterprise software architecture and cybersecurity. He holds an MSc in Mechatronical Engineering from Obuda University in Budapest and a BSc in IT, Forensic Technology and Cybercrime, from USIU-Africa in Nairobi, and has published IEEE conference research on an AI-powered digital twin for greenhouse systems. He is the author of seven books. Between 2020 and 2024 he mentored more than 200 university students and interns in Nairobi. He writes every Just Out Tech article from the original research paper.