BUG: label queries only return the final conversation of an attack
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
バグは sqlite_memory.py と azure_sql_memory.py の _get_message_pieces_memory_label_conditions にあり、そのJOINは攻撃の最終会話からのメッセージピースしか取得していません。JOIN条件を調整して ConversationEntry.attack_result_id == AttackResultEntry.id にも一致するようにし、攻撃結果に紐づくすべての会話を含めてください。その後、付属のモックターゲットによる再現スクリプトを実行し、PromptSendingAttack と RedTeamingAttack のラベルクエリが期待されるすべてのピースを返すことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
get_message_pieces_async(labels=...) only returns pieces from the attack result's final conversation_id. Labels now live on AttackResultEntry, and the condition (_get_message_pieces_memory_label_conditions in sqlite_memory.py and azure_sql_memory.py) only joins on AttackResultEntry.conversation_id == PromptMemoryEntry.conversation_id. The 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/TAP, and every TAP branch except the best one. The memory docs still say labels apply "to all prompts sent by any attack".
Repro 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 ConversationEntry.conversation_id == PromptMemoryEntry.conversation_id AND ConversationEntry.attack_result_id == AttackResultEntry.id. Whether adversarial-chat prompts should come back is a design call (they'd also get picked up by label-based batch scoring), so filing as an issue first. #3063 touches the same functions for dotted keys.
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 944
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 278
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG PuzzledConverter cannot select words carrying non-ASCII letters, so the mask falls on articles instead対応中かも @adimalkar が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
microsoft/PyRIT#3022 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
BUG Configuration keeps runtime-status errors after polling recovers対応中かも @rupayon123 が 15 日前に担当しました。 オープンBug: triage GUI help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
microsoft/PyRIT#2868 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 2 日以内に返信
-
BUG: SequentialAttack result is saved without memory labels対応中かも @u7k4rs6 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 22/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
EclipseFdn/open-vsx.org#14043 ·
メンテナーはふだん 1 日以内に返信
-
netbox status: needs triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
netbox-community/netbox#23376 ·
メンテナーはふだん 1 日以内に返信
-
feedback simulation workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
githubnext/gh-aw-workshop#4455 ·
メンテナーはふだん 1 日以内に返信
-
Triage 🩺
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Container scenario crashes without expected_recovery_time, kube DNS example uses retry_waitオープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
krkn-chaos/krkn#1627 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信