Fine-tuning and structured prompting strategies for question answering over full-text biomedical research articles
OBJECTIVES: The ability of large language models (LLMs) to answer targeted scientific questions by synthesizing information from research articles remains an open research challenge. METHODS: We evaluated the effects of fine-tuning and a question-specific prompting strategy to answer 16 pre-defined questions about HIV drug resistance studies, including whether viral genetic sequences were reported and the demographics and antiviral treatments of the individuals from whom sequences were obtained. For fine-tuning, we constructed an instruction set comprising 250 HIV drug resistance studies, with 16 questions per study and corresponding answers and explanations. For question-specific prompting, we developed a set of if-then rules tailored to each question. We compared the performance of three base models - GPT-4o-mini-2024-07-18 (GPT-4o), Meta Llama-3.1-70B-Instruct (Llama-3.1-70B), and Meta Llama-3.1-8B-Instruct (Llama-3.1-8B) - with their performance using fine-tuning, question specific prompting, and fine-tuning followed by question-specific prompting. Performance was assessed using accuracy, precision, recall, and F1 score, averaged over 150 held-out studies not used for fine-tuning. Comparisons were performed using Wilcoxon signed-rank tests. RESULTS: Fine-tuning increased precision by 5% for GPT-4o, 16% for Llama-3.1-70B, and 8% for Llama-3.1-8B, although this increase reached statistical significance only for Llama-3.1-70B. Fine-tuning also significantly increased recall for GPT-4o by 11%. Question specific prompting increased recall for all three models (6% for GPT-4o, 7% for Llama-3.1-70B, and 18% for Llama-3.1-8B), with statistically significant improvements observed only for Llama-3.1-8B. Applying question specific prompting to each of the fine-tuned models did not yield additional improvements beyond fine-tuning alone. When pooled across the three models, fine-tuning was associated with a greater effect on precision than recall (OR = 4.35; p = 0.001; Fisher's exact test), whereas question-specific prompting led to a greater effect on recall than on precision (OR= 7.09; p = 0.0001; Fisher's exact test). CONCLUSIONS: In this domain-focused proof-of-concept study, fine-tuning and question-specific prompting each led to improvement in one or more metrics for each of the three models. Pooled analyses indicated that fine-tuning improved precision, whereas question specific prompting preferentially improved recall.
Authors
- Vineet Ahluwalia
- Kaiming Tao (ORCID: https://orcid.org/0000-0001-8731-1271)
- Jie Zhou (ORCID: https://orcid.org/0000-0003-3208-9073)
- Zachary A. Osman
- Robert W. Shafer (ORCID: https://orcid.org/0000-0003-2513-2643)
- Rohit Satija (ORCID: https://orcid.org/0000-0003-1776-8860)
- Chiara Sabatti
Institutions
- Stanford Medicine (US)
- Stanford University (US)
Publication Details
- Journal
- PLoS ONE
- Published
- 2026-06-24
- DOI
- https://doi.org/10.1371/journal.pone.0351631
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Foundation for the National Institutes of Health