AWS-114 · Lesson 5 of 12 · 18 min

Model cards and documentation

▶ Video coming soon A video version of this lesson is on the way.

Hannah Weiss had a simple test for any system that touched client data. She would imagine that, a year from now, a client complained, a journalist called, or an auditor arrived, and that the person who built the system had left. Could someone else answer the questions: what is this, what data does it use, how well does it work, who approved it, and what are its limits? For the no-show model, the honest answer in November was "partly, if Noor is in the room".

"Then we write it down," Noor said, and opened a template. This lesson covers the documentation that makes AI systems understandable and accountable: model cards, data documentation, AI Service Cards and provider documentation, and the registry that keeps track of model versions. The exam guide names Amazon SageMaker Model Cards as a tool for transparency and for documenting data origins, and expects you to know why documentation matters.

Why documentation matters

Documentation turns knowledge in one person's head into a shared record. For responsible AI it does several jobs at once.

  • Transparency. People who use or are affected by a model can learn what it is for and how well it works.
  • Accountability. The record shows who decided what, when and why, including the trade-offs from lessons 2 and 3.
  • Safe reuse. A model built for one purpose is often tempting to reuse for another. Documented intended uses and limits make it clear when that would be inappropriate.
  • Audit and compliance. Regulators, auditors and insurers increasingly ask for evidence of how AI systems were built and tested. A model card answers many of their questions in one place.
  • Continuity. When people change roles, the next owner can maintain the model without guessing.

Lorraine added a practical point: the cyber insurance renewal questionnaire that Hannah had filled in during the autumn had included two new questions about AI use. A complete model card would make next year's answers easy.

What a model card is

A model card is a short, structured document that describes a machine learning model: what it does, how it was built, how well it performs, and how it should and should not be used. The idea was proposed by researchers in 2019 as a standard way to report models, much as a nutrition label reports food. It is now widely used across the industry.

Diagram listing seven model card sections with descriptions: overview, owner, version, status, risk rating; intended uses, who uses it, for what, and what it must not be used for; training data, sources, dates, consent basis, known gaps; evaluation, metrics overall and for each subgroup; limitations, where it performs poorly and known failure cases; human oversight, who reviews outputs and how to override; approvals, who signed off and the next review date.
The sections Noor's team used in each model card.

Noor's card for the no-show model had seven sections. The overview gave the name, version, owner (Andre), builder (Noor), status and the risk tier from the governance screen. Intended uses said the score suggests which bookings might benefit from an extra reminder or a waitlist offer, and stated plainly that it must not be used to refuse a booking, charge a deposit or judge a client. Training data listed the sources, the date range, the labelling fix and the known gap for the newer rural clinics. Evaluation gave the overall results and the results for each clinic group, with the fairness measures. Limitations described where the model performs worst, such as new clients with no history. Human oversight described who sees the score and how staff override it. Approvals recorded the governance group's sign-off and the next quarterly review date.

Amazon SageMaker Model Cards

Amazon SageMaker Model Cards is a feature of SageMaker AI for creating and storing model cards in a consistent format alongside the model itself. A card can record the model's intended uses, risk rating, training details, evaluation results and additional information, and SageMaker can fill in some training details automatically from the training job. Cards can be exported as PDF documents to share with people who do not use AWS, and they have their own version history, so changes are tracked.

Model cards work with the SageMaker Model Registry, which keeps a catalog of model versions with their approval status, such as pending, approved or rejected. Noor's process linked the two: a model version could only be marked approved in the registry once its card was complete and signed off. That way, the card was not paperwork done after the fact, but a gate on the way to production.

Creating a draft model card from a prepared JSON document. Names are illustrative.
aws sagemaker create-model-card \
    --model-card-name crvp-no-show-v3 \
    --model-card-status Draft \
    --content file://no-show-v3-card.json
