Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#2,821 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
ai, security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
4.5k
Forks
896
Merge medio
3 d 8 h
PR fusionados (30 d)
191

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/PyRIT

Todos los issues de microsoft/PyRIT

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.