Implementation Guide

    Verifying a RAG System Under ISO/IEC 5338 Before Release

    To verify a RAG system under ISO/IEC 5338, treat the AI system life cycle as the frame and verify each component separately: retrieval and indexing, corpus and access permissions, prompt assembly, grounded generation, and connector or tool behavior. For each one, define a measurable release criterion, record the test evidence, and decide go or no-go on a production-equivalent configuration. Then identify which properties can change after release. Those must be enforced at runtime and evidenced continuously, not only verified once.

    Release readiness evidence pack

    • Component map showing AI elements and conventional software elements, with a named owner for each
    • Per-component thresholds, with the date they were set and the approver
    • Test records from a production-equivalent configuration, including scenarios covered
    • Corpus integrity and access permission test results, with the entitlement matrix used
    • Red-team findings with severity and closure status
    • A list of properties to be enforced at runtime, plus the plan for ongoing testing and monitoring after release

    What ISO/IEC 5338 gives you, and what it leaves to you

    ISO/IEC 5338:2023 defines processes and associated concepts for describing the life cycle of AI systems based on machine learning and heuristic systems. The processes support the definition, control, management, execution and improvement of the AI system across life cycle stages, and they can be used when developing or acquiring AI systems. NIST's crosswalk notes that the AI RMF life cycle stages are aligned with those used in ISO/IEC 5338.

    The standard also permits a mixed approach. Where an element of the system is traditional software, the ISO/IEC/IEEE 12207 software life cycle processes and the ISO/IEC/IEEE 15288 system life cycle processes can be used to implement it. For a RAG system this gives architects a practical split. The retrieval model, embedding model and generator are AI elements. Connectors, APIs, ingestion services and permission layers are largely conventional software.

    ISO/IEC 5338 is a process framework. It does not tell you what a good retrieval relevance score is, and it does not set a grounding threshold for your use case. The mapping below is a practical interpretation for architects, not clause text. The thresholds are yours to define, justify and record.

    Mapping RAG components to verification activities

    A standalone model has one main verification target. A RAG system has several, and each fails in a different way. The table pairs each component with a verification activity, an example release criterion, and the evidence an assessor would expect to find. Criteria are examples of the form to use; the numeric values are set by your own risk assessment.

    • Retrieval and indexing: Activity: run a labeled query set against the production index. Criterion: relevance on that set meets a pre-agreed minimum, including queries with no correct answer in the corpus. Evidence: query set, results, index configuration.
    • Corpus and access permissions: Activity: test retrieval as users with different entitlements and verify document integrity before indexing. Criterion: no restricted document is returned to an unentitled test identity. Evidence: entitlement matrix, test results, ingestion integrity checks.
    • Prompt assembly: Activity: inspect how retrieved text, system instructions and user input are combined, and test with adversarial content in documents. Criterion: injected instructions do not override system policy in the test suite. Evidence: prompt templates, test cases, outcomes.
    • Generation and grounding: Activity: evaluate answers against retrieved context. Criterion: unsupported claims stay below an agreed rate, and the system declines when context is insufficient. Evidence: evaluation set, scoring method, reviewer sign-off.
    • Connectors and tool calls: Activity: test each tool under the verification approach for conventional software, including parameter validation and failure handling. Criterion: calls outside the permitted scope fail. Evidence: interface specifications, test records.
    • Integrated system: Activity: red-team a production-equivalent configuration under simulated real-world conditions across a range of scenarios. Criterion: no open finding above the agreed severity. Evidence: scenario list, findings, closure records.

    Defining release criteria and the go/no-go decision

    NIST's Generative AI Profile suggests establishing minimum thresholds for performance or assurance criteria and reviewing them as part of deployment approval, or go/no-go, policies and processes. Apply that per component rather than as one aggregate score. A high average answer quality can hide a permission failure in one document collection, and an aggregate hides which owner must act.

    Three practices make the gate credible. First, fix thresholds before testing begins, and record who set them and why. Second, test the production-equivalent configuration: the same index, permission model, prompt templates and connectors the live system will use. Results from a development corpus say little about the release candidate. Third, name an owner for each component and record the decision itself, including any accepted residual risk.

    Evidence planning should start at scoping, not at the end. Audit approaches that rely on documented artifacts at each stage, such as design documents, architecture diagrams and test records, are far easier to satisfy when those artifacts are produced as work proceeds. Involving operators, domain experts, designers, evaluators and auditors in test planning also reduces rework at the gate.

    What pre-release verification cannot establish

    Pre-release verification shows that the system met its criteria on the test set, at a point in time, under test conditions. NIST states that AI systems should be tested before deployment and regularly during operation, and that the validity and reliability of deployed systems are often assessed through ongoing testing or monitoring. Release is the start of a separate assurance activity.

    Several RAG properties depend on conditions that change after the gate. Document permissions are edited. New documents enter the corpus and some contain sensitive data. Users submit inputs the test set never anticipated. Connectors are reconfigured, and tools are added. A permission test that passed in March says nothing about a document reclassified in June.

    The design rule is to separate verified properties from enforced properties. A verified property is demonstrated before release. An enforced property is applied to every interaction and tool call while the system runs, and each decision is recorded. Properties that are cheap to violate and costly to discover afterward belong in the second group: exposure of sensitive data in a response, a tool call outside permitted scope, and disclosure of content the requesting user is not entitled to see. Enforcement at runtime, not review after the fact, is what keeps those properties true after release.

    Runtime policy enforcement as a complement to verification

    Trussed AI addresses the runtime half of this problem. It is not a pre-deployment testing or red-teaming product, so it does not replace the verification work above. Trussed enforces policy in the execution path for individual interactions and tool calls, across models, agents, tools and MCP servers. Each interaction can be allowed, redacted or blocked, and where required it can be rate limited or escalated for human approval.

    Because enforcement happens in the path, the decision and its outcome produce audit-ready evidence as a by-product. That evidence is continuous, and it maps to frameworks including HIPAA, NAIC, NYDFS, the EU AI Act and NIST. For a regulated enterprise, this gives an assessor two complementary records: the release evidence pack showing what was verified, and runtime evidence showing what the system was allowed to do and what it did. Trussed has run in continuous production in a regulated enterprise for more than 18 months and supports self-managed deployment in the customer cloud with configurable retention and data residency.

    The release gate defines what you believe about the system. Runtime enforcement keeps that belief true and shows it.

    From RAG component to release evidence

    Component

    Retrieval, corpus and permissions, prompt assembly, generation, connectors

    Verification activity

    A defined test or review per component, owned and repeatable

    Release gate

    Thresholds set in advance and reviewed at go/no-go

    Runtime enforcement

    Allow, redact, block applied to live interactions and tool calls

    Pair release verification with runtime enforcement

    Review which of your RAG properties need enforcement in the execution path and what evidence that enforcement produces.

    Explore Agent and Tool-Call Enforcement
    Next step

    How does your AI governance program compare?

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