Improving an AI Assistant in a Web Application for Fitting Experimental Data Using Retrieval-Augmented Generation and Hyperparameter Optimization

25 Jun 2026, 15:45
15m
Room 420 (MLIT)

Room 420

MLIT

Machine learning and big data analytics Machine learning and big data analytics

Speaker

Konstantin Lukyanov (MLIT, JINR)

Description

This paper investigates the application of Retrieval-Augmented Generation (RAG) to improve the quality of C++ code generation by Large Language Models (LLMs) in the FITTER_WEB application. It was designed for fitting experimental physical data using the ROOT package. To achieve this goal, FITTER_WEB requires accurate and reliable C++ code, which the AI assistant is expected to provide. The main challenge lies in "hallucinations", which lead to uncompilability and functional incorrectness of the code when converting LaTeX formulas into software implementation. The use of a RAG collection containing "LaTeX formula — reference C++ code" pairs allowed a significant increase in the compilability level of the generated code. For example, for qwen3-coder:30b model it raised from 58% to 93%. The functional correctness of results was also improved.

A comparison of the effectiveness of the proposed method across a range of other LLM models is provided. A significant improvement in the quality of the generated code has been demonstrated with an increase in the number of LLM model parameters. Furthermore, the correlation between the value of the language model temperature parameter and the levels of compilability and functional success was approved. Despite the complexity of the task due to the specifics of the ROOT library, the proposed approach demonstrates potential for scalability and can serve as a basis for expanding the AI assistant's functionality without the need for model fine-tuning.

Authors

Presentation materials