Few-shot Generation of Medical Incident Causal Factors and Preventive Measures Using Category-based Example Selection
In high-stakes domains such as healthcare, the reliability of Large Language Models (LLMs) is critical, particularlywhen generating clinical insights from incident reports. This study proposes a category-based few-shot exampleselection method for prompting LLMs to generate background/causal factors and preventive measures from detailsof the medical incidents. For our experiments, we use the Japanese Medical Incident Dataset (JMID), a structureddataset of 3,884 real-world medical accident and near-miss reports. These reports are variably annotated with a widerange of tags―some include descriptive information (e.g.,“ medications, ”“ blood transfusion therapy ”). We alsomake this dataset publicly available to support future research. We compare a zero-shot baseline and three few-shotexample selection strategies―random sampling, cosine similarity-based selection, and our proposed category-basedmethod―using GPT-4o and Llama 3.3. Results show that the category-based approach achieves the highest precisionand most stable generation behavior, while similarity-based selection often leads to unintended outputs and safety filteractivation. These findings suggest that selecting examples based on human-interpretable dataset tags can improvegeneration precision and stability in clinical LLM applications.
Authors
- Hiroki Sakaji (ORCID: https://orcid.org/0000-0001-5030-625X)
- Tomoki Ito (ORCID: https://orcid.org/0000-0003-4200-1311)
- Itsuki Noda
- Yuna Haseyama
Institutions
- Hokkaido University (JP)
- National Institute of Information and Communications Technology (JP)
Publication Details
- Journal
- Transactions of the Japanese Society for Artificial Intelligence
- Published
- 2026-07-01
- DOI
- https://doi.org/10.1527/tjsai.41-4_an40-e
- Primary Topic
- Risk and Safety Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00