Code repository: Expert-Guided Prompting and Retrieval-Augmented Generation for EMS Question Answering, AAAI 2026
🌐 Project · 📄 Paper · 🤗 Dataset

Download from Huggingface EMS-MCQA
Download from Huggingface EMS-Knowledge. We also upload the embedding encoded by MedCPT to link, where you can download and directly load using FAISS.
Apply at NEMSIS to request the patient records, and use our scripts to process the data. Or you can download the embedding encoded by MedCPT from link, and directly load using FAISS.

To guide the LLM reasoning and RAG retrieval based on question-specific expertise, we train a lightweight LLM-based filter to predict the key expertise attributes, including question’s subject area and certification level.
Expert-CoT prompting guides the model’s reasoning by explicitly providing the subject area and certification level as starting point for the thought process.
The filter’s predicted subject area guides the retriever to search for relevant knowledge base entries and patient records tailored to the question’s subject area. The LLM then conditions on the predicted expertise and the retrieved documents to generate the final answer.
Global: Retrieve the top M and N evidence documents from the entire KB and PR, respectively. This is a baseline.
Filter then Retrieve (FTR): First filter the whole KB and PR to retain only documents matching the predicted subject area, then retrieve the top M and N documents from these filtered subsets
Retrieve then Filter (RTF): First retrieve a larger candidate set from the whole KB and PR (e.g., 10 × Mfrom KB and 10 × N from PR), then filter out documents whose subject area do not match ˆsi, retaining the top M and N relevant documents
Go benchmark folder
cd code/benchmark
We used Qwen/Qwen3-32B in our experiment to run our code,
python benchmark_LLM.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer
--prompt=cot_attr
--enable_think=True
Go EMSRAG folder
cd code/EMSRAG
We used Qwen/Qwen3-32B in the experiment to run our code,
Expert-RAG-GT:
python ems_rag.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer \
--prompt=cot_attr \
--use_kb=True \
--kb_k=32 \
--use_pr=True \
--pr_k=8 \
--filter_mode=retrieve_then_filter \
--use_adapter=False \
--enable_think=True
Retrieval mode: Filter then Retrieve (FTR)
python ems_rag.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer \
--prompt=cot_attr \
--use_kb=True \
--kb_k=32 \
--use_pr=True \
--pr_k=8 \
--filter_mode=filter_then_retrieve \
--use_adapter=False \
--enable_think=True
Expert-RAG-Filter:
Retrieval mode: Retrieve then Filter (RTF)
python ems_rag.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer \
--prompt=cot_attr \
--use_kb=True \
--kb_k=32 \
--use_pr=True \
--pr_k=8 \
--filter_mode=retrieve_then_filter \
--use_adapter=True \
--enable_think=True
Retrieval mode: Filter then Retrieve (FTR)
python ems_rag.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer \
--prompt=cot_attr \
--use_kb=True \
--kb_k=32 \
--use_pr=True \
--pr_k=8 \
--filter_mode=filter_then_retrieve \
--use_adapter=True \
--enable_think=True
If you use this dataset in your work, please consider citing our paper:
@misc{ge2025expertguidedpromptingretrievalaugmentedgeneration,
title={Expert-Guided Prompting and Retrieval-Augmented Generation for Emergency Medical Service Question Answering},
author={Xueren Ge and Sahil Murtaza and Anthony Cortez and Homa Alemzadeh},
year={2025},
eprint={2511.10900},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2511.10900},
}
Python
100.0%
Code repository: Expert-Guided Prompting and Retrieval-Augmented Generation for EMS Question Answering, AAAI 2026
🌐 Project · 📄 Paper · 🤗 Dataset

Download from Huggingface EMS-MCQA
Download from Huggingface EMS-Knowledge. We also upload the embedding encoded by MedCPT to link, where you can download and directly load using FAISS.
Apply at NEMSIS to request the patient records, and use our scripts to process the data. Or you can download the embedding encoded by MedCPT from link, and directly load using FAISS.

To guide the LLM reasoning and RAG retrieval based on question-specific expertise, we train a lightweight LLM-based filter to predict the key expertise attributes, including question’s subject area and certification level.
Expert-CoT prompting guides the model’s reasoning by explicitly providing the subject area and certification level as starting point for the thought process.
The filter’s predicted subject area guides the retriever to search for relevant knowledge base entries and patient records tailored to the question’s subject area. The LLM then conditions on the predicted expertise and the retrieved documents to generate the final answer.
Global: Retrieve the top M and N evidence documents from the entire KB and PR, respectively. This is a baseline.
Filter then Retrieve (FTR): First filter the whole KB and PR to retain only documents matching the predicted subject area, then retrieve the top M and N documents from these filtered subsets
Retrieve then Filter (RTF): First retrieve a larger candidate set from the whole KB and PR (e.g., 10 × Mfrom KB and 10 × N from PR), then filter out documents whose subject area do not match ˆsi, retaining the top M and N relevant documents
Go benchmark folder
cd code/benchmark
We used Qwen/Qwen3-32B in our experiment to run our code,
python benchmark_LLM.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer
--prompt=cot_attr
--enable_think=True
Go EMSRAG folder
cd code/EMSRAG
We used Qwen/Qwen3-32B in the experiment to run our code,
Expert-RAG-GT:
python ems_rag.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer \
--prompt=cot_attr \
--use_kb=True \
--kb_k=32 \
--use_pr=True \
--pr_k=8 \
--filter_mode=retrieve_then_filter \
--use_adapter=False \
--enable_think=True
Retrieval mode: Filter then Retrieve (FTR)
python ems_rag.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer \
--prompt=cot_attr \
--use_kb=True \
--kb_k=32 \
--use_pr=True \
--pr_k=8 \
--filter_mode=filter_then_retrieve \
--use_adapter=False \
--enable_think=True
Expert-RAG-Filter:
Retrieval mode: Retrieve then Filter (RTF)
python ems_rag.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer \
--prompt=cot_attr \
--use_kb=True \
--kb_k=32 \
--use_pr=True \
--pr_k=8 \
--filter_mode=retrieve_then_filter \
--use_adapter=True \
--enable_think=True
Retrieval mode: Filter then Retrieve (FTR)
python ems_rag.py
--model_name_or_path=Qwen/Qwen3-32B \
--mode=infer \
--prompt=cot_attr \
--use_kb=True \
--kb_k=32 \
--use_pr=True \
--pr_k=8 \
--filter_mode=filter_then_retrieve \
--use_adapter=True \
--enable_think=True
If you use this dataset in your work, please consider citing our paper:
@misc{ge2025expertguidedpromptingretrievalaugmentedgeneration,
title={Expert-Guided Prompting and Retrieval-Augmented Generation for Emergency Medical Service Question Answering},
author={Xueren Ge and Sahil Murtaza and Anthony Cortez and Homa Alemzadeh},
year={2025},
eprint={2511.10900},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2511.10900},
}
Python
100.0%