claude-skills/research-ops/skills/interview-mapper/references/ethics.md
Socialpranker a2aa3c3dea fix(research-ops): repair fuzzy quote matching in interview-mapper
`fuzzy_score` had two defects that made the fuzzy branch of the verification
cascade dead on any real transcript:

1. `SequenceMatcher` ran with `autojunk` at its default. On strings over 200
   characters the heuristic marks as junk any character occurring in more than
   1% of positions — for natural text that is the space and the frequent
   letters. The score of one and the same quote swung 0..96 depending on its
   position in the text.
2. The comparison window was sized by the longest matched block. A single
   dropped word splits the quote into two blocks, so the quote was compared
   against half of itself.

Measured on the org-mapping-vmdi fixture (40 verbatim quotes with one word
dropped): median score 7.9 → 96.8, and 0/40 → 40/40 pass the default threshold
of 88. The control hallucination is still rejected (5.7 → 40.0). Gold set at
threshold 88: RU F1 0.89 → 1.00 (recall 0.79 → 1.00), EN stays at 1.00;
precision remains 1.00 — no false confirmations either way.

Also in this change:

- `number_lines.py` / `batch_prepare.py` accept `.srt` and `.vtt`. Real
  transcription services emit subtitles, and they carry what the skill already
  requires: speaker labels (diarization is a hard requirement for the group
  lenses) and timecodes, written to a `*_nl.timecodes.json` sidecar so a human
  can listen to a disputed spot instead of guessing at it.
- Both scripts flag lines that read as instructions to the model into
  `*_nl.flags.json`. A transcript is untrusted input: such a line stays
  interview data, quotable as an utterance and never followed as an
  instruction.
- `batch_prepare.py` no longer silently overwrites `demo_nl.txt` when a folder
  holds both `demo.srt` and `demo.vtt`.
- `references/ethics.md` — consent and de-identification gate. The skill reads
  exit, conflict-mediation and candidate interviews, i.e. other people's
  personal data feeding decisions about those people, and said nothing about
  it. De-identify before `number_lines.py`, or quotes stop matching the source.
- `references/pipeline.md` had fallen behind SKILL.md: it still told the reader
  to assemble claims.json by hand and judge entailment by eye, bypassing the
  logged `check_support.py` step. Added the missing S0.5 and the cost of S3.
- `references/reliability.md` calibration section re-measured; the rapidfuzz
  recommendation is gone — the fixed difflib path scores 94.3 on the case that
  recommendation existed for.
- `references/validation.md` — a pilot protocol for real interviews. The
  fixtures and the gold set were written by the same model that does the
  mapping, and an F1=1.00 plateau across the whole 70–88 grid means the set is
  no longer sensitive to the threshold, not that 88 is optimal.
2026-08-27 07:18:53 +02:00

4.3 KiB

People's data: consent, de-identification, limits of use

The skill works with specific people talking about their job, their resignation, a conflict, a hiring decision. That is personal data, and some lenses additionally feed decisions ABOUT those people. Below is the gate to clear in S0, before the transcript goes anywhere. This is working discipline, not legal advice: the regulatory regime (GDPR, local data-protection law, sector rules) is your counsel's call, not this file's.

The S0 gate — three questions before you start

  1. Does the respondent consent to recording, transcription and analysis — and does that consent cover THIS analysis? Consent to "a recording for the minutes" is not consent to an LLM pipeline and to being quoted in a stakeholder report. No clear answer → don't start, ask the client.
  2. Where the text goes. The whole transcript travels to the model, and in S3 once per run. If the material must not leave your perimeter, that is settled BEFORE S1 (local model, de-identification, or declining), not after.
  3. Is de-identification required — and to what degree. Default for sensitive lenses: de-identify.

What exactly to de-identify

Replace with stable pseudonyms (Respondent-1, Colleague-A, System-1) rather than deleting: mapping needs the coherence, and the mapping table is stored apart from the transcript and never reaches the report.

  • Names and surnames — the respondent's, colleagues', managers', clients'.
  • A job title bound to a small department: "the only registrar in the collections department" de-anonymizes harder than a surname does.
  • Contacts, addresses, document numbers, an individual's salary figures.
  • Names of internal systems and projects — where their very existence is confidential.
  • Rare biographical details (illness, family composition, criminal record, religion), especially ones dropped in passing: they are almost never needed by a cell and almost always identify.

What NOT to de-identify: the substance of the problem, the sequence of events, process numbers — otherwise the mapping loses its point.

Pseudonymization ≠ anonymization. Five interviews from an eight-person department de-anonymize each other even without names. For small teams the honest output is aggregation to a level where no individual can be reconstructed, or named quoting agreed with the respondents.

De-identification vs traceability — how not to break one with the other

The skill rests on verbatim quotes and line numbers. The order that preserves both: de-identify before number_lines.py, so the whole pipeline runs on the de-identified text and verify_quotes.py checks quotes against exactly that. De-identify after mapping and the quotes stop matching the source — you get mass rejected not because the model invented anything, but because the source was swapped underneath it.

Higher-risk lenses

  • candidate — a hiring decision about a person. Cells A2/A3/A5 (attribution, locus of responsibility, red flags) assess a personality from a transcript, which is where LLMs are weakest. The skill's output is material for the interviewer, not grounds for rejection. Discriminatory attributes (age, family, health, ethnicity, beliefs) are not coded at all, even when voiced.
  • exit — a leaver is exposed, and their words often concern third parties who never consented. Quotes about named managers do not go into the report by name.
  • conflict-mediation — each side is mapped separately and is NOT shown to the other side without explicit consent; the mediator decides what to disclose. One side's position retold in the other's words is not mapping.
  • team-retro / focus-group — participants heard each other, but did not agree to be quoted outside; the report uses roles, not names, by default.

Storage and deletion

  • Transcripts, sidecars (*_nl.timecodes.json, *_nl.flags.json), claims.json, support.json and the S3 runs hold the same personal data as the original — they share its storage regime.
  • The pseudonym table lives apart from all of the above.
  • A retention period is set up front, together with who deletes it. "Until we no longer need it" is not a period.
  • build_provenance.py/render_board.py assemble a board of quotes into a single file, which is the easiest thing of all to share — check it carries no names before sending it.