Python Example
# A completeness check Noor runs before a card can move to approval.
card = {
    "intended_uses": "Suggest bookings that may benefit from an extra reminder.",
    "out_of_scope_uses": "Refusing bookings, deposits, judging clients.",
    "training_data": "BookVet and VetLedger bookings, Oct 2023 to Sep 2026.",
    "evaluation_overall": "recall 0.62, precision 0.41",
    "evaluation_by_group": "",
    "limitations": "Weak for new clients with no booking history.",
    "human_oversight": "Staff may ignore or override any score.",
    "risk_rating": "low",
}
missing = [k for k, v in card.items() if not v.strip()]
print("ready for approval" if not missing else "missing: " + ", ".join(missing))
Output
missing: evaluation_by_group

What this code does

It checks a model card before approval by looking for any section left blank. Here the results broken down by group are empty, so it reports that section as missing and the card can't move forward yet.

The check caught exactly what it was designed to catch: the results by group had not yet been pasted in. A card without subgroup results would hide the very gap lesson 2 had found.

Documenting data origins

The exam guide connects documentation with source citation and documenting data origins, using the terms data lineage and data cataloging. A model is only as trustworthy as its data, so the documentation must trace where the data came from.

  • Data lineage records how data moved and changed: which source tables a dataset came from, which transformations were applied, and which model versions were trained on which dataset version. Lesson 11 covers lineage tools in detail.
  • Data cataloging records what datasets exist, what they contain, who owns them and how they may be used. The AWS Glue Data Catalog stores technical information about datasets, such as their schemas and locations, and other services build business catalogs on top of it.
  • Source citation in generative AI means recording where content came from: which documents a knowledge base was built from, and, at run time, which passages an answer used. The call-note summarizer's links back to the transcript are a form of source citation.

Noor also recorded the legal basis for using each source. The booking data was used for running clinic services, which clients had been told about when they registered. Hannah confirmed that predicting no-shows to send an extra reminder fit that purpose. A different use, such as marketing, would have needed a fresh look.

Documentation from AWS and model providers

Cascade Ridge did not build every model it used. For the summarizer, it would use a foundation model through Amazon Bedrock. In that case the documentation comes partly from others.

  • AWS AI Service Cards describe some of AWS's own AI services, such as Amazon Transcribe and Amazon Rekognition, including their intended uses, limitations, design choices and best practices for responsible use. Noor read the Transcribe card before planning to use it on call recordings.
  • Model provider documentation describes a foundation model's training approach, capabilities, known limitations and license terms. Each model available in Amazon Bedrock comes with documentation and an end-user license agreement from its provider.
  • Licenses state what you may do with a model and its outputs. Open source models come with licenses that vary widely in what they allow, including commercial use.

Cascade Ridge's own documentation then adds what only Cascade Ridge knows: why it chose this model, what prompts and guardrails it applies, how it evaluated the model on its own call transcripts, and how outputs are reviewed. The provider's card and the customer's card together form the full picture, which mirrors the shared responsibility model from lesson 1.

A card for a generative AI system

The no-show model is a classic machine learning model, and the classic card fits it well. The call-note summarizer is different: Cascade Ridge does not train the underlying foundation model, and its behaviour depends heavily on the instructions, the retrieved context and the guardrail wrapped around it. Noor adapted the card for this kind of system, and her changes are a useful pattern.

First, the card identifies the foundation model and version used, and links to the provider's documentation and license. If the provider releases a new version, switching to it is treated as a change that needs testing, not a silent upgrade. Second, the card records the system prompt and its version, because changing a few words of instruction can change the output as much as changing the model. Third, it records the guardrail version applied. Fourth, the evaluation section describes how the summaries were tested on Cascade Ridge's own material: 300 past call transcripts, with consent and with client details removed, each summary scored by two emergency veterinarians for accuracy, missing information and invented information. Fifth, the limitations section lists what the testing found, such as weaker summaries when two people speak at once on the call.

Together these items describe the whole system, not just the model. Jonah wrote in his notes that for generative AI the card documents the model, the prompt, the guardrail and the data that ground it, because all four shape the result.

Documentation and the law

