## 3 Integrating the LLM and the Optimization Algorithm  
In this section, we propose a novel framework that integrates _Large Language Models_ with _optimization_ techniques to streamline semi-structured decision-making processes. The discussion addresses cases where the optimization algorithm is a constructive heuristic (Section 3.1), a parameterized heuristic (Section 3.2), or a model-based solver (Section 3.3). First, we present an overview of the LLM features that are pertinent to the analysis that follows.  
_Large Language Models_ (LLMs) are _Generative AI_ systems trained on extensive text datasets to understand and generate human language with high proficiency (refer to [25] for a comprehensive review of architectures and applications, along with a discussion of open issues and challenges). They use _deep learning_ architectures, primarily _transformers_, to capture complex linguistic patterns and contextual information. LLMs exhibit the so-called _emergent properties_, unexpectedly sophisticated abilities that arise as the models scale in size, complexity, and volume of training data. These capabilities, often not explicitly programmed, include skills like (a) in-context learning, (b) common-sense reasoning, (c) mathematical problem-solving, and (d) data summarization and interpretation. These properties are of the utmost importance across various applications, particularly in advancing the next generation of DSSs, as detailed in the following. In these systems, LLMs have the potential to enhance the flexibility of optimization tools, making them more adaptive and responsive to complex, real-world semi-structured decision-making scenarios.  
In our framework, LLMs (see Figure 3) aim at automating two phases of the decision cycle described in Figure 1: (a) the analysis and interpretation of the solution \(\mathbf{x}^{(h)}\) of the current approximation (6)-(8); and (b) the update of problem \(\mathcal{P}^{(h)}\) (\(r=1,\dots,q_{\pi_{h}}\)) on the basis of the qualitative remarks expressed by the decision makers in a natural language. Both tasks are guided by a high-level description of the problem and a set of preliminary instructions provided to the LLM. Further details on this step are presented in the next subsection.  
The interaction between the decision makers, the optimization solver, and the LLM is based on the _Prompt-Before-Prompt_ (PBP) technique (also known as _pre-prompt_). PBP involves providing an initial prompt that helps to set the context, frame the subsequent prompts, or provide a set of instructions. In particular, the pre-prompt can give explicit directions or specify the desired format of the response, which helps the model to follow the guidelines more closely. This can lead to more accurate, coherent, and contextually appropriate responses from the LLM. In our framework, PBP is used to instruct the LLM about the preferences of the decision makers and how they relate to the data, variables, constraints and objective function of the optimization model. For this purpose, the decision is framed in terms of _entities_ (such as customers, orders, and vehicles) and the _relationships_ between them. This approach allows us to inform the LLM that, for example, customer requests are geographically grouped into districts, enabling the LLM to interpret solutions within the context of these districts. Additionally, it facilitates the automatic derivation of modifications to the optimization problem in response to updates in decision makers' preferences.  
We now detail the three cases when optimization is approached using a constructive heuristic, a parameterized heuristic, or a model-based solver.