Chiosa
AI Security & Safety

Pipette finds varied attacks and trains agents to resist them

3 min
Updated
Prompt injection purple-teaming workflow.
Prompt injection purple-teaming workflow.Fig. 1 · Lipeng He et al. · CC BY 4.0

In plain words

Some software agents read outside information, such as email, while doing a user’s task. An attacker can hide instructions in that information and trick the agent into doing something else.

Simply training an agent to stop when it sees suspicious text can also keep it from finishing the user’s real task.

Pipette first searches for different ways to hide those instructions, then trains agents to ignore them and keep using useful information. On tested tasks, its training data reduced attack success, and its defense kept clean-task completion above standard training methods for both tested models.

The research

An agent that rejects suspicious outside information may avoid an injected instruction but fail the user’s real task.

Pipette addresses both risks: its tested defense reduced attack success while preserving clean-task completion for two models, giving a more balanced result than judging a defense by attack blocking alone.

Pipette pairs strategy-focused attack discovery with defensive training that teaches language-model agents to ignore injected instructions while completing user tasks.

Researchers trained Qwen3-4B on attacks collected by three red-team methods, then measured attack success against three unseen attacks on selected AgentDojo task pairs. With Pipette-Red data, the highest attack rate across those tests was lower than with RL-Hammer or PISmith data.

On 97 clean AgentDojo tasks, Pipette-Blue also had higher completion rates than standard reinforcement learning or supervised fine-tuning for both tested models.

Together, these results support Pipette’s approach to resisting injected instructions while preserving user-task completion in these evaluations.

The clean-task comparison covers two agent models on tested AgentDojo tasks. The adaptive-attack comparison used a selected stress-test subset and a limited search budget; the strategy coverage grader was not validated against human labels.

What the evidence shows

  • Success is not enough

    Pipette is a two-stage framework for finding and defending against indirect prompt injection, where malicious instructions arrive inside outside data an agent needs for a benign user task. The central problem is that collecting attacks that succeed during red-teaming does not guarantee a robust defense after training.

    A defense can also lower attack success by refusing or stopping, while leaving the user’s task unfinished.

  • Strategies matter beyond wording

    The dictionary comparison asks whether a red-teamer keeps finding strategies that also appear in unseen attacks. On ChatInject, a test where malicious text spoofs chat formatting to redirect an agent, the dictionaries from RL-Hammer plateaued and PISmith’s stagnated or declined.

    Pipette-Red’s dictionary later explained the unseen attacks better. That is evidence about strategy coverage, not proof that coverage alone caused the defense results.

  • Collected attacks changed the outcome

    On AgentDojo, a test of agents doing user tasks with or without injected instructions, researchers measured attack success as the share of attacked task pairs where the injection succeeded. After reinforcement-learning training on Qwen3-4B, the worst rate across three unseen attacks was 20.0% using Pipette-Red data, compared with 47.5% using PISmith data. This supports the value of Pipette-Red’s collected attacks in this model and evaluation.

  • Completion remained part of the test

    On these clean tasks, Pipette-Blue completed a larger share than either standard training method, though the comparison does not establish identical starting checkpoints or warm-up procedures.

    In a separate Qwen3-4B component test, adding reasoning checks was associated with better task completion under attack, and adding the token-level reward with better clean-task completion; this progression is consistent with both components helping preserve utility in that setup.

  • Adaptive searches add a stress test

    The paper also compares Pipette with Meta-SecAlign against TAP and Genetic, searches that revise injected instructions after querying the agent. On the selected Llama-8B stress-test pairs, Pipette had lower attack success under both searches.

    The task pairs were selected because static attacks had compromised the undefended Qwen3-4B, so these results speak to a targeted test set, not attack rates across all AgentDojo tasks.

Deep