BUG: label queries only return the final conversation of an attack
Maintainer antworten meist innerhalb von 2 Tagen
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 85/100
Rechercherichtung
Der Fehler liegt in _get_message_pieces_memory_label_conditions in sqlite_memory.py und azure_sql_memory.py, wo der Join nur Pieces aus der letzten Konversation eines Angriffs holt. Passe die Join-Bedingung an, sodass zusätzlich ConversationEntry.attack_result_id == AttackResultEntry.id gilt, um alle Konversationen einzubeziehen, die mit dem Attack-Result verknüpft sind. Führe danach die mitgelieferte Reproduktion mit dem Mock-Target aus, um zu bestätigen, dass Label-Abfragen für PromptSendingAttack und RedTeamingAttack alle erwarteten Pieces zurückgeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
get_message_pieces_async(labels=...) only returns pieces from an attack result's final conversation_id. Labels now live on AttackResultEntry, and the condition in _get_message_pieces_memory_label_conditions (sqlite_memory.py and azure_sql_memory.py) only joins on AttackResultEntry.conversation_id == PromptMemoryEntry.conversation_id. Its docstring says it also matches labels on the piece itself, but that branch is gone.
So everything else an attack sent drops out of label queries: PromptSendingAttack retry attempts, Crescendo's pruned conversations, the adversarial chat in RedTeaming, Crescendo and TAP, and every TAP branch except the best one. The memory docs still say labels apply "to all prompts sent by any attack".
This is with mock targets:
PromptSendingAttack(max_attempts_on_failure=2): pieces sent in this attack=6, returned by labels query=2
RedTeamingAttack: objective-conv pieces=4, adversarial-conv pieces=5, returned by labels query=4
The Conversation table already has attack_result_id for these conversations, so one option is to also match when ConversationEntry.conversation_id equals PromptMemoryEntry.conversation_id and ConversationEntry.attack_result_id equals AttackResultEntry.id. Whether adversarial-chat prompts should come back is a design call, since they'd also get picked up by label-based batch scoring, so I'm filing this as an issue first. #3063 touches the same functions for dotted keys.
- Vorherrschende Sprache
- Python
- Sterne
- 4.7k
- Forks
- 980
- Ø Merge
- 2 T. 9 Std.
- Gemergte PRs (30 T.)
- 422
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/PyRIT
-
Conversation drawer shows the previous attack's conversations after switching attacksEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in microsoft/PyRIT
Ähnliche Issues
-
[oblt-aw][autodoc] Update docs for security org scaffolding and Docs AI menu permission changesEvtl. vergeben @github-actions hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
external integration integration-submission
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
langchain-ai/docs#7077 ·
Maintainer antworten meist innerhalb von 1 Tag
-
author-page correction
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
acl-org/acl-anthology#10623 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Use context to recognize personal initials and lowercase namesEvtl. vergeben @lipikaramaswamy hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
NVIDIA-NeMo/Anonymizer#340 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
btclib-org/btclib-node#2083 ·
Maintainer antworten meist innerhalb von 1 Tag