DOI: https://doi.org/10.3389/frai.2025.1668172
PMID: https://pubmed.ncbi.nlm.nih.gov/41676168
تاريخ النشر: 2026-01-27
المؤلف: Lebede Ngartera وآخرون
الموضوع الرئيسي: نمذجة الموضوعات
نظرة عامة
تقدم البحث نظام استرجاع معزز بالتوليد بايزي (RAG)، وهو إطار عمل جديد مصمم لتعزيز موثوقية نماذج اللغة الكبيرة في التحليل المالي عالي المخاطر من خلال دمج قياس عدم اليقين في عملية الاسترجاع. غالبًا ما تنتج أنظمة RAG التقليدية مخرجات مفرطة الثقة وغير صحيحة من الناحية الواقعية، خاصة في السياقات المالية المعقدة، مما يؤدي إلى مخاطر كبيرة مثل انتهاكات اللوائح والخسائر المالية. يعالج RAG بايزي هذه المشكلة من خلال استخدام إسقاط مونت كارلو لحساب تضمينات التوزيع للاستفسارات والمستندات، مما يؤدي إلى دالة تسجيل بايزية \( S_i = \mu_i – \lambda \cdot \sigma_i \) التي توازن بشكل فعال بين الصلة الدلالية وعدم اليقين.
تظهر التقييمات التجريبية على تقارير 10-K لعام 2023 لشركتي آبل ومايكروسوفت أن RAG بايزي يحقق دقة ملحوظة تبلغ 93.1%، مع تحسينات ملحوظة في Precision@3 (+20.6%)، ومتوسط الترتيب العكسي (MRR) (+22.7%)، ومكسب تراكمي مخفض مُعدل (NDCG@10) (+25.4%) مقارنة بأسس BM25 التقليدية. بالإضافة إلى ذلك، يعزز الإطار من معايرة عدم اليقين بنسبة 26.8% ويقلل بشكل كبير من معدلات الهلوسة بنسبة 27.8%، مما ينجح في استخراج أرقام مالية دقيقة. تم تصميم التنفيذ لنشر فعال، مع الحفاظ على زمن استجابة قدره 15 مللي ثانية أثناء معالجة 20.8 استفسار في الثانية، مما يضمن أن قياس عدم اليقين لا يضر بالكفاءة التشغيلية. يثبت هذا العمل ضرورة قياس عدم اليقين المعرفي في أنظمة الذكاء الاصطناعي، خاصة في قطاعات مثل المالية والرعاية الصحية، حيث تكون المساءلة والقدرة على الشرح أمرين حاسمين.
مقدمة
تناقش مقدمة ورقة البحث ظهور نظام استرجاع معزز بالتوليد (RAG) كخطوة مهمة في تعزيز نماذج اللغة الكبيرة من خلال دمج المعرفة الخارجية، خاصة في الإجابة على الأسئلة في المجالات المفتوحة والحقول المتخصصة مثل التحليل المالي. على الرغم من القدرات المثيرة للإعجاب لنماذج الأساس مثل GPT-3، إلا أنها عرضة للهلوسات، مما يمكن أن يقوض الثقة في أنظمة الذكاء الاصطناعي. تواجه أنظمة RAG التقليدية تحديات بسبب اعتمادها على تضمينات حتمية دون تقديرات للثقة، مما يشكل مخاطر في البيئات عالية المخاطر مثل المالية حيث يمكن أن تؤدي الأخطاء إلى عواقب وخيمة.
لمعالجة هذه القيود، يقترح المؤلفون إطار عمل جديد يسمى RAG بايزي، الذي يدمج عدم اليقين المعرفي في تسجيل الاسترجاع من خلال نهج احتمالي. يستخدم هذا الإطار إسقاط مونت كارلو لتقدير عدم اليقين في كل من تضمينات الاستفسار والمستندات، مما يؤدي إلى دالة تسجيل \( S_i = \mu_i – \lambda \cdot \sigma_i \)، حيث تمثل \( \mu_i \) الصلة الدلالية، و\( \sigma_i \) تلتقط عدم اليقين المعرفي، و\( \lambda \) يسمح بضبط المخاطر. تظهر التقييمات التجريبية على المستندات المالية الواقعية، وتحديدًا تقارير 10-K لعام 2023 لشركة آبل وشركة مايكروسوفت، تحسينات كبيرة في مقاييس الاسترجاع ومعايرة عدم اليقين، مما يعزز بشكل كبير موثوقية أنظمة الذكاء الاصطناعي في بيئات الإنتاج. توضح الورقة خمس مساهمات رئيسية، بما في ذلك إطار نظري لاسترجاع واعٍ بعدم اليقين، وابتكارات منهجية، والتحقق التجريبي، مع التأكيد على قابلية تطبيق الإطار عبر مجالات عالية المخاطر متنوعة.
الطرق
تحدد قسم ورقة البحث المنهجية المستخدمة في نظام استرجاع معزز بالتوليد بايزي (RAG)، الذي يعزز RAG التقليدي من خلال نمذجة التشابه بشكل احتمالي باستخدام إسقاط مونت كارلو. يتم حساب التشابه بين استفسار $q$ وسياق $c_i$ كالتالي: $\mu_i = \frac{1}{n} \sum_{j=1}^{n} \cos(\phi^{(j)}(q), \phi^{(j)}(c_i))$ مع تباين $\sigma^2_i = \frac{1}{n} \sum_{j=1}^{n} (\cos(\phi^{(j)}(q), \phi^{(j)}(c_i)) – \mu_i)^2$. توازن دالة التسجيل البايزية بين الصلة وعدم اليقين، وتمثل كالتالي: $S_i = \mu_i – \lambda \cdot \sigma_i$، حيث أن $\lambda$ هو معلمة العقوبة. تستند منهجية التقييم إلى توافق الخبراء (κ لـ كوهين = 0.87) وتستخدم مقاييس مختلفة، بما في ذلك Precision@3 ومتوسط الترتيب العكسي (MRR)، عبر أنظمة أساسية متعددة.
تظهر النتائج التجريبية تفوق نهج RAG بايزي، حيث تحقق AUC-ROC قدره 0.851، وهو تحسين ذو دلالة إحصائية بنسبة 11.7% مقارنة بأساس RAG القياسي (0.762، p < 0.001). بالإضافة إلى ذلك، فإن دمج GPT مع RAG بايزي يحقق أعلى أداء (AUC-ROC قدره 0.961)، مما يبرز الفوائد التراكمية لقياس عدم اليقين ودمج نماذج اللغة الكبيرة. تكشف تحليل مقارن لطرق قياس عدم اليقين أن إسقاط مونت كارلو يقدم أفضل توازن بين الدقة والكفاءة، مع زمن استجابة قدره 15 مللي ثانية، متفوقًا على البدائل مثل الفرق العميق والاستدلال التبايني من حيث السرعة ومتطلبات الموارد.
النتائج
توفر نتائج الدراسة تقييمًا شاملاً لنموذج استرجاع معزز بالتوليد بايزي (RAG)، مما يبرز فعاليته عبر عدة أبعاد: دقة الاسترجاع، ومعايرة عدم اليقين، والكفاءة الحسابية. تشير النتائج إلى أن RAG بايزي يتفوق على الطرق التقليدية في هذه المجالات، مما يظهر إمكاناته لأداء معزز في التطبيقات العملية.
تلخص الجدول 6 مؤشرات الأداء الرئيسية لأربعة تكوينات نموذجية مختلفة، مما يحدد بوضوح النهج الأمثل لكل مقياس تقييم. تؤكد هذه التركيبة من النتائج على مزايا RAG بايزي، خاصة من حيث دقة استرجاعه وقدرته على معايرة عدم اليقين، مع الحفاظ أيضًا على الكفاءة الحسابية.
المناقشة
في هذا القسم، يضع المؤلفون مساهماتهم في أنظمة الاسترجاع المعزز بالتوليد (RAG) في سياق تاريخي من خلال مراجعة تطور طرق الاسترجاع، مع تسليط الضوء على التقنيات الأساسية، والتعديلات الخاصة بالمجالات، والتطورات الأخيرة في قياس عدم اليقين. يحددون القيود في أنظمة RAG التقليدية، خاصة الاعتماد على التضمينات الحتمية التي تفشل في قياس ثقة الاسترجاع، وهو أمر حاسم في التطبيقات عالية المخاطر. يقترح المؤلفون إطار عمل بايزي يدمج قياس عدم اليقين مباشرة في عملية الاسترجاع، مميزًا إياه عن الطرق الحالية التي تعالج عدم اليقين كقضية معالجة لاحقة.
يستعرض المؤلفون تقدم إطار عملهم مقارنة بالنهج السابقة لـ RAG بايزي، مع التركيز على أربعة عوامل تمييز رئيسية: قياس عدم اليقين المشترك لكل من تضمينات الاستفسار والمستندات، وعدم اليقين المدمج في دالة التسجيل، والتحقق على مستندات مالية واقعية، وأساس نظري قوي لعقوبة عدم اليقين. يظهرون أن إطار عمل RAG بايزي الخاص بهم يحافظ على أداء قوي عبر أنواع مستندات متنوعة وتعقيدات استفسارية بينما يقدم الحد الأدنى من زيادة زمن الاستجابة مقارنة بأنظمة RAG القياسية. تدعم الصياغة الرياضية لنهجهم، بما في ذلك قياس عدم اليقين المشترك وتحليل المعلومات المتبادلة، فعالية طريقتهم في تعزيز دقة الاسترجاع والمعايرة، خاصة في المجالات عالية المخاطر مثل المالية والرعاية الصحية.
القيود
في قسم القيود، يقيم المؤلفون بشكل نقدي قيود نظام RAG بايزي، على الرغم من فعاليته المثبتة مقارنة بالطرق التقليدية للاسترجاع. تشمل القيود الرئيسية تحديات حسابية وقابلية التوسع كبيرة. تتراوح متطلبات الذاكرة للنظام من 2.8 جيجابايت للتطبيقات المتوسطة الحجم إلى 170 جيجابايت لقطع المستندات الأكبر، مما يشير إلى صعوبات محتملة في التعامل مع مجموعات مستندات كبيرة جدًا دون اللجوء إلى الحوسبة الموزعة أو حلول التخزين الأكثر كفاءة.
بالإضافة إلى ذلك، فإن الاعتماد على إسقاط مونت كارلو يقدم عبئًا حسابيًا بسبب الحاجة إلى عدة تمريرات للأمام (افتراضيًا $n = 10$)، مما يمكن أن يؤثر على زمن استجابة الاستفسار. على الرغم من أن النظام يحقق زمن استجابة جاهز للإنتاج قدره 15 مللي ثانية، قد تحتاج المؤسسات التي لديها متطلبات زمن استجابة صارمة إلى موازنة فوائد جودة عدم اليقين مقابل متطلبات زمن الاستجابة. تسلط هذه القيود الضوء على الحاجة إلى مزيد من البحث لتعزيز قابلية التوسع وكفاءة أنظمة الاسترجاع الواعية بعدم اليقين.
DOI: https://doi.org/10.3389/frai.2025.1668172
PMID: https://pubmed.ncbi.nlm.nih.gov/41676168
Publication Date: 2026-01-27
Author(s): Lebede Ngartera et al.
Primary Topic: Topic Modeling
Overview
The research introduces Bayesian Retrieval-Augmented Generation (RAG), a novel framework designed to enhance the reliability of large language models in high-stakes financial analysis by integrating uncertainty quantification into the retrieval process. Traditional RAG systems often produce overconfident and factually incorrect outputs, particularly in complex financial contexts, leading to significant risks such as regulatory violations and financial losses. Bayesian RAG addresses this issue by employing Monte Carlo Dropout to compute distributional embeddings for queries and documents, resulting in a Bayesian scoring function \( S_i = \mu_i – \lambda \cdot \sigma_i \) that effectively balances semantic relevance with uncertainty.
Empirical evaluations on 2023 10-K reports for Apple and Microsoft reveal that Bayesian RAG achieves a remarkable accuracy of 93.1%, with notable improvements in Precision@3 (+20.6%), Mean Reciprocal Rank (MRR) (+22.7%), and Normalized Discounted Cumulative Gain (NDCG@10) (+25.4%) compared to traditional BM25 baselines. Additionally, the framework enhances uncertainty calibration by 26.8% and significantly reduces hallucination rates by 27.8%, successfully extracting precise financial figures. The implementation is designed for efficient deployment, maintaining a latency of 15 ms while processing 20.8 queries per second, thus ensuring that uncertainty quantification does not compromise operational efficiency. This work establishes the necessity of epistemic uncertainty quantification in AI systems, particularly in sectors like finance and healthcare, where accountability and explainability are critical.
Introduction
The introduction of the research paper discusses the emergence of Retrieval-Augmented Generation (RAG) as a significant advancement in enhancing large language models by incorporating external knowledge, particularly in open-domain question answering and specialized fields like financial analysis. Despite the impressive capabilities of foundation models such as GPT-3, they are susceptible to hallucinations, which can undermine trust in AI systems. Traditional RAG systems face challenges due to their reliance on deterministic embeddings without confidence estimates, posing risks in high-stakes environments like finance where inaccuracies can lead to severe consequences.
To address these limitations, the authors propose a novel framework called Bayesian RAG, which integrates epistemic uncertainty into retrieval scoring through a probabilistic approach. This framework employs Monte Carlo Dropout to estimate uncertainty in both query and document embeddings, resulting in a scoring function \( S_i = \mu_i – \lambda \cdot \sigma_i \), where \( \mu_i \) represents semantic relevance, \( \sigma_i \) captures epistemic uncertainty, and \( \lambda \) allows for risk-adjusted tuning. The empirical evaluation on real-world financial documents, specifically the 2023 10-K reports of Apple Inc. and Microsoft Corporation, demonstrates substantial improvements in retrieval metrics and uncertainty calibration, significantly enhancing the reliability of AI systems in production settings. The paper outlines five principal contributions, including a theoretical framework for uncertainty-aware retrieval, methodological innovations, and empirical validation, emphasizing the framework’s applicability across various high-stakes domains.
Methods
The research paper section outlines the methodology employed in a Bayesian Retrieval-Augmented Generation (RAG) system, which enhances traditional RAG by modeling similarity probabilistically using Monte Carlo Dropout. The similarity between a query $q$ and context $c_i$ is computed as $\mu_i = \frac{1}{n} \sum_{j=1}^{n} \cos(\phi^{(j)}(q), \phi^{(j)}(c_i))$ with variance $\sigma^2_i = \frac{1}{n} \sum_{j=1}^{n} (\cos(\phi^{(j)}(q), \phi^{(j)}(c_i)) – \mu_i)^2$. The Bayesian scoring function balances relevance and uncertainty, represented as $S_i = \mu_i – \lambda \cdot \sigma_i$, where $\lambda$ is a penalty parameter. The evaluation methodology is grounded in expert consensus (Cohen’s κ = 0.87) and employs various metrics, including Precision@3 and Mean Reciprocal Rank (MRR), across multiple baseline systems.
The experimental results demonstrate the superiority of the Bayesian RAG approach, achieving an AUC-ROC of 0.851, which is a statistically significant improvement of 11.7% over the standard RAG baseline (0.762, p < 0.001). Additionally, the integration of GPT with Bayesian RAG yields the highest performance (AUC-ROC of 0.961), showcasing the cumulative benefits of uncertainty quantification and large language model integration. A comparative analysis of uncertainty quantification methods reveals that Monte Carlo Dropout offers the best trade-off between accuracy and efficiency, with a latency of 15 ms, outperforming alternatives such as Deep Ensembles and Variational Inference in both speed and resource requirements.
Results
The results of the study provide a thorough evaluation of the Bayesian Retrieval-Augmented Generation (RAG) model, showcasing its effectiveness across several dimensions: retrieval accuracy, uncertainty calibration, and computational efficiency. The findings indicate that Bayesian RAG outperforms traditional methods in these areas, demonstrating its potential for enhanced performance in practical applications.
Table 6 summarizes the key performance indicators for four different model configurations, clearly identifying the optimal approach for each evaluation metric. This synthesis of results underscores the advantages of Bayesian RAG, particularly in terms of its retrieval accuracy and ability to calibrate uncertainty, while also maintaining computational efficiency.
Discussion
In this section, the authors contextualize their contributions to retrieval-augmented generation (RAG) systems by reviewing the evolution of retrieval methods, highlighting foundational techniques, domain-specific adaptations, and recent advancements in uncertainty quantification. They identify limitations in traditional RAG systems, particularly the reliance on deterministic embeddings that fail to quantify retrieval confidence, which is critical in high-stakes applications. The authors propose a Bayesian framework that integrates uncertainty quantification directly into the retrieval process, contrasting it with existing methods that treat uncertainty as a post-processing issue.
The authors detail their framework’s advancements over prior Bayesian RAG approaches, emphasizing four key differentiators: joint uncertainty quantification for both query and document embeddings, integrated uncertainty in the scoring function, validation on real-world financial documents, and a robust theoretical foundation for uncertainty penalization. They demonstrate that their Bayesian RAG framework maintains strong performance across diverse document types and query complexities while introducing minimal latency overhead compared to standard RAG systems. The mathematical formalization of their approach, including joint uncertainty quantification and mutual information analysis, supports the effectiveness of their method in enhancing retrieval accuracy and calibration, particularly in high-stakes domains such as finance and healthcare.
Limitations
In the section on limitations, the authors critically assess the constraints of the Bayesian RAG system, despite its demonstrated effectiveness over traditional retrieval methods. Key limitations include significant computational and scalability challenges. The system’s memory requirements range from 2.8 GB for moderate-scale deployments to 170 GB for larger document chunks, indicating potential difficulties in handling very large document collections without resorting to distributed computing or more efficient storage solutions.
Additionally, the reliance on Monte Carlo dropout introduces computational overhead due to the necessity of multiple forward passes (defaulting to $n = 10$), which can affect query latency. Although the system achieves a production-ready latency of 15 ms, organizations with stringent latency requirements may need to weigh the benefits of uncertainty quality against the demands of response time. These limitations highlight the need for further research to enhance the scalability and efficiency of uncertainty-aware retrieval systems.
