Model-agnostic PII detection with LLMs
The authors introduce a model‑agnostic PII detector that leverages any Amazon Bedrock LLM by embedding entity types directly in the prompt, eliminating the need for retraining when new PII categories emerge. In benchmark tests across five public datasets, the prompt‑driven approach outperformed a standard off‑the‑shelf PII tool, achieving higher precision and recall without additional fine‑tuning. The architecture relies on a single, reusable prompt template that can be swapped for any Bedrock model, offering a flexible plug‑and‑play solution for production pipelines. However, the method’s accuracy hinges on prompt quality and incurs per‑token inference costs typical of Bedrock LLM usage.
⚡ Key Takeaways
- Outperformed an off‑the‑shelf PII tool on five public datasets, demonstrating superior precision/recall.
- Uses a prompt‑based entity list, making the detector model‑agnostic across all Bedrock LLMs.
- Eliminates retraining overhead, but inference cost scales with token usage in Bedrock.
- Integrate by passing the entity list prompt to the Bedrock inference API; no custom model training required.
- Requires access to Amazon Bedrock; performance may degrade if prompt design
Want the full story? Read the original article.
Read on AWS ML Blog ↗