Skip to content

Blind screening: redact identity fields (name/location/company) from the evaluator prompt #41

Description

@AdvancedUno

Problem

Fairness is currently only a prompt instruction ("NEVER let name, gender, race… affect any score"). Instructed LLMs still exhibit measurable demographic score deltas, and we feed the model exactly the signals that carry those cues: the candidate's name (ResumeParsed.name, GitHubSignal.name), location (GitHubSignal.location), and company. _github_summary puts name= straight into the dossier. Telling the model to ignore what we hand it is not a control.

Proposal

Implement blind screening: strip personal-identity fields from a copy of the profile before building the LLM dossier. The original profile is untouched and still drives the report's Candidate: header — only the prompt is redacted.

Redact (demographic cues, not needed to score skill):

  • ResumeParsed.name → blank
  • GitHubSignal.name / .location / .company / .twitter_usernameNone

Preserve (professional signal, not demographic):

  • GitHubSignal.username, .blog, work-history company names, discovered.github, discovered.email.

Implementation notes

  • New _redact_for_prompt(profile) -> CandidateProfile in evaluator.py using model_copy(update=...).
  • Call it as the first line of _user_prompt.
  • Note: resume.text still contains the name/email inline; fully scrubbing free text is out of scope here (removes signal, high false-positive). This issue targets the structured fields, which is where _github_summary/_resume_structured_summary surface identity most cleanly. A follow-up can consider free-text redaction.

Acceptance criteria

  • Candidate name, GitHub location, and GitHub company do not appear in the structured dossier sections of the prompt.
  • GitHub username still appears (professional identifier).
  • The rendered report still shows the candidate's real name in the header.
  • Test in tests/test_evaluation.py asserting the redaction.

Files

  • src/hiregauge/evaluator.py
  • tests/test_evaluation.py

Blocks: counterfactual fairness tests (separate issue). Related: fairness prompt in evaluator._FAIRNESS.

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

    enhancementNew feature or requestsecuritySecurity or privacy issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions