Technical Guide

Detecting quasi-identifiers and re-identification risk in LLM prompts

To detect quasi-identifiers in LLM prompts, evaluate attribute combinations across the whole context (the current prompt, conversation history, retrieved content, and tool-call payloads) instead of scanning for individual identifiers. Estimate how narrowly each combination singles out a person or entity, convert that into a risk score, and map the score to policy actions such as redaction, generalization, blocking, or escalation. Record each decision in an audit log.

Explore Runtime Governance

What a quasi-identifier is in the context of a prompt

In an LLM prompt, re-identification risk comes from attribute combinations, not from single tokens. Each combination is judged by how narrowly it singles out a person or entity.

Why direct-identifier detection is not enough

Scanning for individual identifiers examines single tokens. Because the risk sits in the combination of attributes, a scan of that kind can miss exposure that only appears when attributes from different turns, retrieved context, and tool-call payloads are read together.

Comparing detection approaches

The two approaches differ in what they examine and in what they estimate.

AspectIndividual identifier scanningCombination-aware evaluation
Unit of analysisIndividual tokens or identifiersAttribute combinations
Context examinedThe token being scannedPrompt, conversation history, retrieved content, and tool-call payloads
Risk estimateNot based on how narrowly attributes combineHow narrowly each combination singles out a person or entity

Scoring risk without a reference population

Estimate how narrowly each combination singles out a person or entity, then convert that estimate into a risk score. The score combines four factors:

  • Attribute count
  • Rarity
  • Linkability
  • Destination

Map the score to a policy action: allow, generalize, redact, block, or escalate. Record the rationale, score, and action in an audit log without retaining the raw content. The evaluation questions below ask how any control estimates uniqueness without a reference population, and what false-positive and false-negative rates it has shown on your own data.

Placing detection and enforcement in the runtime path

Inspection sits between the inputs that reach the model and the actions taken on them, in five stages:

  1. Prompt and historyInspect the new input together with prior turns.
  2. Retrieved contextAssess attributes added by retrieval before they reach the model.
  3. Risk scoreCombine attribute count, rarity, linkability, and destination.
  4. Policy actionAllow, generalize, redact, block, or escalate.
  5. Audit recordLog rationale, score, and action without raw content.

Questions to evaluate any detection control

  • Does it assess attribute combinations across turns, retrieved context, and tool-call payloads, or only individual tokens?
  • How does it estimate uniqueness without a reference population, and what false-positive and false-negative rates has it shown on your own data?
  • Can policy actions (redact, generalize, block, escalate) be set per risk score, destination, and data context?
  • What latency does inline inspection add to prompt and tool-call paths, and how is it measured?
  • Do audit logs record rationale, score, and action without retaining the sensitive content?

Apply policy where prompts and tool calls actually flow

Discuss how runtime policy enforcement and audit logging can support quasi-identifier controls across your agent and model traffic.

Talk to an Expert