Realtime Generation of Streamliners with Large Language Models

Florentina Voboril,Vaidyanathan Peruvemba Ramaswamy,Stefan Szeider
2024-08-16
Abstract:This paper presents the novel method StreamLLM for generating streamliners in constraint programming using Large Language Models (LLMs). Streamliners are constraints that narrow the search space, enhancing the speed and feasibility of solving complex problems. Traditionally, streamliners were crafted manually or generated through systematically combined atomic constraints with high-effort offline testing. Our approach uses LLMs to propose effective streamliners. Our system StreamLLM generates streamlines for problems specified in the MiniZinc constraint programming language and integrates feedback to the LLM with quick empirical tests. Our rigorous empirical evaluation involving ten problems with several hundreds of test instances shows robust results that are highly encouraging, showcasing the transforming power of LLMs in the domain of constraint programming.
Software Engineering,Artificial Intelligence,Machine Learning
What problem does this paper attempt to address?
### Problems the paper attempts to solve This paper aims to solve the problem of low efficiency in solving complex problems in Constraint Programming (CP). Specifically, the author proposes a new method named StreamLLM, which uses Large Language Models (LLMs) to automatically generate streamliners to accelerate the solution process of Constraint Satisfaction Problems (CSP). #### Background and problem description In constraint programming, streamliners are specific constraints added to the constraint model to narrow the search space, thereby improving the solution speed and feasibility. Traditional ways of generating streamliners mainly rely on manual design or systematic combination of atomic constraints and a large number of offline tests. This method is not only time - consuming but also requires a large amount of computing resources. #### Main challenges 1. **Manual design of streamliners is time - consuming and labor - intensive**: Researchers need to analyze the constraint model based on theoretical knowledge and manually design effective streamliners. 2. **Inefficient automatic generation of streamliners**: Although existing automatic methods can generate streamliners, they usually take several days to conduct large - scale instance tests and are difficult to generate in real - time. 3. **Lack of flexibility and adaptability**: Traditional methods have poor adaptability to different problems and are difficult to quickly respond to new or complex problem instances. #### Solutions To solve the above problems, the paper proposes the StreamLLM method. Its core idea is to use the powerful reasoning ability of LLMs to generate effective streamliners in a short time. The specific steps are as follows: 1. **Real - time generation of streamliners**: Send queries to the LLM to obtain candidate streamliners and quickly verify their effectiveness on small test instances. 2. **Feedback mechanism**: Dynamically adjust the LLM's prompt information according to the performance of candidate streamliners on small instances to further optimize the generated streamliners. 3. **Efficient evaluation**: Conduct parallel tests on multiple candidate streamliners and select the best - performing streamliners to apply to actual problems. #### Experimental results The paper conducted a strict experimental evaluation through ten standard constraint satisfaction problems. The results show that: - The streamliners generated by StreamLLM significantly reduce the solution time on multiple problems, and in some cases, even save more than 99% of the solution time. - Different configurations of LLMs (such as GPT - 4o and Claude 3.5 Sonnet) and different prompt strategies have a certain impact on the performance of streamliners, but generally perform well. - The experiment also shows that even when the problem description is confused, StreamLLM can still generate effective streamliners, proving that it does not rely on the LLM's memory ability. In conclusion, this paper shows the great potential of LLMs in the field of constraint programming, especially in the real - time generation of effective streamliners, providing new ideas and methods for solving complex constraint satisfaction problems.