Skip to content

Modeling hierarchical response accuracy of large language models using a Bayesian generalized linear mixed model

Sep 2026 · Scientific Reports
Artificial Intelligence in Healthcare and Education

Abstract

Large Language Models (LLMs) demonstrate strong performance in Natural Language Processing. In neuroanatomy, their response accuracy across hierarchical data structures (responses nested within questions) has not yet been investigated. Evaluating how these models perform under varying cognitive demands is important for their effective integration into medical education. A total of 183 neuroanatomy questions from the Turkish Medical Specialization Examination (2013–2021) were reviewed, and 176 single correct answer questions were obtained by excluding seven figure-based questions. Each question was reformulated into prompts representing three role-based prompt levels: medical student, recently graduated physician, and doctoral-level specialist. Responses from the three LLMs were scored as correct or incorrect. Data were analyzed using a Bayesian Generalized Linear Mixed Model (GLMM) with a mixture prior for the random intercept, with model type, prompt level, and their interaction as fixed effects. The distribution of the question-level intercept was highly skewed, showing a ceiling for the items answered correctly by all LLMs under all prompt levels (141 of 176 questions, 80.1%). To deal with this excess of one, a spike and slab prior was specified for the random intercept, separating a ceiling component (spike) from a variable-difficulty component (slab). Posterior estimates were obtained using Monte Carlo sampling with CmdStan in Python. ChatGPT-4o and Microsoft Copilot showed higher overall accuracy than Google Gemini, with ChatGPT-4o performing best across all prompt levels. The spike and slab model showed better out-of-sample predictive performance than the standard model specifications (ΔELPD-WAIC = 22.64). The posterior global spike probability ( \(\:\varphi\:\) =0.706, 95 % HDI [0.516, 0.826]) indicated that 141 questions (80.1 % ) were assigned to the ceiling component, while the remaining 35 questions (19.9 % ) showed true variability in item difficulty. The question level random intercept standard deviation for the slab component ( \(\:{\sigma\:}_{question}\) =2.158, 95 % HDI [1.289, 3.312]) reflected substantial between item variability in baseline easiness among non-ceiling neuroanatomical questions. The Bayesian GLMM approach implemented with a spike and slab prior distribution modeled the hierarchical structure of the data where responses were nested within questions. The ceiling effect was addressed by decomposing question level random intercepts into separate components representing the ceiling and variable difficulty providing an estimate of performance variability. It was obtained between-item variability in LLM performance among non-ceiling questions. Role-based prompt differentiation alone was insufficient to generate systematic differences in model accuracy.

View source

Similar papers

#computer vision Open access Jun 2016

Software Development in Startup Companies: The Greenfield Startup Model

The results are packaged in the Greenfield Startup Model (GSM), which explains the priority of startups to release the product as quickly as possible, and the need to shorten time-to-market, by speeding up the development through low-precision engineering activities.

Carmine Giardino, Nicolò Paternoster, M. Unterkalmsteiner et al. · 178 citations · ⚡14
#computer vision Open access Oct 2016

Software Startups - A Research Agenda

Software startup companies develop innovative, software-intensive products within limited timeframes and with few resources, searching for sustainable and scalable business models.

M. Unterkalmsteiner, P. Abrahamsson, Xiaofeng Wang et al. · 157 citations · ⚡17
#machine learning Review Open access Oct 2016

“Failures” to be celebrated: an analysis of major pivots of software startups

This study conducts a case survey study based on the secondary data of the major pivots happened in 49 software startups, and demonstrates that customer need pivot is the most common among all pivot types.

Sohaib Shahid Bajwa, Xiaofeng Wang, Anh Nguyen-Duc et al. · 127 citations · ⚡15
#computer vision Review Open access May 2015

A survey study on major technical barriers affecting the decision to adopt cloud services

The comparison of adopter and non-adopter sample reveals three potential adoption inhibitor, security, data privacy, and portability, which underlines the importance of the technical and security perspectives for research investigating the adoption of technology.

Nattakarn Phaphoom, Xiaofeng Wang, S. Samuel et al. · 111 citations · ⚡8
#computer vision Conference Open access Dec 2013

Affordable and Energy-Efficient Cloud Computing Clusters: The Bolzano Raspberry Pi Cloud Cluster Experiment

The ongoing work building a Raspberry Pi cluster consisting of 300 nodes is presented, with potential use cases being an inexpensive and green test bed for cloud computing research and a robust and mobile data center for operating in adverse environments.

P. Abrahamsson, S. Helmer, Nattakarn Phaphoom et al. · 110 citations · ⚡7
#computer vision Book Open access Mar 2017

On the Unhappiness of Software Developers

The results indicate that software developers are a slightly happy population, but the need for limiting the unhappiness of developers remains, and 219 factors representing causes of unhappiness while developing software are identified.

D. Graziotin, Fabian Fagerholm, Xiaofeng Wang et al. · 84 citations · ⚡6

Related blog posts

Microsoft Research Blog Oct 12, 2026

Simulating student learning for better AI tutoring

StudentSim is a research system for evaluating and improving AI tutoring tools before they are tested with learners. It models how individuals may engage with tutors, giving feedback to improve tutor performance across subjects like chess, writing, and mathematics. The post Simulating student learning for better AI tutoring appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.