FEAT Preserve multiple labeled true/false verdicts from one scorer call
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 32/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- ai, backend-api-design, security
Línea de trabajo
Empieza con MessageTrueFalseScorer y compara su comportamiento de agregación y puntuación con el precedente de AzureContentFilterScorer de múltiples categorías. Revisa después el trabajo sobre el contrato del scorer en #2491 y #2518, y luego el contexto de WildGuard en #2302. La tarea estará terminada cuando se establezca una representación reutilizable acordada, se preserve el comportamiento de veredicto único y se cubran la persistencia, la composición, los wrappers, el batching y la evaluación con pruebas específicas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
Scoreper 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
MessageTrueFalseScorerbehavior 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:
- Add the core category-preserving contract and aggregation behavior using a synthetic test scorer.
- After #2302 lands, optionally migrate WildGuard while retaining its current selected-label API as a compatibility projection.
Open design questions
- Should this be a separate true/false scorer base, or an aggregation mode on
MessageTrueFalseScorer? - Is
score_categorythe right stable identity for each verdict, or should the score model carry a dedicated output label? - 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
- 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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/PyRIT
-
BUG HarmBench loader drops ContextString, so contextual behaviors are sent without their context Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Todos los issues de microsoft/PyRIT
Issues similares
-
agent-ready documentation needs-triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Add https://search.jeremyh.xyz/ Abiertoinstance instance add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
searxng/searx-instances#939 · 1 comentario ·
-
area-deployment area-integrations triage:bot-seen
Dificultad 2/5 Medio día Aptitud para principiantes 86/100