mlsanityData to 24 Nov 2026

From Prompts to Posteriors: Can LLM Agents Perform Bayesian Inference in Context?

arXiv 2610.29331 ↗Submitted 21 Oct 2026cs.AIcited by 1

On the map: LLM agents and tool use → Web, search, and research agents also fits: General LLM agent frameworks and benchmarks

Abstract (arXiv)

Large language models (LLMs) are increasingly applied across the scientific discovery pipeline, from synthesizing literature to generating hypotheses to informing experimental design. A unifying principle behind these tasks is the need to continuously update beliefs as evidence accumulates, for which Bayesian inference provides a natural framework. However, existing work assumes that LLMs cannot carry out principled Bayesian belief updating in context, instead relying on simplifications and heuristics. To challenge this assumption, we present a principled evaluation of Bayesian reasoning capabilities in LLMs, analyzing both the model's internal consistency as well as its ability to recover an externally determined posterior. Specifically, we build an evaluation framework spanning qualitative epistemological examples to probe probabilistic coherence, quantitative benchmarks of Bayesian inference capabilities, and analyses of the impact of non-Bayesian updates on downstream task performance. Across different scenarios, we find that LLMs generally violate Bayes' rule when updating their beliefs in context. However, when equipped with modern reasoning abilities and code execution capabilities, their performance drastically improves, enabling even the close approximation of analytically intractable posteriors. Our evaluation shows that current LLMs with access to appropriate tools could already be used to make complex belief updates in scientific discovery, enabling rapid acceleration of the efficiency and scale of AI-powered scientific discovery.

Key facts. Cited by 1 paper in the map (data through 24 Nov 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 33 of its 78 references that are in the map. Submitted 21 Oct 2026.

Builds on

33 of 78 references.

References · 33

  1. 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 4,110
  2. 2024Qwen2 Technical Reportcited by 2,293
  3. 2022Language Models (Mostly) Know What They Knowcited by 2,077
  4. 2024The AI Scientist: Towards Fully Automated Open-Ended Scientific Discoverycited by 1,249
  5. 2023Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMscited by 1,072
  6. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 989
  7. 2023Just Ask for Calibration: Strategies for Eliciting Calibrated Confidence Scores from Language Models Fine-Tuned with Human Feedbackcited by 911
  8. 2022Teaching Models to Express Their Uncertainty in Wordscited by 814
  9. 2024Phi-4 Technical Reportcited by 795
  10. 2026Gemma 4 Technical Reportcited by 464
  11. 2021Transformers Can Do Bayesian Inferencecited by 409
  12. 2023Modern Bayesian Experimental Designcited by 143
21 more
  1. 2024ForecastBench: A Dynamic Benchmark of AI Forecasting Capabilitiescited by 129
  2. 2024Approaching Human-Level Forecasting with Language Modelscited by 123
  3. 2023CLadder: Assessing Causal Reasoning in Language Modelscited by 115
  4. 2023In-Context Learning through the Bayesian Prismcited by 95
  5. 2025LLM4SR: A Survey on Large Language Models for Scientific Researchcited by 90
  6. 2024Is In-Context Learning in Large Language Models Bayesian? A Martingale Perspectivecited by 68
  7. 2023In-Context Learning Learns Label Relationships but Is Not Conventional Learningcited by 53
  8. 2025Evaluating Large Language Models in Scientific Discoverycited by 46
  9. 2024Towards Scientific Discovery with Generative AI: Progress, Opportunities, and Challengescited by 45
  10. 2025Bayesian Teaching Enables Probabilistic Reasoning in Large Language Modelscited by 43
  11. 2024Incoherent Probability Judgments in Large Language Modelscited by 39
  12. 2025Can Transformers Learn Full Bayesian Inference in Context?cited by 35
  13. 2025BED-LLM: Intelligent Information Gathering with LLMs and Bayesian Experimental Designcited by 35
  14. 2025Enough Coin Flips Can Make LLMs Act Bayesiancited by 28
  15. 2025The Bayesian Geometry of Transformer Attentioncited by 14
  16. 2026When Agents Say One Thing and Do Another: Validating Elicited Beliefs from LLMscited by 13
  17. 2024QUITE: Quantifying Uncertainty in Natural Language Text in Bayesian Reasoning Scenarioscited by 12
  18. 2025Exploring the Potential for Large Language Models to Demonstrate Rational Probabilistic Beliefscited by 10
  19. 2026BayesBench: Evaluating LLM Belief Trajectories Under Multi-Turn Evidence Accumulationcited by 9
  20. 2026LLMs are not (consistently) Bayesian: Quantifying internal (in)consistencies of LLMs' probabilistic beliefscited by 7
  21. 2026CA-BED: Conversation-Aware Bayesian Experimental Designcited by 4

Built on by

Cited by year (2026 to 24 Nov)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025Large Language Models as Discounted Bayesian Filters
  2. 2025LLMs for Bayesian Optimization in Scientific Domains: Are We There Yet?
  3. 2026Evidence-Informed LLM Beliefs for Continual Scientific Discovery
  4. 2026FALSIFYBENCH: Evaluating Inductive Reasoning in LLMs with Rule Discovery Games
  5. 2025Reasoning Under Uncertainty: Exploring Probabilistic Reasoning Capabilities of LLMs
  6. 2025Martingale Score: An Unsupervised Metric for Bayesian Rationality in LLM Reasoning
  7. 2026LLM sequential decision making under uncertainty in biochemical domains
  8. 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systems