Skip to content

Flight scrubber sends names Presidio misses to the model provider #2520

In review

Description

@abrichr

The flight scrubber (openadapt_flow/flight/scrub.py and flight/pseudonym.py, PR #2493) relies on Presidio to find names. When Presidio misses a name entirely, the name is sent to the model provider unscrubbed.

Seen on synthetic data at #2493 head 9da11b2:

  • A full name Presidio never tags is forwarded as is (synthetic example: "Oren Dunleavy").
  • When only part of a name is tagged, the untagged part is forwarded (synthetic example: the first name in "Anders ").
  • A name is protected only after it has been detected once somewhere else in the same run; after that, the run's pseudonym map replaces it everywhere.

Measured recall on the synthetic corpus (packages/flow/benchmark/flight/scrub_recall, seed 7, 50 records) is 97.2% to 98.0% depending on the path. Every miss is a name. The corpus and the detection patterns have the same author, so recall on real records is likely lower and is unmeasured.

This is not fixed. Until it is, scrubbed mode must not be described as keeping all names from the model.

Possible directions:

  • Treat the task's own record fields (P1 readiness record_* inputs) as known values and add them to the pseudonym map before the first request.
  • Add the record's identity values from the guard task to the map.
  • Measure recall on a held-out corpus written by someone other than the pattern author.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions