Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,821 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
ai, security

Direzione di ricerca

Start by tracing TAP and PAIR through _TreeOfAttacksNode._is_first_turn(), then inspect the mock-target scenario described in the issue. Done means a prepended conversation does not suppress the first turn: the adversarial system prompt is set, next_message is used, and the scorer can receive the initial prompt instead of both attacks reporting FAILURE.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
4.5k
Fork
896
Merge medio
3g 8h
PR unite (30g)
191

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/PyRIT

Tutte le issue di microsoft/PyRIT

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.