Technical Guide

    Detecting sensitive data in LLM responses that paraphrase rather than copy

    Regex, dictionaries, fingerprints and checksums detect sensitive data only when a response reproduces it in a recognizable form. A model can restate, summarize, translate or infer the same information in wording that matches nothing. Closing the gap takes layered detection: entity recognition, semantic similarity, classifier or model-based inspection, and comparison against the prompt and retrieved content. Each layer is probabilistic, so policy needs confidence thresholds and an accepted residual risk. Enforcement has to run in the execution path, before the response reaches a user or a tool, with allow, redact, block or escalate actions and a retained record of each decision.

    Where inspection and enforcement have to sit

    1. 1

      Allow

      The response passes all layers below threshold and is released unchanged.

    2. 2

      Redact

      Identified spans are removed or masked. Paraphrased content is harder to localize, so redaction may need to remove a whole sentence or passage.

    3. 3

      Block

      The response or tool call is stopped and the user or system receives a defined refusal.

    4. 4

      Escalate

      The interaction is held and routed to the appropriate human authority for approval when a threshold is crossed.

    Requirements for runtime output enforcement

    • Inspection occurs before the response reaches the user or a downstream tool, and covers tool-call arguments as well as text.
    • More than one detection method runs, with deterministic checks first and semantic or model-based checks for higher-risk categories.
    • The response can be compared against the prompt and retrieved content for the same interaction.
    • Confidence thresholds are set per data category and each band maps to a defined action: allow, redact, block or escalate.
    • Detectors are tested against paraphrased, translated, summarized and inferred samples, with miss and false-positive rates measured on your own traffic.
    • Each decision records the interaction, the policy version applied, the findings and confidence, the action taken, and any human approval, in a form that can be retained and exported.

    Why verbatim-match controls miss paraphrased disclosure

    Traditional data loss prevention assumes sensitive data has a recognizable form: a nine-digit number, a card number that passes a checksum, a term in a dictionary, a document whose fingerprint is on file. These controls work when content is copied. An LLM does not copy by default. It generates text, and it can express the same fact in many surface forms.

    A response might summarize a clinical note without naming the patient but with enough detail to identify them. It might translate a confidential contract clause into another language, convert a table of account balances into a sentence, or infer a health condition from context without ever stating a diagnosis code. None of these outputs contains the original string, so pattern, dictionary and fingerprint checks return nothing. This is a limit of the method's design, not a tuning problem.

    The disclosure surface is also wider than any fixed list. NIST's Generative AI Profile lists leakage of biometric, health, location and other personal or sensitive data as a data privacy risk, and notes that what counts as sensitive can be highly contextual. NIST also notes that applications may be given sensitive information in their context, as in retrieval-augmented generation, for summarization or other tasks. Summarization is exactly where paraphrase happens.

    Detection approaches compared

    No single method covers verbatim, paraphrased, translated and inferred disclosure. The comparison below describes what each method can see, where it fails, and the usual cost in latency and false positives. The characterizations are general engineering trade-offs, not benchmark results, so measure each against your own data and response types.

    • Pattern and entity matching: Strength: fast and deterministic for structured identifiers and recognizable entities. Failure: misses restated, translated or inferred content, and structured values spelled out in words. False positives: moderate for loose patterns, low with checksums. Latency: lowest.
    • Fingerprinting: Strength: precise for known documents and records. Failure: any rewording changes the content being compared, and unlisted material has no fingerprint. False positives: low. Latency: low.
    • Semantic similarity: Strength: compares meaning rather than strings, so it can catch rewording of known protected text. Failure: needs a reference corpus, and similarity thresholds are hard to set. Short or partial restatements can fall below the threshold, and topically related but harmless text can exceed it. Latency: moderate.
    • Classifier and model-based inspection: Strength: can judge whether a response discloses personal, health, financial or confidential details without a fixed pattern. Prompted and fine-tuned LLM-based detectors are an established approach for classifying model output, though NIST describes them for harmful or undesirable content generally. Failure: probabilistic, can be inconsistent, and is itself open to manipulation. Latency: highest.
    • Context-aware comparison: Strength: checks the response against the prompt and retrieved content for that interaction, so it can flag restatements of what the model was given. NIST describes comparing output to the known prompt as a mitigation for prompt stealing. Failure: does not catch information the model produced from outside the supplied context. Latency: moderate.

    Treat paraphrase detection as probabilistic

    Exact-match controls give a binary answer. Paraphrase detection gives a score. That changes how policy is written. Instead of one rule that blocks on a match, you define confidence thresholds per data category, and each band maps to an action: allow below the lower threshold, redact or escalate in the middle, block above the upper threshold. A threshold for health information in a clinical setting will reasonably differ from one for internal project names.

    Evidence from an adjacent field shows why caution is warranted. NIST reports that detection performance for AI-generated text decreases significantly under paraphrase attacks, and that retrieval-based detection may improve robustness but needs further research. That work concerns authorship, not sensitive data, so it is an analogy rather than a measurement. It does suggest that paraphrase is a hard condition for text detectors and that any single detector should be tested against rewording before it is trusted.

    Plan for residual risk explicitly. Layered methods reduce misses but do not remove them, and tighter thresholds raise false positives that block legitimate work. NIST also notes that model responses about personal information may wrongly assign the owner of the information, so a flagged response can be a misattribution rather than a true disclosure. Calibrate thresholds on representative traffic, test classifiers with paraphrased, translated and summarized samples, and have organization-defined thresholds trigger human review where the risk warrants it.

    How enforcement in the execution path fits these requirements

    Trussed enforces policy in the execution path across models, agents, tools, MCP servers, AI sites and coding assistants, so decisions are enforced at runtime, not reviewed after the fact. Actions include allow, redact and block, plus rate limiting and escalation for human approval, and they apply to individual interactions and tool calls. That matches the placement and action requirements above.

    Because the enforcement point makes the decision, it can also produce the record of it. Trussed generates continuous audit-ready evidence from enforcement, mapped to HIPAA, NAIC, NYDFS, the EU AI Act and NIST. It can be deployed self-managed in the customer cloud, with configurable retention and data residency, which matters when the evidence itself contains regulated content.

    No enforcement layer makes paraphrase detection certain. The point is that thresholds, actions and evidence are applied consistently at one place in the path, so residual risk is defined and its handling can be shown.

    Output inspection in the execution path

    Inputs

    Prompt and retrieved content define what the model could disclose.

    Response

    Text and tool-call arguments are inspected before release.

    Detection

    Layered methods produce findings with confidence scores.

    Action

    Allow, redact, block or escalate for human approval.

    Evidence

    Each decision is recorded for audit.

    Review your output enforcement requirements

    Talk through where output inspection sits in your execution path, which actions apply at each threshold, and what evidence each decision should produce.

    Talk to an Expert
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.