Implementation Guide

    Recording the Model and Prompt Version Behind Every AI-Drafted Discharge Summary

    Write one record per interaction, at the moment the request executes, containing the timestamp, the model identifier and version actually called, the prompt template identifier and version or content hash, the policy decision, and a pointer to the output. Capture these fields in the request path rather than reconstructing them from code, configuration and separate logs later. Keep prompt release management in your own change process, and retain the records under a schedule that your legal and clinical teams approve.

    Failure modes and the controls that detect them

    Silent model updates

    A provider-side change alters behaviour while the configured name stays the same. Record the version returned with each response and alert when the observed value changes.

    Fallback routing

    A failover endpoint serves the request and the record shows the primary. Record the model that answered, and flag any interaction where it differs from the configured target.

    Unversioned prompt edits

    Templates are changed outside change control. Compare the recorded hash with the approved release hash.

    Missing records

    Generation succeeds but the write fails. Reconcile record counts against document counts on a schedule, and fail closed where policy requires.

    Altered records

    Entries are edited or deleted after the fact. Use append-only storage with restricted write access and review who can modify or delete.

    The problem: version details live in too many places

    When an auditor, a clinical quality reviewer or an incident team asks which model and which prompt produced a specific discharge summary, the answer is often spread across application code, deployment configuration and separate logs. Model endpoints get updated or swapped. Prompt templates get edited without a release identifier. By the time the question arrives, the configuration that was live on the day of generation may no longer exist in any recoverable form.

    The fix is to treat version recording as evidence capture at the point of execution. A document-level note written afterwards describes what someone believes happened. A record written by the system in the request path shows what was actually called. The rest of this guide covers the record schema, where to bind it, how to version prompts, and how to retain the result.

    Define the minimum record

    Keep the schema small enough that every interaction can populate every field. This schema is a design recommendation. It is not a format prescribed by any regulation, although the period-of-use element has direct support in the EU AI Act's logging provisions, which list the start and end date and time of each use of a system.

    • Timestamp: Start and end of the interaction, from a single trusted clock.
    • Model identifier and version: The model actually served, not the one configured. Where the provider returns a version or snapshot identifier in the response, store it. Otherwise store the exact deployment identifier you called.
    • Prompt template identifier and version or hash: A release identifier, a content hash of the rendered template, or both.
    • Policy decision: The policy applied and the action taken, such as allow, redact or block.
    • Output reference: A pointer to the stored draft, not the clinical text itself.
    • Interaction identifier: A unique key that links the record to the summary in the document system.

    Capture and bind in the request path

    Bind version metadata where the request is built and where the response returns, not in a downstream batch job. The component that resolves the prompt template should stamp its release identifier or hash onto the request. The component that calls the model should record the endpoint and the version information in the response. One write then combines both with the policy decision and the output reference.

    There are three common capture options. Application-level instrumentation is simple but depends on every team implementing it consistently. A shared client library standardises the fields but can be bypassed. Enforcement in the execution path, such as a proxy or policy layer that every model call must traverse, produces the record whether or not the calling application cooperates. The third option costs more to operate but removes the dependence on individual developers.

    Two design rules apply regardless of option. Write the record before the draft is released to the clinician workflow, so a summary cannot exist without its record. And store a pointer to the output rather than embedding clinical content, which keeps the evidence store smaller and limits how much patient data it holds.

    Version and reference prompt templates

    A prompt template is a release artefact. Store templates in a registry or version-controlled repository, give each approved release an identifier, and make the runtime resolve templates only by that identifier. Where practical, also compute a content hash of the final rendered template and record it. The identifier tells you which approved release was intended. The hash confirms that the text sent matches that release.

    This matters because the most common prompt failure is an edit made outside change control, for example a quick wording change in a configuration file. If the runtime records both the identifier and the hash, a mismatch is detectable. If it records only a free-text label, the edit is invisible.

    Treat model endpoint changes the same way. A change of model, version or routing target should be a versioned release, so that a version string in a record maps to a known configuration with a known approval.

    Retention, regulatory context and what runtime evidence covers

    The EU AI Act provides that high-risk AI systems shall technically allow for the automatic recording of events over the lifetime of the system, at a level appropriate to the intended purpose, to support traceability. Its technical documentation content also includes the version of the system, reflecting its relation to previous versions. That language favours event records written at each interaction and stable, ordered version identifiers. Whether a given discharge summary tool is a high-risk system needs a separate legal assessment. As of November 2026, the European Parliament has adopted a position on a simplification proposal that would set fixed application dates for high-risk requirements, so timing should be treated as subject to change. If Article 50 applies, also consider how machine-readable marking of generated text fits the clinical document format.

    Retention periods should come from your own legal, privacy and clinical record requirements, not from a default in the tooling. Choose a schedule, make it configurable, and keep the evidence in an environment you control.

    It also helps to separate two kinds of evidence. Runtime enforcement can evidence, for each interaction, the model called, the policy applied and the action taken. Trussed enforces policy in the execution path and produces audit-ready evidence from those decisions, with configurable retention and self-managed deployment in the customer cloud. It does not replace your own prompt and release management. The approval history of a prompt template, the change tickets behind a model swap and the clinical sign-off on a template remain your responsibility, and the runtime record should reference them by identifier.

    Version evidence bound at execution

    Label: Request

    Description: Discharge summary draft requested with a resolved prompt template release.

    Label: Bind

    Description: Model identifier, model version and prompt version attached to the interaction.

    Label: Enforce

    Description: Policy applied and the action taken (allow, redact, block) recorded.

    Label: Record

    Description: One tamper-resistant record written with a pointer to the output.

    Label: Reconcile

    Description: Record counts compared with document counts to find gaps.

    See what per-interaction evidence looks like

    Walk through how policy enforced in the execution path produces audit-ready evidence for each AI interaction, and how retention and deployment can be configured in your own cloud.

    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.