Sub topic 3
Limitations, risks, and ethical considerations
This chapter assumes you know train, validation, and test splits, common metrics such as accuracy and recall, basic Python, Markdown, and Git.
Stating limitations and risks
A limitation is a condition where the model performs poorly or should not be used. A risk is a harm that could follow from error or misuse. State both with evidence. "May be biased" tells a reader nothing. "Accuracy falls to 0.62 on tickets under five words" tells them what to check.
Model cards alongside datasheets and system documentation
A datasheet documents a dataset: how it was collected, what it contains, and who is represented. A model card documents one trained model. A system card documents the whole product, including filters, prompts, and human review around the model. Link these documents to each other instead of copying text between them.
Machine-readable metadata in model cards
Place key fields in YAML front matter at the top of README.md so tools can read them without parsing prose.
---
license: apache-2.0
language:
- en
datasets:
- my-org/support-tickets
metrics:
- accuracy
- f1
---Generating and validating cards in a pipeline
Generate the card from the training run, then check it in continuous integration (CI). This script fails the job when a required section is missing.
import re
import sys
REQUIRED = ["Intended use", "Limitations", "Training data", "Evaluation"]
with open("README.md", encoding="utf-8") as f:
text = f.read()
headings = {
m.group(1).strip().lower()
for m in re.finditer(r"^#{1,6}\s+(.+)$", text, re.MULTILINE)
}
missing = [s for s in REQUIRED if s.lower() not in headings]
if missing:
sys.exit(f"Model card is missing sections: {missing}")
print("Model card check passed.")Keeping cards current: versioning, review, and governance
Bump the card version with every model version. Record who owns each section and what triggers a review.
| Section | Owner | Review trigger |
|---|---|---|
| Intended use | Product lead | Change in user population or queues |
| Limitations | Model owner | New evaluation results |
| Training data | Data engineer | New data source or date range |
Keep the card in Git so every change has an author, a date, and a reason.
Exercise
A model's accuracy drops on a new customer segment, but the card's Limitations section is unchanged. What should happen before the next release?
Show answer
The model owner should add the segment's disaggregated results and the accuracy drop to Limitations, bump the card version, and get reviewer approval. The CI check cannot catch this, so the review step must.