Documentation is increasingly expected by law and by contracts, not only by good practice. Canadian privacy law requires organizations to be accountable for the personal information they control and to be able to explain their practices; a record of what data a model uses and why is the simplest way to meet that duty. Customers and partners also ask. A large corporate client of the emergency hospital, which sends its security dogs there, had begun asking suppliers whether they used AI on its data. With a model card and a data catalog entry, Hannah could answer in a day instead of a month.

Keeping documentation alive

A model card written once and never updated becomes misleading. Noor set three rules. Every new model version gets an updated card before approval. Every quarterly review updates the evaluation section with production results. And any incident, such as a complaint or an error that reached a client, is added to the limitations section with what was done about it.

Jonah asked how long the card should be. Noor's answer was a page or two for most models, written for a reader who is intelligent but not a data scientist. Long technical appendices can be attached, but the card itself must be readable by Dr. Kaur, Lorraine or an auditor in ten minutes.

Documents in a responsible AI record, and who produces them.
DocumentMain audienceProduced by
Model cardOwners, users, governance group, auditorsThe team that builds or adopts the model
Data documentation and catalog entriesData engineers, privacy lead, auditorsData owners
AWS AI Service CardCustomers of an AWS AI serviceAWS
Model provider documentation and licenseCustomers of a foundation modelThe model provider
Evaluation reportsBuilders and the governance groupBuilders, often with Clarify or Bedrock evaluations
Decision logGovernance group and auditorsThe governance group

Common mistakes

  • MistakeWriting documentation only after a model is in production.

    InsteadMake a complete model card a condition of approval in the model registry.

  • MistakeLeaving out results for subgroups because the overall numbers look good.

    InsteadInclude evaluation results for each group that matters, along with the fairness measures.

  • MistakeAssuming the foundation model provider's documentation is enough.

    InsteadAdd your own card describing your use, prompts, guardrails, evaluation and oversight.

  • MistakeWriting model cards only for data scientists.

    InsteadWrite the card for an intelligent non-specialist; attach technical detail separately.

Worked problem

Spot the reuse risk

Six months after launch, a manager suggests using the no-show score to decide which clients must pay a deposit for surgery. What in the model card should stop this, and what would have to happen before such a use?

Show solution
  1. The intended uses section limits the score to suggesting extra reminders and waitlist offers.
  2. The out-of-scope uses section explicitly lists deposits and judging clients.
  3. A deposit is a burden with financial impact, so the use would need a new risk assessment, new fairness evaluation focused on false positives, and approval.

Answer: The card's intended and out-of-scope uses rule it out. A new use would need a new review, evaluation and approval, and probably a separate model.

Summary and key terms

  • Documentation makes AI systems transparent, accountable, safe to maintain and ready for audit.
  • A model card records a model's overview, intended and out-of-scope uses, training data, evaluation overall and by group, limitations, human oversight and approvals.
  • Amazon SageMaker Model Cards stores cards with version history and can export them, and works with the SageMaker Model Registry so approval can depend on a complete card.
  • Documenting data origins uses data lineage, data cataloging such as the AWS Glue Data Catalog, and source citation.
  • AWS AI Service Cards and model provider documentation cover the provider's side; the customer documents its own use.
Model card
A short structured document describing a model's purpose, data, performance, limits and approvals.
SageMaker Model Cards
A SageMaker AI feature for creating, versioning and exporting model cards.
Model Registry
A SageMaker AI catalog of model versions and their approval status.
Data lineage
A record of where data came from and how it was transformed and used.
AI Service Card
AWS documentation describing an AWS AI service's intended uses and limits.
Out-of-scope use
A use the model card explicitly says the model must not be used for.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Name four sections of a model card.

    Show answer

    For example intended uses, training data, evaluation and limitations.

  2. How can the Model Registry enforce documentation?

    Show answer

    By allowing a version to be approved only when its model card is complete and signed off.

  3. Who writes an AWS AI Service Card?

    Show answer

    AWS.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz