Using large language models for enhancing accessibility for Monte Carlo photon transport simulations and beyond

Significance: Computational modeling and the use of simulation software tools are essential for biomedical optics research. Designing effective simulations often requires an in-depth understanding of the underlying physical problems and proper configuration of the software settings, which often constitute key barriers for novice users including students. The rapid emergence of large language models (LLMs) offers new opportunities for natural-language-based interaction, but integrating them with technical software remains challenging because of their limited output reproducibility. Overcoming these limitations would allow more intuitive, efficient, and reproducible interaction between scientists and scientific software. Aim: We investigate the use of LLMs in quantitative biophotonics simulation tools, with a goal of enabling novice users to build complex photon simulations using intuitive natural-language-based problem descriptions. Approach: We have explored prompt engineering strategies that enable LLMs to bridge the gap between natural-language descriptions and advanced simulation software by constraining LLM outputs using a data schema (i.e., format) and a modular component architecture, followed by deterministic validation to ensure correctness and reproducibility of the outputs. Results: Using Monte Carlo eXtreme (MCX)-a widely used photon transport simulator-as an example, we showcase the capability of the proposed framework to convert user descriptions to structured simulation inputs. Benchmarked using 33 diverse natural-language simulation descriptions, our LLM interface, MCX-LLM, achieves 98% accuracy on the evaluated benchmark and 99% repeatability, with an average processing time of 8.96 s per prompt. The framework also successfully handles various linguistic styles and diverse simulation settings, achieving a 100% success rate on 20 unconstrained real-world prompts. We further conduct an ablation study to reveal the contributions of individual components in the MCX-LLM pipeline and additional tests with incomplete or self-contradictory prompts. With only minor adjustments, our LLM interface also produces valid inputs for a finite-element-based diffusion solver to demonstrate generality toward other optical simulators. Conclusions: By combining LLMs' capability for textual data comprehension with structured constraints, we provide a pathway to making complex scientific tools accessible while ensuring the reliability and technical correctness required for rigorous scientific research.

Authors

Institutions

Publication Details

Journal
Journal of Biomedical Optics
Published
2026-11-16
DOI
https://doi.org/10.1117/1.jbo.31.11.115003
Primary Topic
Artificial Intelligence in Healthcare and Education
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Using large language models for enhancing accessibility for Monte Carlo photon transport simulations and beyond

Yiyi Liu, Qianqian Fang, Fan-Yu Yen
4 links
Journal of Biomedical Optics
Artificial Intelligence in Healthcare and Education
article

Using large language models for enhancing accessibility for Monte Carlo photon transport simulations and beyond

Yiyi Liu, Qianqian Fang, Fan-Yu Yen
article en

Abstract

Significance: Computational modeling and the use of simulation software tools are essential for biomedical optics research. Designing effective simulations often requires an in-depth understanding of the underlying physical problems and proper configuration of the software settings, which often constitute key barriers for novice users including students. The rapid emergence of large language models (LLMs) offers new opportunities for natural-language-based interaction, but integrating them with technical software remains challenging because of their limited output reproducibility. Overcoming these limitations would allow more intuitive, efficient, and reproducible interaction between scientists and scientific software. Aim: We investigate the use of LLMs in quantitative biophotonics simulation tools, with a goal of enabling novice users to build complex photon simulations using intuitive natural-language-based problem descriptions. Approach: We have explored prompt engineering strategies that enable LLMs to bridge the gap between natural-language descriptions and advanced simulation software by constraining LLM outputs using a data schema (i.e., format) and a modular component architecture, followed by deterministic validation to ensure correctness and reproducibility of the outputs. Results: Using Monte Carlo eXtreme (MCX)-a widely used photon transport simulator-as an example, we showcase the capability of the proposed framework to convert user descriptions to structured simulation inputs. Benchmarked using 33 diverse natural-language simulation descriptions, our LLM interface, MCX-LLM, achieves 98% accuracy on the evaluated benchmark and 99% repeatability, with an average processing time of 8.96 s per prompt. The framework also successfully handles various linguistic styles and diverse simulation settings, achieving a 100% success rate on 20 unconstrained real-world prompts. We further conduct an ablation study to reveal the contributions of individual components in the MCX-LLM pipeline and additional tests with incomplete or self-contradictory prompts. With only minor adjustments, our LLM interface also produces valid inputs for a finite-element-based diffusion solver to demonstrate generality toward other optical simulators. Conclusions: By combining LLMs' capability for textual data comprehension with structured constraints, we provide a pathway to making complex scientific tools accessible while ensuring the reliability and technical correctness required for rigorous scientific research.

Journal of Biomedical OpticsVol. 31(11)
Northeastern University (US)
National Institutes of Health, National Institute of General Medical Sciences, National Institute of Neurological Disorders and Stroke, National Institute of Biomedical Imaging and Bioengineering
Artificial Intelligence in Healthcare and Education
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon