Train a smaller LLM or a BERT-style model for the PII detection pipeline #250
simonaszilinskas
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The current anonymisation / PII pipeline lives in:
utils/topics_pii.pyToday we rely on LLM-as-a-judge to decide whether a conversation contains PII.
conversations_rawkeeps everything, including PII.This design is intentional and conservative, but has limitations.
What we tried before (and why it didn’t work)
We explored PII replacement, not just detection, but abandoned it:
Google Data Loss Prevention (DLP)
Too many false positives for our data.
Presidio / spaCy-based detection
Too many false positives and false negatives.
LLM-generated redacted conversations
The LLM kept injecting extra content (explanations, formatting, meta text).
This might be salvageable by enforcing fenced output, but it was not robust enough at the time.
Because of this, we settled on binary classification only: PII or not, based on an LLM with structured outputs.
Problems with the current approach
Cost
Model is overkill
False negatives exist
Goal of this issue
Improve the current pipeline while keeping it simple and conservative:
Proposed direction
Either
Beta Was this translation helpful? Give feedback.
All reactions