Skip to content

FEAT: PII scorer based on open-source Roblox PII classifier - #2487

Open
Frédéric Dubut (fdubut) wants to merge 6 commits into
microsoft:mainfrom
fdubut:roblox_pii
Open

FEAT: PII scorer based on open-source Roblox PII classifier#2487
Frédéric Dubut (fdubut) wants to merge 6 commits into
microsoft:mainfrom
fdubut:roblox_pii

Conversation

@fdubut

Copy link
Copy Markdown
Contributor

Description

This PR adds a PII scorer RobloxPiiScorer based on the open-source Roblox PII classifier on Hugging Face.

For proper support of this kind of scorers, there are two additional changes:

  • We introduce a new providers concept that allows to pull assets from a central provider without tying explicitly to a PyRIT construct (e.g. a target). The first provider is Hugging Face, with new central helpers.
  • We expand ConversationScorer to support per-turn/multi-turn scoring methods instead of concatenating all messages and passing the single message to the underlying scorer

Tests and Documentation

  • Added tests for the new scorer, the ConversationScorer expansion and the Hugging Face provider.
  • Updated documentation to reflect all three changes.

@romanlutz

Copy link
Copy Markdown
Contributor

Why not use HF chat target or OpenAIChatTarget? HF supports the OpenAI API

Comment thread pyrit/providers/hugging_face.py Outdated
Comment thread pyrit/providers/hugging_face.py Outdated
Comment thread doc/getting_started/install_local.md Outdated
Comment thread doc/code/framework.md Outdated
Comment thread pyrit/score/conversation_scorer.py Outdated
Comment thread pyrit/score/float_scale/roblox_pii_scorer.py Outdated
Comment thread pyrit/score/float_scale/roblox_pii_scorer.py Outdated
Comment thread pyrit/providers/hugging_face.py Outdated
@fdubut
Frédéric Dubut (fdubut) marked this pull request as ready for review August 27, 2026 18:53
@fdubut

Copy link
Copy Markdown
Contributor Author

Richard Lundeen (@rlundeen2) I addressed all of your comments, and the PR is now "officially" ready for review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants