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

BUG HarmBench loader drops ContextString, so contextual behaviors are sent without their context

已关闭 适合新手
#2,817 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

定位 HarmBench loader 并阅读 baselines/direct_request/direct_request.py,其中展示了参考输入组合。验证上下文行为通过 ContextString 和 Behavior 都能到达目标,然后运行相关的 HarmBench 或 loader 测试;当上下文目标包含其上下文且不破坏非上下文行为时,即表示完成。

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

描述

100 of the 400 HarmBench behaviors are "contextual" and only make sense with their ContextString ("Modify this blind SQL injection code...", "Given this section of the Wikipedia article..."). The loader only uses Behavior, so the context ends up in metadata that nothing reads, and a quarter of HarmBench objectives point at text the target never sees. HarmBench is the default dataset for a few scenarios (jailbreak, multilingual, red team agent, the adversarial benchmark), so this comes up a lot.

HarmBench itself combines them as f"{context_str}\n\n---\n\n{behavior}" in baselines/direct_request/direct_request.py. I'd suggest doing the same.

主要语言
Python
星标
4.5k
派生
896
平均合并
2 天 22 小时
30 天内合并 PR
220

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

microsoft/PyRIT 的其他 Issue

查看 microsoft/PyRIT 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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