Measure the workload.
Report the limits.

Validate against the work you actually do

A useful detection evaluation starts with a defined workload, an independently selected corpus and the exact runtime being deployed. Handwritten examples can check whether a feature responds as expected. They cannot establish how often a product will miss harmful content or interrupt ordinary work.

Keep two kinds of evidence separate

  • Implementation checks: small, inert fixtures for input handling, configuration, output shape, error handling and repeatability. Mark every authored or sanitized fixture. Report its expected behavior and observed result without treating it as a naturally occurring attack or a representative workload.
  • Representative evaluation: a frozen, rights-cleared sample selected from the intended application population before results are known. Establish source diversity, realistic benign content and independently reviewed labels. A changed source, integration or policy may require a new evaluation.

The methodology below is a proposed evaluation design. It is not a report of completed tests. It follows the principle of measuring under conditions relevant to deployment and documenting limits, reflected in the NIST AI RMF measurement guidance.

1. Define the claim before selecting the sample

Name the integration, content boundary and intended action: for example, application input, model output, tool arguments or tool results. Define whether the measured outcome is a detector finding, a policy block or an action actually prevented by the integration. List supported languages, domains, lengths, formats and operating conditions. Record out-of-scope content. Agree acceptance criteria for missed findings, false blocks, incomplete scans and latency before inspecting the final test results.

2. Build a corpus with a traceable selection process

Use authorized, rights-cleared material from the application’s intended workload or suitable independently maintained sources. Public availability alone does not establish permission to redistribute. Record the publisher or data owner, original source, publication and collection dates, version, license or permission, allowed use, content hash, transformations and inclusion rationale. If material cannot be shared, retain access-controlled records and publish only authorized aggregate evidence.

Prefer naturally occurring examples over detector-shaped templates. Sample before looking at detector scores. Include routine benign requests and documents, legitimate technical writing, ordinary quotations, code discussion, multilingual text and Unicode as used in the target environment. Assess whether source, language and length distributions resemble the stated workload. A corpus is not representative merely because it is large, balanced or described as realistic.

Sanitization must be recorded because removing content can change the signal being measured. Synthetic variants belong in a separate diagnostic set. Do not count dozens of near-identical variants as independent coverage. This protocol does not provide executable attack material, generate offensive payloads or require live-target testing.

3. Use independent labels and preserve ambiguity

Define a written rubric independently of the detector. Record the task context, relevant content boundary, expected policy decision and rationale. Review labels without seeing the tested system’s result. Use a second reviewer for disputed and high-impact cases, record agreement and adjudication, and preserve uncertain cases rather than relabeling them to match the output.

  • Ordinary benign: legitimate content from the intended population
  • Hard negatives: legitimate content with vocabulary or formatting that resembles a configured indicator
  • In-scope policy-positive: independently reviewed content requiring the defined finding or response under the stated policy
  • Ambiguous or context-dependent: cases that need missing context or a policy choice
  • Unsupported or incomplete: cases the integration cannot fully process, kept visible in a separate denominator

Do not assume that every occurrence of security terminology is malicious or that every suspicious-looking snippet must be blocked. Content labels and policy decisions are separate fields. A benign-only evaluation can estimate false-positive behavior within its sample; it cannot establish recall or protection against attacks.

4. Freeze the split and prevent leakage

Separate development examples, threshold-tuning data and a final held-out evaluation set. Keep related conversations, source documents, template families, duplicates and near-duplicates in the same partition. Use a temporal holdout when later traffic is the intended use. Record the split manifest, seed where sampling is random, deduplication policy and any overlap with prior development material.

Freeze rules, thresholds, dictionaries, transformations and the runtime before the held-out run. If results inform a fix, retain that run as evidence and evaluate the revised system on a newly protected holdout. Repeatedly tuning against the same test set weakens the claim of independence. The scikit-learn leakage guidance explains why test information must remain outside model and configuration selection.

5. Test the real runtime and the enforcing integration

Identify the product version, package or commit hash, dependencies, configuration hash, policy, preset and detector switches. Record OS, runtime, CPU, memory, concurrency, request lengths and logging settings. Check advertised controls using harmless fixtures before measuring performance. Configuration controls that do not affect the underlying scan must be fixed or removed from the claim.

Keep scanner classification and end-to-end enforcement results distinct. Confirm that supported application paths call the scanner and handle findings, incomplete results and errors as designed. Use inert actions and safe fixtures for integration checks. No raw credential, live data-destruction action or network exploitation is required. Record skipped and unsupported paths rather than counting them as passes.

6. Report errors with counts and uncertainty

For each category, source family, language, length band and policy boundary, report the total attempted, successfully evaluated, ambiguous, unsupported and failed cases. Publish the confusion matrix for the predetermined binary label where one is appropriate: true positives, false positives, true negatives and false negatives. Distinguish a finding from an enforced block and state how each output maps to the label.

  • Precision: true positives divided by all positive predictions
  • Recall: true positives divided by all genuinely positive cases
  • False-positive rate: false positives divided by all genuinely negative cases
  • False-negative rate: false negatives divided by all genuinely positive cases
  • Coverage and failure rates: evaluated, unsupported, timed-out and failed cases divided by all attempted cases

Show denominators beside percentages and use an undefined marker when a denominator is zero. Report confidence intervals, including when a sample observes zero errors. Account for related samples when estimating uncertainty; a thousand variants of one template are not a thousand independent observations. Choose sample sizes from the error bound and per-category precision needed for the claim, rather than a round total.

Present both diagnostic results on a deliberately balanced set and results weighted to an independently justified operating mix, if that mix is known. Label an assumed prevalence explicitly. Precision changes with prevalence, so a balanced result must not be presented as the expected production alert quality. References: classification metrics and confidence intervals for proportions.

7. Measure latency without hiding work

Report scanner-only and end-to-end latency separately. Include sample count, median and p95; use p99 only when the sample supports a meaningful tail estimate. Describe cold-start, warm-up, concurrency, payload sizes, logging, timeouts and repeated runs. Measure any comparison baseline separately so a second scan does not silently inflate the tested scanner’s latency. Publish throughput with its load and failure rate.

8. Publish the complete evidence package

Preserve the frozen corpus manifest, licensing record, label rubric, split IDs, all configurations, environment, run identifier, raw per-case outcomes, errors, timing samples, aggregate calculations and exclusions. Include failure cases and changed conclusions. Report which observations were reproduced independently. Make a claim only for the tested version, policy, integration and population, and recheck when any of them changes.

VATRION / YOUR CHOICE

Cookie settings

The site works with optional fonts turned off. No analytics or advertising tools are enabled.

Your privacy choiceSaved when you choose

A local preference record remembers this choice for up to 180 days. It stays in this browser and is not a tracking identifier. It is local storage, not a cookie.

Allow Google to receive your IP address and request information to deliver the site fonts. Leave this off to use fonts already on your device.

Turning this off after allowing it reloads this page. Requests already sent cannot be withdrawn.

Cookies & storage details · Privacy notice