Implementation Guide

    Testing Account Number Redaction With Synthetic Data Before an Azure OpenAI Go-Live

    Build a synthetic corpus of structurally valid but clearly fictitious account numbers, covering format variants and adversarial placements. Send it through every path that can reach Azure OpenAI. Score each result against pass/fail criteria agreed in advance, including false negative and false positive rates. Retain the corpus version, configuration, results and approvals as the go-live readiness record. Treat redaction as runtime behavior you verify, not a setting you assume works.

    Step 2: Test every interaction path

    1. 1

      User chat prompts

      Single-turn and multi-turn conversations, including numbers introduced early and referenced later.

    2. 2

      System prompts and templates

      Static instructions and variables that are filled in at runtime.

    3. 3

      Retrieved documents

      Content pulled from search or knowledge stores and appended to the prompt.

    4. 4

      Tool call arguments

      Values the model or an agent passes into tools.

    5. 5

      Tool results

      Structured outputs from databases and APIs returned toward the model.

    6. 6

      File inputs

      Uploaded documents, spreadsheets and images that contain account numbers.

    Evidence to retain as the readiness record

    • Corpus version, generation method and a statement that all values are synthetic
    • Test configuration: enforcement point, policy version, detector settings and paths covered
    • Per-path, per-variant results with false negative and false positive rates
    • Defect list with root cause, fix and rerun results
    • Approvals for criteria and for the go-live decision, with named owners
    • A scope statement of what redaction is and is not claimed to guarantee

    What the test has to prove

    The question before go-live is narrow: when an account number appears in anything headed for Azure OpenAI, is it removed or blocked before the data leaves the enterprise boundary? Answering it requires observing outcomes at the enforcement point, not reading the configuration that is supposed to produce them.

    NIST SP 800-188 defines redaction as the removal of information from a document or dataset for legal or security purposes, also called suppression. It also states that redaction alone is generally insufficient to provide formal privacy guarantees. That caveat belongs in your test plan. A passing result shows that a defined set of account number patterns was handled on a defined set of paths. It does not show that no sensitive data can ever reach the model.

    If your organization is subject to the FTC Safeguards Rule, 16 CFR 314.4 calls for regularly testing or monitoring the effectiveness of safeguards' key controls, systems and procedures, as of November 2026. Confirm applicability separately. Either way, a repeatable test is easier to defend than a one-time check.

    Step 1: Build the synthetic corpus

    Real customer data is usually off-limits in pre-production. NIST SP 800-122 notes that if PII is used in a test environment it must be protected at the same level as in production, and that randomly generated fake data is often ineffective because the properties the system depends on may not be preserved. The practical answer is test data that matches the structure and range of real values but is conspicuously non-real, which NIST SP 800-188 recommends so test values are never mistaken for true confidential data.

    Generate values that follow the formats your detectors are expected to recognize: the same lengths, separators and, if your detection validates check digits, values that pass the same validation. Draw them from a range your institution does not issue, and confirm no generated value collides with a live account. Label the corpus as synthetic, record how it was generated, and version it.

    Then vary format and placement. Cover at least these cases:

    • Separator variants: Plain digits, spaces, hyphens, dots and mixed separators, plus line-break splits.
    • Length and edge values: Shortest and longest account lengths, leading zeros, and extreme values NIST permits in test data.
    • Embedded in free text: Numbers inside sentences, email threads, ticket notes, JSON strings and code comments.
    • Partial masking: Values with only the last four digits visible, or masked in one segment, to check for over- and under-redaction.
    • Check-digit cases: Numbers that pass validation and near-misses that fail it, so you know which the detector accepts.
    • Adversarial placement: Digits split across turns, spelled out, encoded, or placed in structured fields and long documents.

    Step 3: Define pass/fail criteria and metrics

    Set the criteria before the first run, and name who approves them. Without that, results get argued after the fact.

    A false negative is a synthetic account number that reached the model, or any downstream destination, unredacted. A false positive is a non-account value, such as an order number or a timestamp, that was redacted or blocked unnecessarily. Calculate both per path and per variant, not only in aggregate, because a good overall rate can hide a path with no coverage at all.

    Thresholds are an internal decision. Many security teams set the false negative target for well-formed account numbers at zero and treat any miss as a release blocker, while accepting a measured false positive rate that the business owner signs off on. Record every miss with its variant, path and cause. Fix, then rerun the whole corpus, not only the failed cases, so a fix on one path does not quietly break another.

    Verify the outcome, not just the intent. For each test, inspect what actually left the boundary and what the enforcement point decided: allowed, redacted or blocked. Retest after any change to the model, prompt templates, tools, detectors or policy, in line with the deployment-stage testing and validation described in NIST AI RMF 1.0.

    Where runtime enforcement fits

    Pre-go-live testing tells you whether redaction worked against a known corpus on a known date. It cannot tell you what happens when production traffic contains a format nobody anticipated. That gap is why enforcement belongs in the execution path rather than in a review performed afterward.

    Trussed enforces policy in the execution path across models, agents, tools and MCP servers, with allow, redact and block outcomes applied to individual interactions and tool calls. Because enforcement is applied at runtime, not reviewed after the fact, it generates audit-ready evidence of what was allowed, redacted or blocked. The synthetic test method above is how you validate that behavior before launch. The enforcement record is how you show it continued to operate afterward. Trussed is not a pre-deployment testing or red-teaming product, so the corpus, the criteria and the readiness decision remain your team's work.

    Redaction test method at a glance

    Corpus

    Synthetic account numbers in realistic formats and hostile placements.

    Paths

    Every route that carries data toward the model, not only chat prompts.

    Criteria

    Pass/fail rules and false negative and false positive metrics set before testing.

    Evidence

    A retained record of what was tested, what happened and who approved it.

    Show that redaction was enforced, not assumed

    See how policy enforcement in the execution path produces audit-ready evidence for allow, redact and block decisions.

    See How Evidence Is Produced
    Next step

    How does your AI governance program compare?

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