Paper deep dive
PREBA: Surgical Duration Prediction via PCA-Weighted Retrieval-Augmented LLMs and Bayesian Averaging Aggregation
Wanyin Wu, Kanxue Li, Baosheng Yu, Haoyun Zhao, Yibing Zhan, Dapeng Tao, Hua Jin
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 90%
Last extracted: 7/20/2026, 7:39:20 AM
Summary
The paper introduces PREBA, a retrieval-augmented generation framework for predicting surgical duration. PREBA addresses the limitations of zero-shot LLM inference by integrating PCA-weighted retrieval of clinically similar historical cases and Bayesian averaging aggregation. It encodes heterogeneous clinical features, retrieves relevant cases using Principal Component Analysis to weight feature importance, and fuses LLM predictions with population-level statistical priors to produce calibrated duration estimates. The method is evaluated on real-world datasets using Qwen3, DeepSeek-R1, and HuatuoGPT-o1, showing significant improvements over zero-shot baselines and competitive performance with supervised machine learning models.
Entities (11)
Relation Signals (8)
PREBA → uses → Bayesian Averaging
confidence 95% · PREBA applies Bayesian averaging to fuse multi-round LLM predictions with population-level statistical priors
PREBA → uses → PCA
confidence 95% · PREBA first encodes heterogeneous clinical features... It then performs PCA-weighted retrieval to identify clinically relevant historical cases
PREBA → outperforms → zero-shot inference
confidence 92% · PREBA significantly improves performance... raising R^2 from -0.13 to 0.62 over zero-shot inference
PREBA → evaluateswith → HuatuoGPT-o1
confidence 90% · We evaluate PREBA on two real-world clinical datasets using three state-of-the-art LLMs, including HuatuoGPT-o1
PREBA → evaluateswith → Qwen3
confidence 90% · We evaluate PREBA on two real-world clinical datasets using three state-of-the-art LLMs, including Qwen3
PREBA → evaluateswith → DeepSeek-R1
confidence 90% · We evaluate PREBA on two real-world clinical datasets using three state-of-the-art LLMs, including DeepSeek-R1
PREBA → competeswith → XGBoost
confidence 85% · achieves accuracy competitive with supervised ML methods... Qwen3-32B attains a MAE of 33.43 minutes... surpassing the strongest ML baseline (QRF...)
BERT → usedin →
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Accurate prediction of surgical duration is pivotal for hospital resource management. Although recent supervised learning approaches-from machine learning (ML) to fine-tuned large language models (LLMs)-have shown strong performance, they remain constrained by the need for high-quality labeled data and computationally intensive training. In contrast, zero-shot LLM inference offers a promising training-free alternative but it lacks grounding in institution-specific clinical context (e.g., local demographics and case-mix distributions), making its predictions clinically misaligned and prone to instability. To address these limitations, we present PREBA, a retrieval-augmented framework that integrates PCA-weighted retrieval and Bayesian averaging aggregation to ground LLM predictions in institution-specific clinical evidence and statistical priors. The core of PREBA is to construct an evidence-based prompt for the LLM, comprising (1) the most clinically similar historical surgical cases and (2) clinical statistical priors. To achieve this, PREBA first encodes heterogeneous clinical features into a unified representation space enabling systematic retrieval. It then performs PCA-weighted retrieval to identify clinically relevant historical cases, which form the evidence context supplied to the LLM. Finally, PREBA applies Bayesian averaging to fuse multi-round LLM predictions with population-level statistical priors, yielding calibrated and clinically plausible duration estimates. We evaluate PREBA on two real-world clinical datasets using three state-of-the-art LLMs, including Qwen3, DeepSeek-R1, and HuatuoGPT-o1. PREBA significantly improves performance-for instance, reducing MAE by up to 40% and raising R^2 from -0.13 to 0.62 over zero-shot inference-and it achieves accuracy competitive with supervised ML methods, demonstrating strong effectiveness and generalization.
Tags
Links
- Source: https://arxiv.org/abs/2603.13275v3
- Canonical: https://arxiv.org/abs/2603.13275v3
Trouble viewing inline? Open PDF directly →
Full Text
74,178 characters extracted from source content.
Expand or collapse full text
IEEE TRANSACTIONS AND JOURNALS TEMPLATE1 PREBA: Surgical Duration Prediction via PCA-Weighted Retrieval-Augmented LLMs and Bayesian Averaging Aggregation Wanyin Wu†, Kanxue Li†, Baosheng Yu, Haoyun Zhao, Yibing Zhan, Member, IEEE , Dapeng Tao*, Member, IEEE , and Hua Jin* Abstract — Accurate prediction of surgical duration is pivotal for hospital resource management. Although recent supervised learning approaches—from machine learning (ML) to fine-tuned large language models (LLMs)—have shown strong performance, they remain constrained by the need for high-quality labeled data and computationally intensive training. In contrast, zero-shot LLM inference offers a promising training-free alternative but it lacks grounding in institution-specific clinical context (e.g., lo- cal demographics and case-mix distributions), making its predictions clinically misaligned and prone to instability. To address these limitations, we present PREBA, a retrieval- augmented framework that integrates PCA-weighted re- trieval and Bayesian averaging aggregation to ground LLM predictions in institution-specific clinical evidence and statistical priors. The core of PREBA is to construct an evidence-based prompt for the LLM, comprising (1) the most clinically similar historical surgical cases and (2) clinical statistical priors. To achieve this, PREBA first encodes heterogeneous clinical features into a unified representation space enabling systematic retrieval. It then performs PCA- weighted retrieval to identify clinically relevant historical cases, which form the evidence context supplied to the LLM. Finally, PREBA applies Bayesian averaging to fuse multi-round LLM predictions with population-level statistical priors, yielding calibrated and clinically plausible duration estimates. We evaluate PREBA on two real-world clinical datasets using three state-of-the-art LLMs, including Qwen3, DeepSeek-R1, and HuatuoGPT-o1. PREBA significantly im- proves performance—for instance, reducing MAE by up to 40% and raising R 2 from -0.13 to 0.62 over zero-shot inference—and it achieves accuracy competitive with super- vised ML methods, demonstrating strong effectiveness and generalization. Index Terms— Surgery Duration Prediction, Large Lan- guage Models (LLMs), Retrieval-Augmented Generation (RAG), Principal Component Analysis (PCA), Bayesian Aver- aging. I. INTRODUCTION Wanyin Wu, Haoyun Zhao, and Dapeng Tao are with the School of Information Science and Engineering, Yunnan University, Kunming 650500, China. Kanxue Li and Yibing Zhan are with the School of Computer Science, Wuhan University, Wuhan 430072, China. Baosheng Yu is with the Lee Kong Chian School of Medicine, Nanyang Technological University, Singapore 639798. Hua Jin is with First People’s Hospital of Yunnan Province, Kunming 650032, China. † Kanxue Li and Wanyin Wu contributed equally to this work. Author order is random. * Corresponding author: Dapeng Tao and Hua Jin S URGICAL duration prediction plays a vital role in hospital management, particularly in optimizing operating-room (OR) utilization and resource allocation [1], [2]. Accurate predictions provide reliable evidence for surgical scheduling, effectively preventing underutilization of expensive operating room resources, thereby reducing patient waiting times and enhancing care coordination efficiency [3], [4]. However, due to complex clinical data and non-stationary dynamics of surgical workflows, reliable surgical duration prediction remains a significant challenge [5], [6]. Surgical duration prediction methodologies have advanced from expert judgment-based heuristics to sophisticated machine learning approaches in recent decades [7], [8]. Early approaches primarily relied on surgeons’ empirical judgment or simple statistical averages of historical records [1]. While practical, these methods often failed to account for the multifactorial complexity inherent in surgical procedures—such as variations in patient physiology and surgeon experience—leading to limited accuracy. The advent of machine learning introduced a significant shift, with ensemble methods like Decision Trees [9], Random Forests [10], and XGBoost [11] emerging as mainstream solutions. By learning end-to-end mappings from structured numerical and categorical features, these models effectively captured nonlinear relationships with surgi- cal time and demonstrated substantially improved predictive performance. As clinical data complexity escalated, the field progressively embraced multimodal data fusion strategies [12]. These approaches leverage pre-trained language models such as BERT [13] to encode unstructured clinical narratives into high- dimensional semantic representations, then jointly optimizing such representations with structured tabular features through unified training frameworks [14]. Recent advances in large language models (LLMs) have demonstrated remarkable performance in various domain- specific applications [15], such as natural language under- standing [16] and task reasoning [17], spurring exploration of their use in medical AI [18], [19]. In surgical duration prediction, existing research has explored two primary tech- nical paradigms [20]. The first approach involves fine-tuning pretrained LLMs on curated historical surgical data, enabling the model to capture domain-specific patterns, procedural nuances, and clinical context. This approach has been shown to surpass the performance of traditional machine learning arXiv:2603.13275v3 [cs.LG] 21 Mar 2026 2IEEE TRANSACTIONS AND JOURNALS TEMPLATE methods. In contrast, the zero-shot inference paradigm leverages the inherent knowledge and reasoning abilities of foundation models without any task-specific training. Through carefully structured prompting, it can generate predictions directly, offering notable advantages in terms of deployability, scalability, and applicability in low-resource settings. Despite substantial progress with both machine learning and large language models, current methods still face following limitations. First, traditional ML methods and fine-tuned LLMs require large volumes of high-quality labeled data and intensive compute for offline training [21], [15]. Moreover, once trained, their parameters are fixed, limiting real-time adaptation to evolving data distributions or novel clinical presentations and typically necessitating periodic retraining [22], [23]. Second, while zero-shot inference circumvents training costs [24], it lacks grounding in institution-specific clinical context—such as local procedural practices and case-mix distributions [25], [26]. This limitation arises because LLMs trained on globally diverse medical corpora encode population-level averages across het- erogeneous healthcare systems [27], causing their predictions to drift toward generic population patterns rather than the realities of a given hospital. This absence of contextual anchoring results in clinically misaligned and unstable estimates [28]. To address these limitations, we propose PREBA, a retrieval-augmented generation (RAG) framework that inte- grates PCA-weighted REtrieval and Bayesian Averaging to ground LLM reasoning in institution-specific clinical evidence and population-level priors. As depicted in Fig. 1, PREBA first encodes heterogeneous clinical features into a retrieval-aware representation space, then employs a Principal Component Analysis (PCA) [29]-weighted retrieval mechanism to identify historical cases that are semantically and clinically similar to the query. These retrieved cases, together with population-level clinical priors, are synthesized into a structured prompt that provides the LLM with evidence-based context for generating multiple candidate predictions. Finally, rather than mechanically averaging these generations, PREBA employs Bayesian averag- ing [30] to systematically integrate LLM outputs with clinical priors, yielding calibrated and clinically plausible estimates. To validate the efficacy of PREBA, we conduct extensive experiments on both the MMSDP [12] dataset and a real- world in-hospital dataset. We instantiate PREBA with three state-of-the-art LLMs—Qwen3 [31], DeepSeek-R1 [32], and HuatuoGPT-o1 [33]—and evaluate its performance across multiple settings against nine established ML baselines (e.g., XGBoost [11] and Quantile Random Forest (QRF) [34]). As shown in Table I, PREBA consistently outperforms zero-shot and random few-shot paradigms. For example, Qwen3-8B’s MAE decreases by 40% (from 58.62→35.19 minutes), while R 2 improves from -0.13 to 0.62, demonstrating robust gains across LLM variants and datasets. Notably, PREBA achieves performance competitive with fully supervised ML models without any task-specific fine-tuning. As reported in Table I, Qwen3-32B attains a MAE of 33.43 minutes with R 2 =0.66, surpassing the strongest ML baseline (QRF at 33.80 minutes). These results highlight the effectiveness and generalizability of our method for practical deployment in real-world clinical systems. In summary, our contributions are threefold: (1) We propose PREBA, a training-free RAG framework that grounds LLM reasoning in institution-specific clinical context for surgical duration prediction, eliminating the computational expense of fine-tuning. (2) We introduce a data-driven, PCA-weighted retrieval mechanism for semantically and clinically case match- ing, coupled with a Bayesian averaging strategy that robustly aggregates LLM outputs with population-level statistical priors. (3) Through extensive experiments, we show that PREBA achieves accuracy competitive with supervised ML models while providing greater interpretability via retrieved exemplars and explicit clinical priors. I. RELATED WORK A. Machine Learning-based Surgical Duration Prediction Surgical duration prediction plays a central role in optimizing operating room (OR) scheduling and resource management [5]. Early approaches to this problem were primarily based on expert judgment and simple statistical averages of historical surgical records [2]. However, these methods overlooked the complex and multifactorial nature of surgery, such as patient physiology, surgical type, and surgeon experience, leading to predictions with limited accuracy and poor generalizabil- ity. With the rapid development of machine learning (ML) techniques, methods based on ensemble models, such as Bagging [35], Random Forest [10], and XGBoost [11], have become the mainstream for surgical duration prediction [6], [3]. These methods leverage end-to-end learning of numerical and categorical features, effectively capturing the nonlinear relationships between the features and surgery duration [4]. Compared to traditional methods, ML-based models signif- icantly improve prediction accuracy. Additionally, as the complexity of medical data increases, research has gradually shifted towards multimodal data fusion strategies, incorporating pre-trained language models like BERT [13] to convert clinical free-text into high-dimensional semantic vectors [12], [14]. This fusion enhances the model’s understanding of complex clinical contexts and its generalization ability. Despite advance- ments, ML-based methods remain constrained by their not only resource-intensive training demands but also their fixed parameters, which preclude efficient real-time adaptation [36]. B. Surgical Duration Prediction Methods Based on LLMs Recent advances in Large Language Models (LLMs) have demonstrated exceptional capabilities in natural language understanding [37], [38] and task reasoning [39], [40], showing great promise in various medical applications [18], including surgical duration prediction. LLMs, with their vast knowledge base and ability to comprehend complex medical contexts, have been increasingly explored for tasks such as clinical decision support and surgical planning [19]. In surgical duration prediction, existing research primarily focuses on two technical paths: fine-tuning and zero-shot learning [41]. Fine-tuning involves training pre-existing models on historical surgical data, enabling them to better understand surgical terminologies and contexts, such as patient histories and surgical records. Although fine-tuning significantly improves model performance, AUTHOR et al.: TITLE3 (i) Heterogeneous Biomedical Feature Embedding Shared Encoder Vector Database Retrieval (i) PCA-Weighted Retrieval-Augmented Generation Top-K Candidate Predictions Clinical Statistics Prior Surgical duration y q (i) Bayesian Averaging Aggregation y 0 y 1 y n ... Heterogeneous Feature Embedding (1) Numerical (e.g., Age) (2) Categorical (e.g., gender) (3) Ordinal (e.g., ASA level) (4) Boolean (e.g., smoking history) (5) Text (e.g., surgery names) Query Case . . . StandardScaler OrdinalEncoder BERT . . . Save PCA Weighting × × × ... ∘ × × × × ... ∘ × . . . �=�∙� 푷� Retrieval Corpus (Historical Surgical Cases) �=퐂�(� � , � � ,...,� � ) Concat Feature Embedding � � = � � �(� � ) . . . � � = � � �(� � ) . . . � � = � � �(� � ) . . . Input . . . � � Multi-round Prediction LLM τ 0 ,τ 1 , ..., τ n Bayesian-Averaging y q = � prior ∙� prior +n∙ y � prior +n Data Layer Prompt Constructor System Role Demonstrations Query Prior Statistics Filter PCA Weighting Prior Fig. 1. The proposed PREBA framework. for surgical duration prediction, consisting of three key modules: (i) Heterogeneous Biomedical Feature Embedding, (i) PCA-Weighted Retrieval-Augmented Generation, and (i) Bayesian Averaging Aggregation. it is still constrained by data dependency and computational intensity, facing challenges similar to traditional machine learning approaches in terms of scalability and generalization. In contrast, zero-shot learning leverages the innate knowledge embedded in foundation models, allowing them to make predictions without requiring task-specific training. This method avoids the high costs of model retraining and capitalizes on the generalization capabilities of LLMs. However, the accuracy of zero-shot predictions is critically dependent on prompt design quality [22], [28]. Moreover, in the absence of systematic retrieval mechanisms and robust uncertainty quantification, its predictions often lack the stability and reliability required for real-time clinical deployment [27], [42]. I. METHOD This section details the proposed PREBA framework for surgical duration prediction. As illustrated in Fig. 1, PREBA consists of three core components. First, the heterogeneous biomedical feature embedding module is responsible for precisely representing heterogeneous clinical feature data as corresponding vector embeddings. Second, a PCA-weighted retrieval–augmented generation module assigns data-driven importance weights to heterogeneous features and retrieves clinically relevant historical cases to construct an evidence- based context for LLMs. The LLM then generates initial dura- tion estimates conditioned on this context. Finally, a Bayesian averaging aggregation module fuses multiple LLM outputs with population-level clinical priors to produce calibrated and robust final predictions. A. Problem Definition Surgical duration prediction, defined as estimating the duration from patient entry into the operating room to exit [1], is formulated as a regression task. LetD his = (x i ,y i ) N i=1 denote the historical surgery dataset, wherex i represents the perioperative clinical features of thei-th surgery, encompassing patient physiological information and surgical characteristics. Each target variabley i ∈R + represents the true surgical duration in minutes. Given a query casex q (x q /∈ D his ), the objective is to obtain a point estimateˆy q ∈R + of its surgical duration. This work leveragesD his as the knowledge repository. We first retrieve the top-Kmost similar historical cases in the PCA-weighted feature space: R K =(x j ,y j ) : j ∈N K (x q ,D his )(1) whereN K denotes the top-Knearest neighbor retrieval function. Subsequently, the query case and retrieved examples are jointly formulated into a prompt, which is fed to a large language model to generate multiple predictions acrossn rounds: ˆy (r) q = LLM(x q ,R K ;τ r ), r = 1, 2,...,n(2) whereτ r represents the sampling temperature in roundr. Finally, multiple predictions are aggregated with Bayesian averaging [30] to produce the final estimate ˆy q : ̄y = 1 n n X r=1 ˆy (r) q ,ˆy q = w prior · μ prior + n· ̄y w prior + n (3) where ̄ydenotes the sample mean of LLM predictions,μ prior represents the prior mean, andw prior indicates the prior strength. 4IEEE TRANSACTIONS AND JOURNALS TEMPLATE B. Heterogeneous Biomedical Feature Embedding Clinical electronic health records contain diverse feature modalities spanning multiple data types and representational structures. To enable effective downstream retrieval and gener- ation tasks, these heterogeneous features must be transformed into a unified, dense vector space. This subsection details the encoding strategy for handling multimodal clinical data. 1) Type-Specific Feature Encoding: Clinical features are categorized into five distinct types, each requiring tailored encoding mechanisms. Numerical features (e.g., patient age) are standardized viaStandardScaler[43] to achieve zero mean and unit variance. Ordinal features (e.g., surgery level) are encoded viaOrdinalEncoder[44] to preserve ordering seman- tics. Categorical features (e.g., gender) are processed through OneHotEncoder[45] to generate sparse binary representations. Boolean features (e.g., abnormal pulmonary function) are encoded viaLabelEncoder[46] to represent binary condi- tions. Textual features (e.g., surgery names) are encoded via BERT [13] contextual embeddings to capture semantic content. 2) Dimension Normalization: A fundamental challenge arises from the heterogeneity of encoding output dimensions. BERT- based text representations produce 768-dimensional vectors, while categorical and ordinal encodings typically yield sub- stantially lower dimensions. This dimensionality disparity causes high-dimensional features to disproportionately influ- ence similarity computations in downstream retrieval steps. To mitigate this bias, we normalize each feature category by its dimensionality. For categorycwith encoded vectorv c , we define the normalization coefficient as: α c = 1 p dim(v c ) (4) The normalized embedding vector is constructed by concate- nating scaled category-specific embeddings: V norm = [α num v num ,α ord v ord ,α cat v cat ,α bool v bool ,α text v text ] (5) where each term represents the element-wise product of the normalization coefficient and the category embedding. This normalization scheme ensures that similarity measures reflect content relevance rather than vector magnitude, preventing BERT-encoded features from dominating the representation space. The output of this module is the normalized embedding vectorV (1) ∈R D , whereD = P c dim(v c )represents the effective total dimensionality. C. PCA-Weighted Retrieval-Augmented Generation While the normalized embedding provides a balanced representation across features, it does not differentiate the relative importance of various clinical features for predicting surgical duration. To address this limitations, we present a data-driven PCA-weighted retrieval mechanism combined with clinically-aware post-processing, and demonstrates how to integrate retrieved cases with LLM-based prediction generation. 1) Data-Driven Feature Weighting via PCA: Traditional ap- proaches often rely on manual feature weighting based on clinical expertise, which may not fully capture the complex re- lationships in the data. Instead, we employ Principal Component 0.0000.0020.0040.0060.0080.010 Feature Importance Patient Department Planned Surgical Procedure Surgical Complexity Level Primary Diagnosis ASA Physical Status Preoperative Pulmonary Function Preoperative Blood Gas Analysis Cardiac Functional Class Surgical Instrument Inventory Surgical Precautions Preoperative Surgical History Other System Comorbidities Perioperative Nursing Staff Preoperative Echocardiography Current Medications Scrub Nursing Staff Patient Gender Smoking Status Alcohol Use History Disease Treatment Record 0.0090 0.0087 0.0085 0.0081 0.0080 0.0080 0.0079 0.0078 0.0078 0.0058 0.0057 0.0056 0.0056 0.0054 0.0054 0.0050 0.0048 0.0047 0.0046 0.0046 Fig. 2.PCA-based feature importance analysis showing the top 20 clinical features ranked by their contribution to surgical duration prediction. Analysis (PCA) [47] to automatically derive feature importance from the training data in an unsupervised manner. LetV = [v (emb) 1 , v (emb) 2 ,..., v (emb) N ] T ∈R N×D represent the matrix of normalized embeddings fromNtraining cases. We perform PCA [48] on the centered data matrix, obtaining the principal components (eigenvectors)W = [w 1 , w 2 ,..., w D ]∈R D×D and the corresponding explained variance ratiosσ k D k=1 , whereσ k is the variance explained by thek-th component. The importance weight for thej-th feature dimension is computed by aggregating its absolute loadings across the top-Kprincipal components, weighted by their respective explained variances: w PCA j = 1 K K X k=1 |W jk |· σ k (6) This formulation assigns higher weights to features that consistently contribute to the directions of maximum variance in the clinical data, which often correspond to features with high discriminative power for surgical outcomes [12]. The results of the principal component analysis are shown in Fig. 2. The final weighted representation for a case embedding is then obtained via element-wise multiplication: v (weighted) = v (emb) ⊙ w PCA (7) wherew PCA ∈R D is the PCA-derived weight vector. This operation amplifies the influence of clinically significant features in the subsequent similarity computation. 2) Similarity Retrieval with Clinical Post-Processing: We construct a FAISS [49] vector database where all historical cases are stored as PCA-weighted embeddingsv (weighted) i . For a query casex q , we first encode it intov (emb) q using the heterogeneous embedding module, then apply the same PCA weighting to obtain v (weighted) q . The retrieval process begins by computing cosine similarity between the query vectorv (weighted) q and all weighted case vectors in the database. The cosine similarity metric [50] (i.e. N K function) is defined as: sim(v q , v i ) = v q · v i ∥v q ∥v i ∥ (8) AUTHOR et al.: TITLE5 FemaleMale 0 20000 40000 60000 80000 Count 83,343 (63.0%) 48,907 (37.0%) 050100 Distribution of Gender, Age, and Surgical Grade 0 2000 4000 6000 8000 10000 12000 14000 Mean: 46.5 Median: 47.0 -11234 0 10000 20000 30000 40000 50000 Count 217 9,063 39,830 31,886 51,254 0100200300400500600700800 Surgical Duration (minutes) 0 2500 5000 7500 10000 12500 15000 17500 Count n = 132,250 Q1 = 100.0 Median = 135.0 Q3 = 190.0 Max = 810 (b) Surgical Duration Distribution Mean: 155.6 Median: 135.0 Orthopedics General Surgery Plastic Surgery Neurosurgery Urology Obstetrics Cardiac Surgery Ophthalmology Gynecology Thoracic Surgery Department 0 100 200 300 400 500 600 Surgical Duration (minutes) (c) Department-Stratified Surgical Duration Surgical Duration Prediction Dataset: Comprehensive Characteristics Analysis (a) Population Demographics Fig. 3. Key characteristics of In-hospital Dataset. (a) Patient and Surgical Characteristics: distributions of gender, age, and surgical grade. (b) Surgical duration distribution with key statistics. (c) Department-stratified duration patterns across 10 selected clinical departments. This metric is chosen for its effectiveness in high-dimensional spaces and its invariance to vector magnitude, focusing purely on directional similarity. We initially retrieve the topM = n· Kmost similar cases based on cosine similarity, where n > 1is an expansion factor. This expanded candidate set C = (x i ,y i ) M i=1 ensures sufficient coverage of potentially relevant cases, acknowledging that the raw similarity ranking may not fully align with clinical relevance due to the complexity of surgical contexts. The initial candidate poolCis refined via hierarchical filtering to eliminate clinically inconsistent and statistically anomalous cases. First, we restrict candidates to cases from the same medical department as the query, ensuring departmental clinical coherence. Second, we apply hierarchical feature matching based on exact agreement with key clinical attributes (department, planned surgery name, and surgery level) in descending order of specificity. Third, we perform statistical outlier removal using interquartile range (IQR) [51] analysis on durations. The refined reference setR K of sizeKis selected from the post-processed candidates by highest similarity score. 3) LLM-Based Prediction Generation: The refined reference setR K =(x i ,y i ) K i=1 and the query casex q are synthesized into a structured promptP(x q ,R K ,S q )following the template illustrated in Fig. 4. The prompt construction functionP integrates four key components: (1) a system prompt defining the AI’s role as a surgical duration prediction assistant; (2) similar case demonstrations detailing the clinical features and actual durations of theKreference cases; (3) statistical prior knowledgeS q including median, mean, range, and interquartile ranges of surgical durations for the relevant clinical stratum; and (4) the query case’s clinical profile. This comprehensive prompt design enables the LLM to engage in analogical reasoning based on specific similar cases while maintaining awareness of population-level statistics. To capture the inherent uncertainty in the LLM’s reasoning process, we employ a multi-temperature sampling strategy where predictions are generated as: ˆy (r) q = LLM(P(x q ,R K ,S q );τ r ), r = 1, 2,...,n(9) The temperature parameterτ r is varied across generations: τ 1 = 0produces a deterministic prediction, whileτ r ∼ U (0.05, 0.4)forr ≥ 2introduces controlled variability. This ap- proach yields an ensemble of predictionsˆy (1) q , ˆy (2) q ,..., ˆy (n) q that reflects both the model’s most confident reasoning and plausible variations in its output space. D. Bayesian Averaging Aggregation Multi-round LLM inference produces an ensemble of nu- meric candidates sampling the model’s output space under varying temperature conditions. However, effectively aggregat- ing these predictions to yield a stable and clinically credible estimate presents significant challenges [52]. Classical data- driven aggregation rules, such as simple averaging and majority voting, stabilize random fluctuations but remain agnostic to hospital-level knowledge, risking miscalibration when the gen- erated distribution departs from clinically plausible ranges [53]. To incorporate institution-specific knowledge, we introduce a Bayesian aggregation [54] that integrates LLM evidence with population-level clinical priors, enabling the resulting estimates to be both data-informed and clinically grounded. Clinical priors are extracted through hierarchical matching on key clinical attributes from the training set. For a query casex q , we identify the most specific clinical stratum—typically based on combinations of department, planned surgery name, and surgery level—that contains sufficient historical data to ensure statistical robustness. From the matching historical cases, we compute the prior meanμ prior as the median surgical duration and calibrate the prior strengthw prior according to cohort size and variance, reflecting confidence in the stratum-specific distribution. The Bayesian aggregation framework provides three key advantages over conventional methods: (1) it incorporates domain knowledge through clinical priors, rejecting biologically implausible predictions; (2) it automatically adapts the influence of prior knowledge based on the quantity and consistency of LLM predictions; and (3) it offers a principled approach to uncertainty quantification, with the effective sample size (W prior + n)providing a natural measure of prediction confi- dence. 6IEEE TRANSACTIONS AND JOURNALS TEMPLATE c 你是一个手术时长预测助手,旨在根据医学常识和用户提供的患者生理特征、手术类型和相关参考实例等,来预测该台手术的时间长度。 You are a surgical duration prediction assistant. Your task is to predict the duration of a surgical case based on medical knowledge and the patient's physiological characteristics, surgical type, and related reference examples provided by the user. 以下是若干台与当前手术相似的历史手术案例及其真实手术时长, 请仔细分析这些参考案例的特征。 Below are several similar historical surgical cases with their real surgical characteristics. Please carefully analyze the features of these reference cases. 示例 1:Example 1: ### 输入:### Input 一. 患者基本信息与健康状况: 1. Patient Demographics and Health Status 性别:男,年龄:50.0,住院科室:骨科, 肺功能是否异常:否,血气是否异常:否, Gender: Male, Age: 50.0, Department: Orthopedics, Pulmonary Function Abnormalities: False, Blood Gas Abnormalities: False 超声心动图是否异常:否,放射结果详述:(1)两肺纹理增多,(2)胸内主动脉迂曲,... Echocardiogram Abnormalities: False, Radiology Results: (1) Increased lung texture, (2) Thoracic aortic tortuosity, ... 二. 手术类型和手术本身特征: 2. Surgical Type and Surgical Characteristics 拟行手术名称:内镜下腰椎间盘切除术,手术器械清点单手术名称:盘髓核摘除术, ... Planned Surgery Name: Endoscopic Lumbar Discectomy, Surgical Instrument Checklist Surgery Name: Discectomy, ... 三. 术前访视评估与麻醉相关特征: 3. Preoperative Assessment and Anesthesia Features 是否有吸烟史标识:是,是否有酗酒史:是, Smoking History: True, Alcohol History: True 拟选麻醉方法:静脉麻醉,拟选用麻醉药:维库溴铵^舒芬太尼,患者心功能分级(New York Heart Association):目前无评级, ... Planned Anesthesia Method: Intravenous Anesthesia, Planned Anesthetic Drugs: Vecuronium, Sufentanil, Cardiac Functional Classification (New York Heart): Null, ... 四. 医疗团队与支持人员: 4. Medical Team and Support Personnel 手术医生ID:151,麻醉医生ID:1723,... Surgeon ID: 151, Anesthesiologist ID: 1723, ... 五. 手术紧急程度及特殊情况: 5. Surgical Urgency and Special Considerations 手术等级:四类,主要诊断:腰椎间盘突出,总体评估时的ASA分级:I 级,... Surgical Grade: Class IV, Primary Diagnosis: Lumbar Disc Herniation, ASA Level: I, ... ### 输出(min):### Output (min): 手术时长:110.0 Surgical Duration: 110.0 示例 N:... Example N: ... 现在请基于以上参考案例的分析,类比推理当前手术的预计时长。请仅输出最终的预测数值(单位:分钟),不需输出任何其他内容。 Based on the analysis of the above reference cases, please infer the predicted duration of the current surgical procedure by analogy. Only output the final predicted value (in minutes), with no additional content. 待预测案例 Query Case 【先验提示】在相同'科室/手术名称/手术等级'组合下,统计历史数据(共53例)显示: [Prior Statistics] Based on historical data (53 cases in total) for procedures sharing the same 'Department / Procedure Name / Surgical Grade' combination: (1) 中位时长:115,平均时长:132; (2)时长范围:80-250,四分位距:... (1) Median Duration: 115 minutes, Mean Duration: 132 minutes; (2) Duration Range: 80-250 minutes, Interquartile Range (IQR): ... Fig. 4. Structured prompt template for retrieval-augmented surgical duration prediction. The prompt integrates (1) system role definition, (2) similar case demonstrations retrieved via PCA-weighted similarity, (3) statistical priors from historical data, and (4) the query case. IV. EXPERIMENT A. Experimental Setup 1) Dataset: We evaluate the proposed framework on two large-scale real-world surgical duration datasets: the public Multimodal Surgery Duration Prediction (MMSDP) dataset [12] and an real-world in-hospital dataset. The MMSDP dataset com- prises 75,944 surgical procedures (63,301 for training, 6,282 for validation, and 6,361 for testing) collected from a prominent tertiary general hospital in China between June 2021 and August 2023, and provides heterogeneous multimodal features including patient demographics, surgical team characteristics, preoperative laboratory tests, and free-text procedure names. To comprehensively assess model generalizability across clinical settings, we additionally curate a large in-hospital dataset from a public tertiary general hospital in China spanning March 2022 to June 2025, containing 132,250 procedures with 92 routinely documented perioperative attributes. Surgical duration is defined in both datasets as the time from patient entry into the operating room to exit, consistent with existing work [12], [5]. To enhance computational efficiency and focus on salient predictors, we apply principal component analysis [29] to the in-hospital dataset and retain the 42 most informative features TABLE I SURGICAL DURATION STATISTICS ACROSS DATASET SPLITS DatasetCount Mean±Std Range (min) Train125,369155.8±83.7[8, 810] Validation3,470149.9±82.0[17, 720] Test3,411154.3±81.2[11, 745] Total132,250155.6±83.6[8, 810] for downstream modeling. Fig. 3 summarizes the distributions of demographic variables, surgical grades, and case durations, revealing a predominantly middle-aged patient population with substantial variability between-departments in surgical duration. Table I reports descriptive statistics for the training, validation, and test subsets, including sample size, mean duration, standard deviation, and range. The training set (125,369 cases) is used for model training (if applicable) and serves as the retrieval corpus for our RAG module, whereas the test set (3,411 cases) is held out exclusively for final performance evaluation. All data are fully de-identified, and all experiments are conducted in accordance with the institution’s ethical review and data governance protocols (Approval No. KHLL2023-KY032). AUTHOR et al.: TITLE7 2) Baselines: To comprehensively evaluate the proposed framework, we compare against two categories of baseline methods: traditional machine learning (ML) models and large language models (LLMs) under different inference paradigms. We employ nine fully-parametric supervised learning models representing diverse learning paradigms, including Support Vector Regression (SVR) [55], Decision Tree [9], Gradient Boosting Trees [56], Bagging [35], Random Forest [10], Quantile Random Forest [34], Linear Regression [57], Ridge Regression [58], and XGBoost [11]. All ML baselines utilize identical feature representations to ensure fair comparison. We evaluate three state-of-the-art open-source LLMs with diverse architectural designs: Qwen3-8B [31], DeepSeek-R1-8B [32], and HuatuoGPT-o1-7B [33]. For each LLM, we compare three inference protocols: (1) Zero-Shot: the LLM receives only the query case and task instruction, without access to reference cases or statistical priors; (2) Random Few-Shot: the LLM receives the query case augmented with randomly selected historical cases; (3) Proposed RAG: the LLM receives the query case with PCA-weighted retrieved referencesR K , statistical priors, and structured prompts as detailed in Section I. To investigate the impact of model scale on prediction performance, we conduct an additional ablation study using Qwen3 across multiple parameter sizes: 4B, 8B, 14B, and 32B. Each variant is evaluated under the proposed RAG framework using identical retrieval, prompting, and aggregation pipelines. 3) Evaluation Metrics: To comprehensively assess model performance from multiple perspectives, we employ four established regression metrics: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Coefficient of Determination (R 2 ), and Mean Absolute Percentage Error (MAPE). These metrics provide complementary insights into different aspects of prediction accuracy. Mean Absolute Error quantifies the average magnitude of prediction errors in absolute units: MAE = 1 m m X i=1 |y i − ˆy i |(10) wheremis the number of test samples,y i is the true surgical duration, and ˆy i is the predicted duration. Root Mean Square Error penalizes larger errors more heavily than MAE: RMSE = v u u t 1 m m X i=1 (y i − ˆy i ) 2 (11) RMSE is sensitive to outlier predictions and reveals whether the model exhibits occasional severe errors. A high RMSE relative to MAE signals the presence of large prediction failures on specific cases, which is critical to identify in clinical contexts where consistency matters. The coefficient of determination measures the proportion of variance in surgical durations explained by the model: R 2 = 1− P m i=1 (y i − ˆy i ) 2 P m i=1 (y i − ̄y) 2 (12) where ̄yis the mean of observed durations.R 2 ∈ [−1, 1] quantifies overall model fit; values closer to 1 indicate that the model captures the underlying patterns in duration variation. Mean Absolute Percentage Error expresses prediction error as a percentage of true values: MAPE = 1 m m X i=1 y i − ˆy i y i × 100%(13) MAE and MAPE evaluate model performance along com- plementary dimensions essential. MAE quantifies the absolute prediction error in minutes. MAPE, in contrast, assesses relative accuracy across the full spectrum of surgical complexity. For instance, a 10-minute error represents a substantial 33% relative error for a 30-minute procedure but only 3.3% for a 300-minute procedure—both scenarios yield identical MAE but carry vastly different clinical implications. Jointly reporting both metrics provides a comprehensive assessment ensuring the method is both operationally feasible and predictively accurate across diverse surgical cases. 4) Implementation Details: For the RAG framework, we set the top-Kretrieval size to 8 (8-shot) and employ a 10× candidate expansion during post-processing, retrieving 80 initial candidates that are subsequently refined to the final 8 references through clinical filtering. The FAISS index is configured with “Flat" type [49]. All LLM-based experiments employ multi- round prediction generation withn = 5rounds per query. The temperature schedule follows a structured pattern: the first round uses deterministic sampling (τ 1 = 0), while subsequent rounds sample fromτ r ∼ U (0.05, 0.4)forr = 2,..., 5to explore the model’s prediction space. For the PCA weighting module, we retain the topM =42principal components. The Bayesian aggregation uses a fixed prior strengthW prior = 0.9 based on cross-validation. During inference, we leverage 10 parallel threads to accelerate the prediction process across multiple test cases. The same hyperparameters—including retrieval size, temperature ranges, and prior weights—are maintained constant across all LLM configurations to isolate the effects of methodological components rather than parameter tuning. All experiments are conducted on a server equipped with four NVIDIA A100 40GB GPUs, with LLM inference optimized through vLLM [59] and LlamaFactory [60] for efficient attention computation and KV cache management. B. Performance Comparison The performance of the proposed framework demonstrates substantial and consistent performance improvements across both datasets and all LLMs compared to baseline inference paradigms. As shown in Table I, the zero-shot and random few-shot baselines exhibit fundamental limitations: zero-shot predictions suffer from absence of clinical grounding (Qwen3- 8B: MAE 58.62 min, R 2 =-0.13, MAPE=37.66%), while random case selection fails to leverage systematic retrieval mechanisms (MAE 48.85 min, R 2 =0.15, 31.40%). In contrast, our RAG- augmented approach achieves marked improvements—Qwen3- 8B’s MAE reduces to 35.19 minutes (40% absolute reduction over zero-shot), R 2 increases to 0.62, and MAPE decreases to 25.39%. This improvement generalizes consistently across LLM variants: HuatuoGPT-o1-7B achieves MAE 34.98 min with R 2 =0.63, and DeepSeek-R1-8B achieves MAE 36.33 min with R 2 =0.59. Consistent performance improvements are observed 8IEEE TRANSACTIONS AND JOURNALS TEMPLATE TABLE I PERFORMANCE COMPARISON WITH VARIOUS LLMS ACROSS DIFFERENT SETTINGS Model SettingModelIn-hospital DatasetMMSDP [12] MAE ↓ RMSE ↓ R 2 ↑ MAPE (%) ↓MAE ↓ RMSE ↓ R 2 ↑ MAPE (%) ↓ Zero-Shot Qwen3-8B [31]58.6286.49-0.1337.6679.2093.91-1.6341.68 DeepSeek-R1-8B [32]62.2993.32-0.3238.6682.32103.21-2.1442.89 HuatuoGPT-o1-7B [33]52.7776.810.1132.7281.70101.04-2.0542.20 Random Few-Shot Qwen3-8B [31]48.8574.800.1531.4052.6873.27-0.6029.48 DeepSeek-R1-8B [32]54.2381.64-0.0132.2248.0865.52-0.2825.85 HuatuoGPT-o1-7B [33]47.0767.830.3031.30 55.9872.91-0.5930.09 RAG-Based Few-Shot (Ours) Qwen3-8B [31]35.1950.080.6225.3933.4550.260.2517.93 DeepSeek-R1-8B [32]36.3352.270.5925.4237.1456.320.0519.65 HuatuoGPT-o1-7B [33] 34.9849.590.6325.2333.4749.660.2617.68 Note: Lower values are better for MAE, RMSE, and MAPE; higher values are better for R 2 . The best performance is highlighted in bold, and the second-best is underlined. on the MMSDP dataset. For example, Qwen3-8B improves from 79.20 minutes (zero-shot) and 52.68 minutes (random few- shot) to 33.45 minutes under the RAG framework, achieving R 2 =0.25 with MAPE of 17.93%. These results demonstrate substantial advantages over both baseline paradigms and validate the effectiveness of the proposed method across distinct clinical datasets. Our training-free RAG framework achieves performance competitive with established supervised machine learning methods while offering fundamental operational advantages. As shown in TableTable I, the strongest ML baseline, Quantile Random Forest (QRF), achieves MAE 33.80 minutes with R 2 =0.66 and RMSE 47.65 min; the RAG-based variants match this performance—Qwen3-32B achieves MAE 33.43 minutes with R 2 =0.66 and RMSE 47.57 min, while smaller variants (Qwen3-8B: MAE 35.19 min, R 2 =0.62, RMSE 50.08 min; HuatuoGPT-o1-7B: MAE 34.98 min, R 2 =0.63, RMSE 49.59 min) remain within clinically meaningful margins (<5% error differential across all metrics). Critically, the RAG approach requires no model training or reoptimization, provides explicit clinical interpretability through retrieved cases and statistical priors, and enables seamless adaptation to new institutional contexts. These characteristics make it well-suited for practical clinical deployment where traditional supervised methods face scalability and sustainability constraints. C. Case Study To provide an intuitive understanding of how PREBA operates in practice, we present a representative case from the in-hospital dataset using Qwen3-8B as the backbone LLM. As shown in Fig. 6, the query corresponds to a 57-year-old male patient scheduled for elective total thyroidectomy in the Department of Breast and Thyroid Surgery, with an ASA grade of I and planned intravenous anesthesia. PREBA selects historical cases that are highly consistent with the query along key clinical dimensions, including department, surgery type and level, ASA grade, anesthesia modality, and a similar age range. The observed durations of these retrieved surgeries are tightly clustered between 115 and 150 minutes, yielding a reference range of [115, 155] minutes and a 95% confidence interval of (121.16, 146.34). Conditioned on this evidence-based context 35810 N-Shot Value 35 40 45 50 55 60 65 MAE & RMSE (min) 42.91 41.42 39.96 39.90 60.65 58.33 56.27 56.18 2.03s2.13s2.3s2.5s MAE (min) RMSE (min) MAPE (%) R² Time (s) 0.400 0.425 0.450 0.475 0.500 0.525 0.550 0.575 0.600 MAPE (%) & R² 30.64 29.92 29.01 28.93 0.44 0.48 0.520.52 N-Shot Ablation Study: Performance & Inference Time (Qwen3-8B) Fig. 5. N-Shot Ablation Study. Unified Performance-Efficiency Analysis on Qwen3-8B. Comprehensive visualization showing MAE (blue) and RMSE (green) on left axis, R 2 (red) and MAPE (orange) on right axis, with inference time color gradient (light to dark) displayed above the x-axis. and population-level priors, PREBA outputs a prediction of 130 minutes, which falls well within the retrieved confidence interval and is close to the ground-truth duration of 120 minutes. This case exemplifies how PREBA retrieves clinically coherent exemplars and combines them with statistical priors to produce calibrated and interpretable surgical duration estimates. D. Ablation Study To validate the necessity of each component of PREBA and to disentangle their individual contributions, we conduct comprehensive ablation studies on the in-hospital dataset. 1) Few-Shot (N-Shot) Ablation: We systematically investigate the effect of demonstration count (N-shot, corresponding to the top-K retrieved historical cases) on model performance and computational efficiency. Fig. 5 presents a unified view of all performance metrics (MAE, RMSE, R 2 , MAPE) with inference time encoded as a color-gradient intensity bar above the N-shot axis. As shown in Fig. 5, increasing the number of demonstrations consistently improves prediction accuracy across all metrics. Performance improvements are most pronounced from 3-shot to 8-shot: MAE decreases from 42.91 to 39.96 minutes (6.9% improvement), RMSE reduces AUTHOR et al.: TITLE9 TABLE I PERFORMANCE COMPARISON WITH MACHINE LEARNING METHODS Type Model SettingModelMAE ↓ RMSE ↓ R 2 ↑ MAPE (%) ↓ MLFull-Parameter Training SVR [55]44.6367.780.3030.51 Decision Tree [9]49.8070.200.2535.89 Gradient Boosting Trees [56]36.6149.850.6227.56 Bagging [35]36.1850.160.6226.58 Random Forest [10]35.0147.980.6526.11 Quantile Random Forest [34]33.80 47.650.6623.74 Linear Regression [57]41.1562.070.4230.35 Ridge Regression [58]40.9661.610.4230.23 XGBoost [11]34.7047.910.6525.17 LLMRAG-Based Few-Shot (Ours) HuatuoGPT-o1-7B [33]34.9849.590.6325.23 Qwen3-8B [31]35.1950.080.6225.39 Qwen3-32B [31]33.4347.570.6624.26 Note: Lower values are better for MAE, RMSE, and MAPE; higher values are better for R 2 . The best performance is highlighted in bold, and the second-best is underlined. TABLE IV ABLATION STUDY ON FEATURE ENCODING STRATEGIES ModelFeature Encoding MAE RMSE R 2 MAPE (%) Qwen3-8B Pure BERT40.8357.11 0.5030.24 Heterogeneous Encoder 39.96 56.27 0.5229.01 TABLE V ABLATION STUDY ON PCA-WEIGHTED RETRIEVAL ModelW/O PCA Weighting MAE RMSE R 2 MAPE (%) Qwen3-8B ✗39.5256.130.5429.13 ✓37.61 52.92 0.5827.74 Note: The checkmark (✓) indicates using prior statistics, while the cross (✗) indicates without prior statistics. Lower values are better for all metrics except R 2 . from 60.65 to 56.27 minutes, R 2 increases from 0.44 to 0.52, and MAPE decreases from 30.64% to 29.01%. Extending to 10-shot yields marginal additional gains—MAE further reduces to 39.90 minutes with MAPE reaching 28.93%—however, this comes at the cost of increased inference latency (from 2.30s at 8-shot to 2.50s at 10-shot, representing an 8.7% computational overhead). This performance plateau beyond 8-shot indicates diminishing returns once sufficient clinical context is provided, so we adopt 8-shot as the default configuration, achieving strong predictive performance (R 2 =0.52, MAPE=29.01%) while maintaining computational efficiency for practical deployment. 2) Heterogeneous Feature Encoding Ablation: We conduct an ablation study to evaluate the impact of feature encoding strategies on model performance. Specifically, we compare the performance of pure BERT encoding and our proposed heterogeneous encoder, which processes multimodal clinical data with customized encoders for each feature type. The results, as shown in Table IV, indicate that the heterogeneous encoder consistently outperforms the pure BERT encoder across all metrics. The MAE is reduced from 40.83 to 39.96, TABLE VI ABLATION STUDY ON THE EFFECT OF STATISTICAL PRIOR KNOWLEDGE ModelPrior Statistics MAE RMSE R 2 MAPE (%) Qwen3-8B ✗39.9656.270.5229.01 ✓37.61 52.92 0.5827.74 TABLE VII ABLATION STUDY ON THE EFFECT OF POST-PROCESSING ModelW/O Postprocess MAE RMSE R 2 MAPE (%) Qwen3-8B ✗39.9656.270.5229.01 ✓38.65 54.51 0.5527.78 RMSE decreases from 57.11 to 56.27, andR 2 increases from 0.50 to 0.52. The MAPE also improves from 30.24% to 29.01%, demonstrating that the heterogeneous encoding scheme provides more accurate and clinically relevant predictions compared to the pure BERT-based approach. 3) Ablation on PCA-Weighted Retrieval: To validate the importance of PCA weighting in PREBA’s retrieval mechanism, we compare against a uniform weighting baseline where all feature dimensions receive equal importance. As summarized in Table V, removing PCA weighting leads to a consistent degradation across all metrics compared with the full PREBA configuration. Specifically, the MAE increases from 37.61 to 39.52 minutes, RMSE rises from 52.92 to 56.13, R 2 drops from 0.58 to 0.54, and MAPE worsens from 27.74% to 29.13%. These results indicate that naïve similarity computation on concatenated heterogeneous features is suboptimal: high- dimensional or noisy attributes can dominate the distance metric and hinder the retrieval of clinically meaningful reference cases. In contrast, PCA-weighted retrieval leverages data-driven feature importance to better align the retrieval space with the underlying variance structure of the cohort, thereby improving the quality of retrieved exemplars and translating into more accurate and better calibrated duration predictions. 10IEEE TRANSACTIONS AND JOURNALS TEMPLATE 患者:男性,57岁 Patient: Male, 57 years 部门:乳腺甲状腺外科 Department: Breast and Thyroid Surgery 诊断:甲状腺结节 Diagnosis: Thyroid Nodule 手术信息:甲状腺全部切除术,择期手术 Surgery: Total Thyroidectomy, Elective 手术等级:四类,ASA等级:I级 Surgery Level: Class IV, ASA Grade: I 麻醉特征:静脉麻醉,维库溴铵、舒芬太尼、丙泊酚、瑞芬太尼、 依托咪酯 Anesthesia: Intravenous Anesthesia, Vecuronium Bromide, Sufentanil, Propofol, Remifentanil, Etomidate 术前访视:吸烟/酗酒/高血压10年/... Preoperative Assessment: Smoking/Alcohol/Hypertension 10 years... Query Case Sim: 0.989 Patient: Male, 53 years Department: Breast and Thyroid Surgery Diagnosis: Thyroid Nodule Surgery: Total Thyroidectomy + Parathyroid Autotransplantation, Elective Surgery Level: Class IV, ASA Grade: I Anesthesia: Intravenous Anesthesia, Vecuronium Bromide, Sufentanil, Propofol, Remifentanil, Etomidate Preoperative Assessment: Smoking/Alcohol/Cardiac stent implantation September 2020 ... 120min Sim: 0.986 Patient: Male, 49 years Department: Breast and Thyroid Surgery Diagnosis: Thyroid Nodule Surgery: Total Thyroidectomy, Elective Surgery Level: Class IV, ASA Grade: I Anesthesia: Intravenous Anesthesia, Sufentanil, Propofol, Remifentanil, Etomidate, Rocuronium Preoperative Assessment: Smoking/Alcohol/Left cervical lymph node dissection 3 years ago ... 150min Sim: 0.985 Patient: Male, 55 years Department: Breast and Thyroid Surgery Diagnosis: Thyroid Nodule Surgery: Total Thyroidectomy + Parathyroid Autotransplantation, Elective Surgery Level: Class IV, ASA Grade: I Anesthesia: Intravenous Anesthesia, Vecuronium Bromide, Sufentanil, Propofol, Remifentanil, Etomidate Preoperative Assessment: Smoking/Alcohol/No significant comorbidities ... 115min Sim: 0.973 Patient: Male, 51 years Department: Breast and Thyroid Surgery Diagnosis: Thyroid Nodule Surgery: Bilateral Thyroidectomy + Parathyroid Autotransplantation, Elective Surgery Level: Class IV, ASA Grade: I Anesthesia: Intravenous Anesthesia, Sufentanil, Propofol, Remifentanil, Etomidate, Rocuronium Preoperative Assessment: Smoking/Alcohol/Rhinitis/Cholecystectomy 5 years ago ... 130min Sim: 0.971 Patient: Male, 53 years Department: Breast and Thyroid Surgery Diagnosis: Thyroid Nodule Surgery: Hemithyroidectomy with Isthmusectomy, Elective Surgery Level: Class IV, ASA Grade: I Anesthesia: Intravenous Anesthesia, Vecuronium Bromide, Midazolam, Sufentanil, Propofol, Remifentanil, Etomidate Preoperative Assessment: Smoking/Alcohol/Tracheal softening test positive ... 145min Retrieved Feature Consistency: All retrieved cases: Breast and Thyroid Surgery All retrieved cases: Class IV, ASA Grade I Age proximity: Retrieved 49-55 years VS Query 57 years Procedures: Total/Hemithyroidectomy±Parathyroid Autotransplantation, Elective Anesthesia method: Intravenous Anesthesia ... Reference 95% CI: (121.16, 146.34), Range: [115, 155] Prediction: Ground True: 120 minutes130 minutes Retrieve Top-K=8 Fig. 6. Case study visualizations of PREBA on the in-hospital dataset using Qwen3-8B. The figure shows one query case (grey) and its top-8 retrieved historical surgeries (blue), together with their similarity scores and observed durations, illustrating how institution-specific evidence is assembled for the LLM. The bottom panel (yellow) summarizes feature consistency and reference 95% CI and ground-truth duration with the PREBA prediction. 35810 Post-processing Scale (N × Top-K) 35 40 45 50 55 60 MAE & RMSE (min) 39.65 40.23 38.87 38.65 56.29 57.20 55.18 54.51 MAE (min) RMSE (min) MAPE (%) R² 0.48 0.50 0.52 0.54 0.56 0.58 0.60 MAPE (%) & R² 28.61 28.41 28.17 27.78 0.52 0.54 0.54 0.55 Post-processing Scale Ablation Study: Performance Metrics (Qwen3-8B) Fig. 7. Ablation study on the effect of post-processing scale. 4) Ablation on Statistical Prior Knowledge: In this ablation study, we examine the effect of incorporating statistical prior knowledge on the model’s performance. Specifically, we compare the model’s performance with and without the inclusion of prior statistical values, which are derived from matching key attributes such as department, planned surgery name, and procedure level, thereby capturing institution-specific duration distributions at a clinically meaningful granularity. Table VI shows that incorporating prior statistical knowledge significantly improves the model’s performance. With prior knowledge, the MAE decreases from 39.96 to 37.61, RMSE improves from 56.27 to 52.92, andR 2 increases from 0.52 to 0.58. The MAPE also improves from 29.01% to 27.74%. These results highlight the importance of providing the model with a broader understanding of hospital-level patterns, allowing it to generate more accurate and reliable predictions. 135810 Number of Predictions (N) 35 40 45 50 55 MAE & RMSE (min) 37.67 35.73 35.08 35.28 35.39 52.55 51.45 49.77 49.63 49.71 2.3s7.12s11.68s18.77s23.27s MAE (min) RMSE (min) MAPE (%) R² Time (s) 0.56 0.57 0.58 0.59 0.60 0.61 0.62 0.63 0.64 0.65 MAPE (%) & R² 27.40 25.32 25.30 25.71 25.84 0.58 0.60 0.62 0.630.63 Multi-Round Prediction Ablation Study: Performance & Inference Time (Qwen3-8B) Fig. 8. Ablation study on the effect of multi-round prediction. 5) Ablation Study on Retrieval Post-processing: In this ab- lation study, we investigate the impact of post-processing on model performance. The post-processing step addresses the potential presence of outliers or clinically irrelevant cases in the Top-K retrieved samples, which can arise due to patient- specific factors or random events during surgery. To mitigate this, we introduce a scaled retrieval pool, expanding the Top-K retrieval by a factor ofN(i.e.,N×Top-K), allowing the model to select more relevant cases after filtering out anomalies. As shown in Table VII, post-processing reduces MAE by 3.3% (39.96→38.65) and improves R 2 from 0.52 to 0.55. These results highlight the importance of filtering and refining the retrieved cases to ensure more accurate predictions. Further analysis of the expansion scale (Fig. 7) reveals that increasing Nfrom 3 to 10 yields progressive improvements, withN = 10 achieving the optimal balance between candidate pool diversity AUTHOR et al.: TITLE11 TABLE VIII ABLATION STUDY ON MODEL SCALE Model Model Size Performance Metrics Time(s) MAE RMSE R 2 MAPE (%) Qwen3 4B35.9950.420.6126.629.24 8B35.1950.080.6225.3911.68 14B34.8149.130.6325.6018.43 32B33.43 47.57 0.6624.2626.51 TABLE IX ABLATION STUDY ON PREDICTION AGGREGATION STRATEGIES ModelStrategyMAE RMSE R 2 MAPE (%) Qwen3-8B Median36.5951.150.6026.70 Majority Voting36.9551.700.5927.01 Quantile Average36.5250.970.6126.71 Simple Average36.5751.000.61 26.83 Bayesian Average (Ours) 35.19 50.08 0.6225.39 HuatuoGPT-o1 Median36.3350.600.6126.58 Majority Voting36.5050.830.6126.65 Quantile Average36.0750.160.6226.46 Simple Average36.0550.080.6226.51 Bayesian Average (Ours) 34.98 49.59 0.6325.23 and filtering effectiveness. This demonstrates that our clinical consistency checks successfully eliminate anomalous cases while preserving clinically relevant references. 6) Ablation Study on Multi-Round Prediction: To compre- hensively explore the LLM’s output space while maintaining computational efficiency, we investigate the effect of generating multiple predictions per query through controlled temperature variation. Under identical configuration parameters (including 8-shot demonstrations), we produceNpredictions by varying the sampling temperature: the first round uses deterministic sampling (τ = 0), while subsequent rounds employ stochastic sampling withτ ∼ U (0.05, 0.4). As quantified in Table 8, increasingNfrom 1 to 5 yields substantial improvements, with MAE decreasing by 6.9% (37.67→35.08) and R 2 improving from 0.58 to 0.62. This demonstrates that probabilistic explo- ration effectively captures the model’s reasoning uncertainty and enhances prediction robustness. However, further increasing toN = 8or10provides only marginal gains (MAE: 35.28-35.39) while approximately doubling the inference time compared toN = 5. The negligible improvement beyond N = 5indicates saturation in output space coverage. We therefore selectN = 5as the optimal operating point, balancing thorough output exploration with practical inference costs for clinical deployment. 7) Ablation Study on Model Scale: In this ablation study, we investigate the impact of model size on the performance of the proposed framework. We evaluate variants of the Qwen3 model with different parameter sizes, ranging from 4B to 32B, and assess the performance under the same configuration with 5 repeated 8-shot predictions. As shown in Table VIII, a clear scaling trend emerges: larger models consistently achieve superior prediction accuracy across all metrics, suggesting that increased model capacity confers stronger utilization of retrieved evidence and statistical priors within the RAG pipeline. TABLE X ABLATION STUDY ON THE PRIOR WEIGHT OF BAYESIAN AVERAGING ModelPrior Weight MAE RMSE R 2 MAPE (%) HuatuoGPT-o1 0.335.4449.48 0.6325.93 0.635.09 49.36 0.6325.51 0.934.9849.59 0.6325.23 1.235.08 50.070.6225.07 1.535.3450.730.6124.99 The 32B parameter model delivers the best performance (MAE: 33.43, R 2 : 0.66), representing a 7.1% MAE reduction compared to the 4B variant. In addition, R 2 improves from 0.61 (4B) to 0.66 (32B), indicating a better overall fit to the underlying distribution of surgical durations. The observed accuracy gains coincide with increased computational requirements, as inference time grows by 187% from 4B to 32B. This trade-off highlights that, although larger models are more accurate, their deployment in real-time clinical environments may be constrained by latency and resource considerations. Among the evaluated scales, the 8B model presents a favorable balance, achieving 85% of the 32B model’s performance improvement while maintaining practical inference speed for clinical deployment scenarios. 8) Ablation Study on Aggregation Strategies: We evaluate the effectiveness of our Bayesian aggregation against conventional statistical methods for combining multiple LLM predictions. As demonstrated in Table IX, the proposed Bayesian ap- proach consistently outperforms pure statistical aggregators across both model architectures. For Qwen3-8B, Bayesian aggregation achieves a MAE of 35.19, representing 3.6- 4.8% improvement over statistical baselines. This performance advantage stems from incorporating clinical prior knowledge through the Bayesian framework, which prevents biologically implausible predictions by anchoring results to medically credible ranges. To determine the optimal prior strength, we conduct sensitivity analysis on the prior weight parameter (Table X). Results indicate stable performance across weights from 0.6 to 0.9, with the latter achieving the best MAE (34.98) while maintaining balanced performance across other metrics. This weight configuration effectively balances between LLM- generated evidence and clinical priors, demonstrating robust integration of statistical predictions with the clinical priors. V. CONCLUSION We propose a retrieval-augmented framework that grounds LLM predictions in clinically relevant historical cases and population priors for surgical duration prediction. The method comprises two key components: (1) PCA-weighted retrieval to identify semantically similar cases, and (2) Bayesian aggregation to combine LLM outputs with clinical priors. Evaluated on two real-world clinical datasets with Qwen, DeepSeek, and HuatuoGPT-o1, our training-free approach achieves performance competitive with supervised machine learning while substantially outperforming zero-shot LLM inference, demonstrating both empirical effectiveness and practical applicability in real-world clinical applications. 12IEEE TRANSACTIONS AND JOURNALS TEMPLATE REFERENCES [1] F. Dexter, R. H. Epstein, R. D. Traub, Y. Xiao, and D. C. Warltier, “Making management decisions on the day of surgery based on operating room efficiency and patient waiting times,” Anesthesiology, vol. 101, no. 6, p. 1444–1453, 2004. [2] D. M. Laskin, A. O. Abubaker, and R. A. Strauss, “Accuracy of predicting the duration of a surgical operation,” Journal of Oral and Maxillofacial Surgery, vol. 71, no. 2, p. 446–447, 2013. [3] K. Wang, L. Z. Yan, W. Z. Li, C. Jiang, N. N. Wang, Q. Zheng, N. G. Dong, and J. W. Shi, “Comparison of four machine learning techniques for prediction of intensive care unit length of stay in heart transplantation patients,” Frontiers in Cardiovascular Medicine, vol. 9, p. 863642, 2022. [4]O. Martinez, C. Martinez, C. A. Parra, S. Rugeles, and D. R. Suarez, “Machine learning for surgical time prediction,” Computer Methods and Programs in Biomedicine, vol. 208, p. 106220, 2021. [5]D. R. Roque, K. Robison, C. A. Raker, G. G. Wharton, and G. N. Frishman, “The accuracy of surgeons’ provided estimates for the duration of hysterectomies: a pilot study,” Journal of minimally invasive gynecology, vol. 22, no. 1, p. 57–65, 2015. [6] C. T. Strömblad, R. G. Baxter-King, A. Meisami, S.-J. Yee, M. R. Levine, A. Ostrovsky, D. Stein, A. Iasonos, M. R. Weiser, J. Garcia-Aguilar et al., “Effect of a predictive model on planned surgical duration accuracy, patient wait time, and use of presurgical resources: a randomized clinical trial,” JAMA surgery, vol. 156, no. 4, p. 315–321, 2021. [7]Y. Jiao, B. Xue, C. Lu, M. S. Avidan, and T. Kannampallil, “Continuous real-time prediction of surgical case duration using a modular artificial neural network,” British journal of anaesthesia, vol. 128, no. 5, p. 829– 837, 2022. [8]V. Riahi, H. Hassanzadeh, S. Khanna, J. Boyle, F. Syed, B. Biki, E. Borkwood, and L. Sweeney, “Improving preoperative prediction of surgery duration,” BMC Health Services Research, vol. 23, no. 1, p. 1343, 2023. [9]—, “Improving preoperative prediction of surgery duration,” BMC Health Services Research, vol. 23, no. 1, p. 1343, 2023. [10] S. J. Rigatti, “Random forest,” Journal of insurance medicine, vol. 47, no. 1, p. 31–39, 2017. [11] M. Kwong, M. Noorchenarboo, K. Grolinger, J. Hawel, C. M. Schlachta, and A. Elnahas, “Optimizing surgical efficiency: predicting case duration of common general surgery procedures using machine learning,” Surgical Endoscopy, p. 1–8, 2025. [12]X. Li, Y. Zhan, J. Ni, F. Cai, H. Jin, X. Lin, Y. Zhang, and D. Tao, “Multimodal feature analysis for surgery duration predication,” in Proceed- ings of the 2024 16th International Conference on Bioinformatics and Biomedical Technology, 2024, p. 188–195. [13]J. Wang, J. X. Huang, X. Tu, J. Wang, A. J. Huang, M. T. R. Laskar, and A. Bhuiyan, “Utilizing bert for information retrieval: Survey, applications, resources, and challenges,” ACM Computing Surveys, vol. 56, no. 7, p. 1–33, 2024. [14]D. Azriel, Y. Rinott, O. Tal, B. Abbou, and N. Rappoport, “Surgery duration prediction using multi-task feature selection,” IEEE Journal of Biomedical and Health Informatics, vol. 28, no. 7, p. 4216–4223, 2024. [15]P. Kumar, “Large language models (llms): survey, technical frameworks, and future challenges,” Artificial Intelligence Review, vol. 57, no. 10, p. 260, 2024. [16]S. Wang, L. Zhang, W. Wu, T. Qin, X. Zhang, and J. Liu, “Alignment- guided self-supervised learning for diagram question answering,” IEEE Transactions on Multimedia, vol. 27, p. 2141–2154, 2025. [17]K. Li, B. Yu, Q. Zheng, Y. Zhan, Y. Zhang, T. Zhang, Y. Yang, Y. Chen, L. Sun, Q. Cao et al., “Muep: A multimodal benchmark for embodied planning with foundation models [c],” in Intemational Joint Conferences on Artificial Intelligence. IJCAI, 2024, p. 129–138. [18]Q. Peng, J. Li, S. Huang, Y. Jiang, K. Gong, R. Ding, S. Ye, C. Zheng, X.-Y. Wei, and Q. Li, “Aligning clinical needs and ai capabilities: A survey on llms for medical reasoning,” Authorea Preprints, 2025. [19]M. Xu, Z. Huang, J. Zhang, X. Zhang, and Q. Dou, “Surgical action planning with large language models,” in International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer, 2025, p. 563–572. [20]A. Moglia, K. Georgiou, P. Cerveri, L. Mainardi, R. M. Satava, and A. Cuschieri, “Large language models in healthcare: from a systematic review on medical examinations to a comparative analysis on fundamentals of robotic surgery online test,” Artificial Intelligence Review, vol. 57, no. 9, p. 231, 2024. [21] A. Ramamurthi, B. Neupane, P. Deshpande, R. Hanson, K. R. Brown, K. K. Christians, D. B. Evans, and A. N. Kothari, “Development and validation of an artificial intelligence system for surgical case length prediction,” Surgery, vol. 179, p. 108942, 2025. [22] A. Balaguer, V. Benara, R. L. d. F. Cunha, T. Hendry, D. Holstein, J. Marsman, N. Mecklenburg, S. Malvar, L. O. Nunes, R. Padilha et al., “Rag vs fine-tuning: pipelines, tradeoffs, and a case study on agriculture,” arXiv preprint arXiv:2401.08406, 2024. [23]K. Li, Y. Zhan, H. Jin, C. Qi, X. Lin, and B. Yu, “Cross-sample augmented test-time adaptation for personalized intraoperative hypotension prediction,” arXiv preprint arXiv:2512.15762, 2025. [24] X. Xu, J. Deng, N. Cummins, Z. Zhang, L. Zhao, and B. W. Schuller, “Exploring zero-shot emotion recognition in speech using semantic- embedding prototypes,” IEEE Transactions on Multimedia, vol. 24, p. 2752–2765, 2022. [25]H. Elayan, M. Sperrin, G. P. Martin, N. Peek, F. Braunschweig, J. Faxén, J. Alfredsson, and D. A. Jenkins, “Correcting for case-mix shift when developing clinical prediction models,” BMC Medical Research Methodology, vol. 25, no. 1, p. 186, 2025. [26]W. Fan, Y. Ding, L. Ning, S. Wang, H. Li, D. Yin, T.-S. Chua, and Q. Li, “A survey on rag meeting llms: Towards retrieval-augmented large language models,” in Proceedings of the 30th ACM SIGKDD conference on knowledge discovery and data mining, 2024, p. 6491–6501. [27] F. Neha, D. Bhati, and D. K. Shukla, “Retrieval-augmented generation (rag) in healthcare: A comprehensive review,” AI, vol. 6, no. 9, p. 226, 2025. [28]K. Li, Q. Zheng, Y. Zhan, C. Zhang, T. Zhang, X. Lin, C. Qi, L. Li, and D. Tao, “Alleviating action hallucination for llm-based embodied agents via inner and outer alignment,” in 2024 7th International Conference on Pattern Recognition and Artificial Intelligence (PRAI).IEEE, 2024, p. 613–621. [29]A. Ma ́ ckiewicz and W. Ratajczak, “Principal components analysis (pca),” Computers & Geosciences, vol. 19, no. 3, p. 303–342, 1993. [30]T. M. Fragoso, W. Bertoli, and F. Louzada, “Bayesian model averaging: A systematic review and conceptual classification,” International Statistical Review, vol. 86, no. 1, p. 1–28, 2018. [31]A. Yang, A. Li, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Gao, C. Huang, C. Lv et al., “Qwen3 technical report,” arXiv preprint arXiv:2505.09388, 2025. [32]D. Guo, D. Yang, H. Zhang, J. Song, R. Zhang, R. Xu, Q. Zhu, S. Ma, P. Wang, X. Bi et al., “Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning,” arXiv preprint arXiv:2501.12948, 2025. [33]J. Chen, Z. Cai, K. Ji, X. Wang, W. Liu, R. Wang, and B. Wang, “Towards medical complex reasoning with llms through medical verifiable problems,” in Findings of the Association for Computational Linguistics: ACL 2025, 2025, p. 14 552–14 573. [34]A. Dean, A. Meisami, H. Lam, M. P. Van Oyen, C. Stromblad, and N. Kastango, “Quantile regression forests for individualized surgery scheduling,” Health Care Management Science, vol. 25, no. 4, p. 682–709, 2022. [35]R. A. Gabriel, B. Harjai, S. Simpson, A. L. Du, J. L. Tully, O. George, and R. Waterman, “An ensemble learning approach to improving prediction of case duration for spine surgery: algorithm development and validation,” JMIR Perioperative Medicine, vol. 6, p. e39650, 2023. [36]D. Li and S. Rahardja, “Rethinking affine transform for efficient image enhancement: A color space perspective,” IEEE Transactions on Multimedia, vol. 27, p. 2194–2205, 2025. [37]W. Liu, B. Miao, J. Cao, X. Zhu, J. Ge, B. Liu, M. Nasim, and A. Mian, “Context-enhanced video moment retrieval with large language models,” IEEE Transactions on Multimedia, vol. 27, p. 6296–6306, 2025. [38]J. Yang, H. Jin, R. Tang, X. Han, Q. Feng, H. Jiang, S. Zhong, B. Yin, and X. Hu, “Harnessing the power of llms in practice: A survey on chatgpt and beyond,” ACM Transactions on Knowledge Discovery from Data, vol. 18, no. 6, p. 1–32, 2024. [39]C. Lai, W. Ge, and X. Xue, “Cross-modal complementary learning and template-based reasoning chains for future event prediction in videos,” IEEE Transactions on Multimedia, vol. 27, p. 7497–7509, 2025. [40]Y. Yang, T. Zhou, K. Li, D. Tao, L. Li, L. Shen, X. He, J. Jiang, and Y. Shi, “Embodied multi-modal agent trained by an llm from a parallel textworld,” in Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2024, p. 26 275–26 285. [41]A. Ramamurthi, B. Neupane, P. Deshpande, R. Hanson, S. Vegesna, D. Cray, B. H. Crotty, M. Somai, K. R. Brown, S. S. Pawar et al., “Applying large language models for surgical case length prediction,” JAMA surgery, vol. 160, no. 8, p. 894–902, 2025. AUTHOR et al.: TITLE13 [42]K. Li, Y. Zhan, H. Jin, C. Qi, X. Lin, and B. Yu, “Cross-sample augmented test-time adaptation for personalized intraoperative hypotension prediction,” arXiv preprint arXiv:2512.15762, 2025. [43]F. Aldi, F. Hadi, N. A. Rahmi, and S. Defit, “Standardscaler’s potential in enhancing breast cancer accuracy using machine learning,” Journal of Applied Engineering and Technological Science (JAETS), vol. 5, no. 1, p. 401–413, 2023. [44]K. Dashdondov, S.-M. Lee, and M.-H. Kim, “Ordinalencoder and pca based nb classification for leaked natural gas prediction using iot based remote monitoring system,” in Advances in Intelligent Information Hiding and Multimedia Signal Processing: Proceeding of the 16th International Conference on IIHMSP in conjunction with the 13th international conference on FITAT, November 5-7, 2020, Ho Chi Minh City, Vietnam, Volume 2. Springer, 2021, p. 252–259. [45]Z. Lv, H. Ding, L. Wang, and Q. Zou, “A convolutional neural network using dinucleotide one-hot encoder for identifying dna n6-methyladenine sites in the rice genome,” Neurocomputing, vol. 422, p. 214–221, 2021. [46]Q. Zhang, H. Lu, H. Sak, A. Tripathi, E. McDermott, S. Koo, and S. Kumar, “Transformer transducer: A streamable speech recognition model with transformer encoders and rnn-t loss,” in ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2020, p. 7829–7833. [47]S. R. S. P. Malladi, S. Ram, and J. J. Rodríguez, “Image denoising using superpixel-based pca,” IEEE Transactions on Multimedia, vol. 23, p. 2297–2309, 2021. [48] M. Greenacre, P. J. Groenen, T. Hastie, A. I. d’Enza, A. Markos, and E. Tuzhilina, “Principal component analysis,” Nature Reviews Methods Primers, vol. 2, no. 1, p. 100, 2022. [49]M. Douze, A. Guzhva, C. Deng, J. Johnson, G. Szilvasy, P.-E. Mazaré, M. Lomeli, L. Hosseini, and H. Jégou, “The faiss library,” IEEE Transactions on Big Data, 2025. [50]R. P. Srivastava, “A new measure of similarity in textual analysis: Vector similarity metric versus cosine similarity metric,” Journal of Emerging Technologies in Accounting, vol. 20, no. 1, p. 77–90, 2023. [51]X. Wan, W. Wang, J. Liu, and T. Tong, “Estimating the sample mean and standard deviation from the sample size, median, range and/or interquartile range,” BMC medical research methodology, vol. 14, no. 1, p. 135, 2014. [52]L. Chen, J. Davis, B. Hanin, P. Bailis, I. Stoica, M. Zaharia, and J. Zou, “Are more llm calls all you need? towards the scaling properties of compound ai systems,” Advances in Neural Information Processing Systems, vol. 37, p. 45 767–45 790, 2024. [53]H. Yang, M. Li, H. Zhou, Y. Xiao, Q. Fang, and R. Zhang, “One llm is not enough: Harnessing the power of ensemble learning for medical question answering,” medRxiv, 2023. [54]X. Chai, Y. Li, L. Qiao, and Y. Liu, “Terrain-aided navigation based on sequential multiple distribution estimation filter: Theory and experiment,” IEEE/ASME Transactions on Mechatronics, p. 1–9, 2025. [55]O. Martinez, C. Martinez, C. A. Parra, S. Rugeles, and D. R. Suarez, “Machine learning for surgical time prediction,” Computer Methods and Programs in Biomedicine, vol. 208, p. 106220, 2021. [56]R. A. Gabriel, B. Harjai, S. Simpson, A. L. Du, J. L. Tully, O. George, and R. Waterman, “An ensemble learning approach to improving prediction of case duration for spine surgery: algorithm development and validation,” JMIR Perioperative Medicine, vol. 6, p. e39650, 2023. [57] E. R. Edelman, S. M. Van Kuijk, A. E. Hamaekers, M. J. De Korte, G. G. Van Merode, and W. F. Buhre, “Improving the prediction of total surgical procedure time using linear regression modeling,” Frontiers in medicine, vol. 4, p. 85, 2017. [58]B. Zhao, R. S. Waterman, R. D. Urman, and R. A. Gabriel, “A machine learning approach to predicting case duration for robot-assisted surgery,” Journal of medical systems, vol. 43, no. 2, p. 32, 2019. [59]W. Kwon, Z. Li, S. Zhuang, Y. Sheng, L. Zheng, C. H. Yu, J. Gonzalez, H. Zhang, and I. Stoica, “Efficient memory management for large language model serving with pagedattention,” in Proceedings of the 29th symposium on operating systems principles, 2023, p. 611–626. [60] Y. Zheng, R. Zhang, J. Zhang, Y. Ye, Z. Luo, Z. Feng, and Y. Ma, “Llamafactory: Unified efficient fine-tuning of 100+ language models,” in Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations). Bangkok, Thailand: Association for Computational Linguistics, 2024.