Skip to main content
Dryad

A novel method for analyzing output variations from large language model caused by different input option orders and improving applications of large language models in medicine

Data files

Jul 20, 2026 version files 44.56 MB

Click names to download individual files

Abstract

Background. Prompts with multiple answer options are widely used in large language models (LLMs) for answering multiple-choice questions (MCQs) and text classification, which are common tasks in medical research and applications. However, the related outputs vary with different option orders. This reduces LLMs' reliability in practice. Furthermore, the task of abstention has been a current focus. It refers to identifying questions that an LLM should abstain from answering, and this task is critical to prevent misleading outputs. Methods and Materials. In this study, we developed a novel method based on Gaussian mixture models (GMMs) to analyze the outputs of an LLM corresponding to different option orders. Utilizing GMM-based conditional probabilities, the tasks of classification, MCQ, and abstention could be performed by our method. This method is unsupervised (no true/correct answers are required). To evaluate our method, three LLMs (Llama-2, Llama-3 and GLM-4), three medicine datasets (classification dataset MedNLI and MCQ datasets MedQA and MedMCQA), and ten general datasets (seven classification datasets, three MCQ datasets) were considered. Furthermore, three existing methods for classification and MCQ tasks, and two methods for abstention tasks were included for performance comparison. Results. For three medicine datasets, our method consistently outperformed the existing methods on classification and abstention tasks; on the MCQ task, our method yielded results comparable to other methods. For ten general area datasets, similar results were observed. Conclusion. Our novel method is useful for classification, MCQ, and abstention tasks. It can improve the utilization of LLMs in medical research and applications.