Use of Large Language Model for IMRT Optimization In Raystation Treatment Planning System for Reference and Online Adaptive Therapy for MR-Linac
Abstract
Purpose
We previously reported feasibility of RayStation for Unity MR-Linac planning with various advantages. However, the lack of automated objective-weight optimization can limit the effectiveness of daily planning with large anatomical changes. This work investigates an Large Language Model (LLM)-based approach to perform automated IMRT objective adjustment for online adaptive Unity treatments.
Methods
In this feasibility evaluation study, a large language model (Gemini 2.0) was integrated with RayStation scripting to automate objective adjustment during inverse IMRT optimization for MR-Linac reference and online adaptive planning. RayStation scripting initialized optimization from a clinical wish-list by automatically converting goals into objectives, which were then iteratively adjusted by the LLM. Instructions were generated to guide the LLM to act as a planner, iteratively proposing objective weight and dose-level adjustments based on plan-state summaries communicated via JSON-formatted actions. The LLM was made to report key reasoning points underlying each action, which were evaluated alongside optimization outcomes in a second LLM loop to refine and override instruction elements associated with suboptimal decisions. Optimization performance was assessed via DVH based goal achievement and violations. The system was evaluated on two Unity patients (one pancreas and one prostate SBRT) and four daily adaptive fractions.
Results
The instruction-guided LLM produced planner-like objective adjustment actions and reasoning traces across all cases. For reference plans, clinical goals were achieved within 37 (prostate) and 18 (pancreas) updates. When reference-plan objectives were reused without adjustment, daily adaptive optimizations resulted in goal violations upto 5.5%. LLM-guided objective adjustment reduced violations to within 2% of clinical goals within five optimization iterations (approximately 1 minute per iteration). Iterative instruction updates further improved convergence for reference plans.
Conclusion
This proof-of-principle study demonstrates the feasibility LLM-guided IMRT optimization for MR-Linac applications for reference and online planning. Our closed loop instruction update was proven effective in improving LLM performance.