Skip to content

BUG TAP/PAIR skip their first turn after a prepended conversation (no adversarial system prompt, next_message ignored) #2821

Description

If you pass a prepended_conversation to TAP or PAIR, the first turn never happens properly.

_TreeOfAttacksNode._is_first_turn() checks whether the objective conversation in memory is empty, but the prepended messages are written into that same conversation. So after any prepend it's never the first turn, which means:

  • set_adversarial_system_prompt never runs, so the adversarial chat has no system prompt at all, and the prepended context is never used
  • next_message is silently ignored
  • with a system-only prepend, the subsequent-turn path raises "Cannot proceed without an assistant response", every node gets pruned, and the attack reports FAILURE without sending anything

With mock targets, a scorer that would succeed right away, and just a system message prepended:

TreeOfAttacksWithPruningAttack: FAILURE | prompts sent to target: [] | adversarial system prompts set: 0
PAIRAttack:                     FAILURE | prompts sent to target: [] | adversarial system prompts set: 0

Fix: don't count the prepended messages when deciding whether it's the first turn.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions