- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| ablation_reproducibility_data.csv | ||
| ablation_reproducibility_report.md | ||
| aggregate_v2.py | ||
| build_manuscript.py | ||
| dataset_characteristics.csv | ||
| dataset_characteristics_summary.md | ||
| extract_demographics.py | ||
| fig1_per_case_reproducibility.png | ||
| fig2_per_domain_reproducibility.png | ||
| fig3_per_code_stability.png | ||
| fig4_reproducibility_distribution.png | ||
| fig5_histology.png | ||
| fig6_location.png | ||
| fig7_grade_age_sex.png | ||
| fig8_dataset_overview.png | ||
| fig_overview.png | ||
| Figure1_pipeline_overview.png | ||
| Figure2_histology.png | ||
| Figure3_anatomical_site.png | ||
| Figure4_per_case_reproducibility.png | ||
| Figure5_per_domain.png | ||
| Figure6_per_code_stability.png | ||
| Figure7_distribution.png | ||
| Figure8_ablation.png | ||
| LICENSE | ||
| make_dataset_plots.py | ||
| make_overview_figure.py | ||
| make_plots.py | ||
| make_tables.py | ||
| MANIFEST.txt | ||
| prepare_supplementary.py | ||
| README.md | ||
| README.md.bak | ||
| reproducibility_data_20260503_112951.csv | ||
| reproducibility_data_20260907_150836.csv | ||
| reproducibility_report_20260503_112951.md | ||
| reproducibility_report_20260907_150836.md | ||
| run_case_v2.py | ||
| S1_system_prompt_v4.txt | ||
| S2_schema_v4.py | ||
| S3_aggregation.py | ||
| S4_per_case_reproducibility.csv | ||
| S4_per_case_reproducibility_README.txt | ||
| S5_system_prompt_ablation.txt | ||
| S6_ablation_per_case_reproducibility.csv | ||
| S7_dataset_grade_age_sex.png | ||
| S8_dataset_overview.png | ||
| schema.py | ||
| system_prompt_ablation.txt | ||
| system_prompt_v4.txt | ||
Schema-enforced LLM framework for sarcoma tumor board simulation
This repository contains the code, system prompt, schema definitions, and aggregated reproducibility results accompanying the manuscript:
Schema-enforced large language model framework for sarcoma tumor board simulation: a methodology development and reproducibility pilot study
Ammo T*, Englich M*, Dos Santos Adrego F, Jacobi M, Wilckens A, Kruppa P, Bonaventura B, Niemuth S, Weiler SM, Wachenfeld-Teschner V, Boos AM, Freund G. Scientific Reports, 2026 (under review).
*Both authors contributed equally.
What this repository contains
This is the complete methodological code and aggregated data accompanying the manuscript. It enables reviewers and readers to verify the system prompt and schema definitions used in all 154 LLM runs, reproduce the reproducibility analysis from the aggregated per-case data, and adapt the methodology for other clinical decision-support contexts.
The repository is released under the MIT License for code and Creative Commons Attribution 4.0 (CC-BY-4.0) for aggregated data.
Repository structure
- README.md — This file
- LICENSE — MIT License
- schema.py — Pydantic schema (21 decision codes, 6 clinical domains)
- system_prompt_v4.txt — Full system prompt (final version, schema v4)
- system_prompt_ablation.txt — Reduced system prompt used for the ablation condition
- run_case_v2.py — Per-case LLM runner (tool-use API)
- aggregate_v2.py — Reproducibility analysis script
- extract_demographics.py — Dataset characterization
- make_plots.py — Reproducibility figures
- make_dataset_plots.py — Dataset characteristic figures
- make_overview_figure.py — Overview pipeline diagram
- make_tables.py — Manuscript tables
- prepare_supplementary.py — Supplementary material bundling
- build_manuscript.py — Manuscript assembly script
- aggregated_results/ — Per-case reproducibility CSVs and reports for the main analysis (reproducibility_data_20260907_150836.csv) and the ablation condition (ablation_reproducibility_data.csv)
- figures/ — All figures at 300 DPI
- figures/manuscript_figures/ — Figures 1 to 8 named according to the manuscript numbering
- supplementary/ — Supplementary files S1 to S8 with MANIFEST
What is NOT included (and why)
Individual case texts: Anonymized clinical case texts remain at the institution due to data-protection requirements under the EU GDPR and institutional governance.
Individual LLM output JSONs: Withheld to prevent unintended reconstruction of case-level clinical content.
API keys: Never committed for security reasons.
For requests beyond the aggregated data, please contact the corresponding author. Such requests are subject to institutional data-sharing review and a data-use agreement.
Software environment
- Python 3.13
- Anthropic SDK 0.97.0
- Pydantic 2.13.3
- matplotlib (latest)
- python-docx (latest, for figure and table generation)
Install dependencies:
pip install anthropic pydantic matplotlib python-docx
LLM platform
- Model: Anthropic Claude Opus 4.5
- API model string: claude-opus-4-5
- Temperature: 0.0 (deterministic sampling preference)
- Maximum tokens: 4000
- Structured output: Anthropic tool-use API
- Schema version: v4 (final)
Reproducibility verification
The exact system prompt used for all 154 LLM runs is in system_prompt_v4.txt. Its SHA-256 hash is logged in each run output for verification.
To compute the hash on your local copy:
shasum -a 256 system_prompt_v4.txt | cut -c1-12
The hash should match the value recorded in the run metadata logged by run_case_v2.py.
Citation
If you use this code or methodology, please cite:
Ammo T, et al. Schema-enforced large language model framework for sarcoma tumor board simulation: a methodology development and reproducibility pilot study. Scientific Reports. 2026.
For Zenodo DOI citation (preferred for software versioning):
Ammo T, et al. (2026). sarcoma-tumorboard-llm: Schema-enforced LLM framework for sarcoma tumor board simulation (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.XXXXXXX
Ethics statement
This retrospective methodological pilot study used fully de-identified case texts. The Ethics Committee of the University of Luebeck, University Hospital Schleswig-Holstein (UKSH), Campus Luebeck (Aktenzeichen 2025-520) provided a written statement that formal ethics approval was not required and waived the requirement for informed consent, given the retrospective design and the fully de-identified nature of the data. No patient was treated or contacted as part of this study.
Funding
The authors declare that no external funding was received for the research, authorship, or publication of this work.
Contact
For questions or data access requests beyond the aggregated data provided here:
Corresponding author: Tekoshin Ammo
Email: tekoshin.ammo@uksh.de
Institution: Department of Plastic, Reconstructive and Aesthetic Surgery - Hand Surgery and Burn Center, University Hospital Schleswig-Holstein, Campus Luebeck, Germany
License
Code: MIT License (see LICENSE)
Aggregated data files in aggregated_results/: Creative Commons Attribution 4.0 International (CC-BY-4.0)