Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

BUG: attacks record FAILURE when the objective scorer returns no score

未关闭
#3,112 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 2 天内回复

@richlundeen 已经在做这个了。

开始于 2026年10月10日。

  • #3169 来自 @u7k4rs6 —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
ai

调研方向

Start with _determine_attack_outcome in prompt_sending.py, then check the matching logic in multi_prompt_sending.py, red_teaming.py around line 411, and chunked_request.py, where a missing score maps to FAILURE. Crescendo and TAP already raise in this case, so read them for the expected handling. Done means that when a scorer is configured, a response exists, and the score is None, the outcome is UNDETERMINED with the message 'Objective scorer returned no score', with tests covering the modality-mismatch case. The maintainer filed this to settle the outcome semantics first, so confirm the approach in the thread before changing code.

由索引模型根据 Issue 内容生成。

描述

When the objective scorer returns no score, several attacks record FAILURE, which reads as "measured and defended". AttackOutcome.UNDETERMINED exists for exactly this case.

  • prompt_sending.py _determine_attack_outcome: if response: return FAILURE
  • multi_prompt_sending.py: same
  • red_teaming.py:411: ... if context.last_score else AttackOutcome.FAILURE
  • chunked_request.py: "No score returned from scorer" maps to FAILURE

This happens e.g. when a text-only scorer gets an image response. Crescendo and TAP raise in the same situation instead, so the attacks don't agree either.

PromptSendingAttack:      outcome=FAILURE score=None reason='Failed to achieve objective after 1 attempts'
MultiPromptSendingAttack: outcome=FAILURE score=None reason='Failed to achieve objective'

It understates ASR for modality-mismatched runs, since unscored rows count as defended. Proposal: when a scorer is configured, a response exists and the score is None, return UNDETERMINED with "Objective scorer returned no score". Filing first since it changes reported outcomes.

主要语言
Python
星标
4.6k
派生
944
平均合并
2 天 20 小时
30 天内合并 PR
309

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/PyRIT 的其他 Issue

查看 microsoft/PyRIT 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。