authoring-model-cards
它能做什么
这项技能撰写模型卡,即描述临床 AI 模型的用途、性能表现和失效场景的说明文件。适合发布或管理临床模型、需要诚实文档的团队。
适用场景
- ✓当你要发布或更新临床 NER 或去标识化模型,需要它的模型卡的时候。
- ✓当你手上有评估结果,需要把它们整理为预期用途、指标和局限性的时候。
- ✓当临床 AI 治理或模型风险审查要求提供透明度文档的时候。
技能链接
https://github.com/maziyarpanahi/openmed/blob/master/skills/authoring-model-cards/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请使用我们上周的评估结果,为临床去标识化模型撰写一份模型卡。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取评估输出,把每项结果对应到模型卡的相应章节,并根据这些结果撰写预期用途、超出范围的用途和局限性。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Authoring Model Cards
A model card is the honest spec sheet for a model: what it's for, how well it works, where it breaks, and who it might fail. For clinical models this is governance-critical — an undocumented de-id model is one nobody can sign off on. This skill fills a model card directly from OpenMed eval outputs so the numbers are reproducible, not aspirational.
When to use this skill
- You're publishing or updating an OpenMed model and need its card.
- You have eval artifacts (
GateReport,fairness_report,error_report) and need to turn them into intended-use, metrics, and limitations sections. - A clinical AI governance / model-risk review needs a transparency document.
Run the evals first (see evaluating-with-leakage-gates,
benchmarking-clinical-ner, auditing-subgroup-fairness); this skill documents
their results — it does not generate the numbers.
Card sections (Mitchell et al., + clinical extensions)
See references/model-card-sections.md for the full section-to-source map. The
load-bearing sections for an OpenMed model:
- Model details — repo id, family, tier, format, params, milestone, license
(Apache-2.0). Pull from the
GateReportidentity fields. - Intended use — the clinical task and the deployment envelope.
- Out-of-scope / misuse — explicitly: not a medical device; not for autonomous clinical decisions; de-id is verified, not assumed.
- Metrics — entity-level P/R/F1 and, for de-id, residual leakage + per-label recall floors and the gate decision.
- Quantitative analysis (subgroups) — per-group leakage/recall from
fairness_report, including which groups lack data. - Limitations — error patterns from
error_report; calibration assumptions. - Caveats & disclaimer — the medical-device disclaimer.
Quick start — fill the card from eval outputs
from openmed.eval import (
run_suite, ReleaseGate, fairness_report, error_report,
)
report = run_suite("eval/gold/test.json", suite="golden",
model_name="OpenMed/Privacy-PII-Detection", device="cpu",
metadata={"family": "PII", "tier": "base",
"policy": "hipaa_safe_harbor"})
gate = ReleaseGate(milestone="v1.6", policy="hipaa_safe_harbor").evaluate(report)
fair = fairness_report("OpenMed/Privacy-PII-Detection", "golden")
errs = error_report("OpenMed/Privacy-PII-Detection", "eval/gold/test.json")
card = {
"model_details": {
"repo_id": gate.repo_id, "family": gate.family, "tier": gate.tier,
"format": gate.format, "license": "Apache-2.0",
},
"metrics": {
"exact_span_f1": report.metrics["exact_span_f1"]["f1"],
"residual_leakage_rate": gate.residual_leakage_rate,
"critical_leakage_count": gate.critical_leakage_count,
"per_label_recall": dict(gate.per_label_recall),
"release_decision": gate.decision, # RELEASABLE / QUARANTINED
},
"subgroup_analysis": fair.to_dict(), # per-group leakage/recall
"limitations": errs.to_dict()["confusion_matrix"],
}
# Render `card` into Markdown front matter + body (or the HF card template).
error_report and fairness_report carry no plaintext PHI (offsets + hashes),
so their output is safe to paste into a public card.
Workflow
- Gather artifacts. Gate report, fairness report, error report — all from a pinned model + synthetic eval set.
- Fill model details from the
GateReportidentity fields so the card,models.jsonl, and the README cannot drift (the gate'smanifest_coherenceandmodel_cardchecks enforce this). - Write intended use narrowly. Name the clinical task, language(s), and the deployment envelope. Over-broad intended-use is the most common card failure.
- State out-of-scope and the disclaimer plainly (see template below).
- Report metrics with their floors. For de-id, lead with leakage and the gate decision, not F1.
- Report subgroups honestly, including the documentation gap: if race/ ethnicity isn't available, say so rather than implying parity.
- List limitations from real errors, not boilerplate — cite the confusion matrix's worst cells.
Disclaimer block (paste & adapt)
This model assists clinical text processing and is not a medical device. It does not make autonomous clinical decisions. De-identification output must be independently verified before any data is shared; residu
常见问题
它会运行测试来获取数字吗?
不会。它只记录你已经运行过的评估结果。
模型卡包含医疗器械免责声明吗?
包含。其中声明该模型不用于自主的临床决策。
它包含哪些章节?
它涵盖模型详情、预期用途、超出范围的用途、分群体表现和局限性等内容。
详情
作者的原始描述
Generate a model card for an OpenMed clinical NER or de-identification model documenting intended use, quantitative metrics, subgroup performance, limitations, and a medical-device disclaimer for clinical AI governance. Use when the user wants to write or update a model card, a README model section, or governance documentation, or to turn OpenMed eval outputs (release gate report, fairness_report, error_report) into the card's metrics and limitations sections. Trigger on \"model card\", \"intended use\", \"model documentation\", \"governance\", \"limitations section\", \"datasheet\", or \"FDA/
repo: maziyarpanahi/openmed
热度
- GitHub 星标
- 5.8k
- 排名
- #14673
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
annotating-variants
5.8k帮你的智能体预测基因变异的作用,把 HGVS 名称转换为基因组位置,并使用免费的公共注释工具添加人群频率。
ask-openmed
5.8k帮你的智能体为临床文本请求选择合适的 OpenMed 工作流程,并在可能涉及患者数据时,先进行隐私检查。
assembling-fhir-bundles
5.8k把多份 FHIR 健康记录打包成一个事务 Bundle,可直接发送给 EHR 系统,并正确链接其中的内部引用。
auditing-deid-leakage
5.8k扫描已去标识化的临床文本,查找残留的标识符,例如社会安全号、银行卡号、电子邮件地址和日期,若仍有残留则阻止发布。