Recording Which Detector Version Made Each Sensitive Data Decision on an LLM Request
Write a decision record at the moment of enforcement for every allow, redact, or block outcome. Each record carries the detector identifier and version, a hash of its configuration or ruleset, the policy version, the confidence score and threshold, the action taken, a timestamp, and a request correlation ID. Store records apart from application logs, protect them against alteration, and keep raw sensitive content out of them.
Where to capture the record in the request path
- Prompt stage: detector records, then final decision record
- Response stage: detector records, then final decision record
- Tool call input and output stages: same structure, same correlation ID
The decision record schema
Why version attribution has to be evidence, not reconstruction
Sensitive data detectors on LLM prompts and responses change continuously. Pattern rules are edited, ML models are updated, classifier thresholds are tuned. When a request is later questioned, the useful question is not only what the system did but which detector state and which policy produced that outcome.
Application logs rarely answer this. They are mutable, they are written by code that may not know the detector's version, and they are often reassembled after the fact from deployment history. That reconstruction is an inference, not a record. A decision record written when the detector runs and the action is applied is evidence of what happened.
The general support for this practice is broad rather than prescriptive. NIST's generative AI profile suggests documenting each instance where content is generated, modified, or shared to provide a tamperproof history, and notes that version control can track changes over time. NIST SP 800-53 frames audit records around organization-defined auditable events, so you must decide explicitly that each allow, redact, or block decision is one. A useful non-AI precedent is 16 CFR 310.5, which requires a record of which version of the do-not-call registry was used for a compliance decision. The schema below is a practitioner design, not a published standard.
Detector version, policy version, and configuration state
These three are different things and should be recorded separately. The detector version identifies the code, rule pack, or model that produced a finding. The configuration state is how that detector was set up: enabled rules, entity types, thresholds, allow lists. The policy version identifies the logic that turns findings into an action, for example redact above one score and block above another.
Keeping them apart is what lets you answer the question that usually arises when behavior shifts: was this a detector update, a rule or threshold edit, or a policy change? If only one combined version string exists, every investigation starts with guesswork. NIST guidance supports recording explicit versions but does not distinguish these layers, so the separation is a design choice, and a worthwhile one.
Version control on detector rules, configuration, and policy is the precondition. A hash can only be traced to a change if the change history exists somewhere you can read.
Versioning approaches and their tradeoffs
No single scheme covers every detector type. Most environments combine two. These tradeoffs are practitioner judgments about audit attribution.
- Semantic versioning of rule packs: Readable and easy to cite in an audit response. It depends on discipline: a hotfix edited in place without a version bump breaks attribution silently.
- Content hash of configuration: Cannot drift from the real state, because any change produces a new hash. It is opaque to humans, so keep a lookup from hash to the stored configuration snapshot.
- Model artifact identifier: Identifies the exact ML classifier or model build that scored the content. Record it together with the inference settings, since the same artifact can behave differently under different thresholds.
- Combined scheme: A human-readable version for citation plus a hash for verification. The version says what the team intended; the hash proves what ran.
Durability, tamper evidence, retention, and residency
Keep decision records in a store separate from application logs, with write access limited to the enforcement component. NIST refers to a tamperproof history without prescribing a method. Common options include append-only or write-once storage, and hash chaining, where each record includes the hash of the previous one so that any alteration or deletion breaks the chain. Choose a mechanism you can demonstrate to an auditor, and periodically verify it.
Records should describe a decision without containing the sensitive data. Store the entity category, position or span metadata if needed, and the scores, not the matched text. This keeps the evidence store from becoming a second copy of the data you are trying to protect.
Retention needs a deliberate period. 16 CFR 314.4 calls for periodic review of the data retention policy to minimize unnecessary retention, so evidence retention should be set and reviewed like any other. Residency follows the same logic: decide where records are stored and confirm it matches where the underlying traffic is processed. Missing records are a real exposure too; 16 CFR 310.5 excuses incomplete records only where the failure was temporary, inadvertent, and corrected within 30 days, which illustrates how seriously recordkeeping gaps can be treated.
Trussed enforces policy in the execution path, with allow, redact, and block decisions, and produces audit-ready evidence for each decision. It is self-managed in the customer cloud, with configurable retention and data residency.
Using the records for audit response and detector investigations
For audit response, the records let you take a correlation ID and show the detector, version, configuration hash, policy version, threshold, and action behind it. As of December 2026, 16 CFR 314.4 requires regular testing or monitoring of safeguards and reporting to the board on control decisions and testing results. Version-attributed records let test results and reported decisions be tied to a specific detector state rather than to a general description of the control.
For investigating a suspected missed detection, query by time window and detector version. If misses cluster after a version or configuration hash change, the cause is likely the detector. If the detector output is unchanged but actions differ, check the policy version. If scores sit just under a threshold that was recently edited, the configuration state is the likely cause. Each branch is answered from the record without guesswork.
Periodic monitoring of generated content for privacy risks is also suggested in NIST's generative AI profile. Records that carry detector state make that monitoring comparable over time: you can replay a sample set against a new detector version and compare outcomes before promoting a change.
A practical first step is to define the schema, pick one capture point, and add the record to a single high-risk path. Extend to the other stages once reviewers confirm one record is enough to explain one decision.
One enforcement decision, one evidence record
Detector state
Identifier, version, and configuration or ruleset hash
Policy state
Policy version applied to the request
Outcome
Confidence, threshold, and action taken
Linkage
Timestamp and request correlation ID
Produce evidence at the point of enforcement
See how policy enforced in the execution path generates audit-ready evidence for each allow, redact, or block decision.
See How Evidence Is ProducedHow does your AI governance program compare?
See where your program has gaps in less than 2 minutes.