Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

FEAT Preserve multiple labeled true/false verdicts from one scorer call

オープン
#2,565 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
32/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python

調査の方向性

MessageTrueFalseScorer から始め、その集約とスコアの挙動を、複数カテゴリに対応する AzureContentFilterScorer の先例と比較してください。次に、#2491 と #2518 の scorer contract に関する作業を確認し、その後 #2302 の WildGuard のコンテキストを確認してください。合意された再利用可能な表現を確立し、単一 verdict の挙動を維持し、永続化、合成、ラッパー、バッチ処理、評価を焦点を絞ったテストでカバーできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Is your feature request related to a problem? Please describe.

Some classifier endpoints return several independent verdicts from one inference. WildGuard is a concrete example: one request reports whether the user request is harmful, whether the response is a refusal, and whether the response is harmful.

MessageTrueFalseScorer currently reduces piece-level results to one boolean. In #2302, WildGuardScorer therefore selects one label as the Score value and preserves the other two as flattened score_metadata. This avoids repeated model calls, but the additional verdicts are not independently queryable, composable, or evaluable through the normal score APIs. Creating three scorer instances would expose three scores but repeat the same inference three times.

There is already a useful precedent on the float side: AzureContentFilterScorer can return one Score per harm category from a single service response. The true/false family does not have an equivalent category-preserving path because its base implementation aggregates every returned boolean together.

Describe the solution you'd like

Add an opt-in way for a true/false scorer to return multiple labeled verdicts from one scoring operation.

Desired behavior:

  • One target call may produce one Score per labeled verdict.
  • Each verdict is independently persisted and addressable using a stable label/category.
  • For a message containing several supported pieces, aggregation happens within each label, never across unrelated labels.
  • Existing single-verdict MessageTrueFalseScorer behavior remains unchanged.
  • Attack paths that require one objective verdict use an explicit selector/projection rather than relying on list order.
  • Persistence, composition, threshold/wrapper behavior, batch scoring, and evaluation semantics are covered by focused tests.

I would prefer to stage this:

  1. Add the core category-preserving contract and aggregation behavior using a synthetic test scorer.
  2. After #2302 lands, optionally migrate WildGuard while retaining its current selected-label API as a compatibility projection.
Open design questions
  1. Should this be a separate true/false scorer base, or an aggregation mode on MessageTrueFalseScorer?
  2. Is score_category the right stable identity for each verdict, or should the score model carry a dedicated output label?
  3. Should selecting the objective verdict be owned by the scorer, a generic wrapper, or AttackScoringConfig?

Opening this to settle the representation before writing code.

Alternatives considered
  • Keep secondary verdicts only in score_metadata: efficient, but they remain outside normal score querying, composition, and evaluation.
  • Instantiate one scorer per label: fits the current API, but performs the same expensive model inference repeatedly.
  • Make WildGuard a one-off multi-score implementation: possible, but would leave true/false aggregation and downstream single-score assumptions implicit rather than establishing a reusable contract.
Additional context
  • WildGuard implementation: #2302
  • Existing multi-category float precedent: AzureContentFilterScorer
  • Recent scorer contract work: #2491 and #2518
主要言語
Python
スター
4.5k
フォーク
896
平均マージ
3日 1時間
マージ済み PR(30日)
208

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/PyRIT のほかの issue

microsoft/PyRIT の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。