OptimAIzer is a side project that integrates a Large Language Model (LLM) with a simple Operations Research (OR) model to explore AI-driven pricing optimization. The goal is to create an agentic system that interacts with an optimization model through natural language. This could typically help non-technical users perform "what-if scenarios", i.e., adjust model recommendations based on specific business constraints and inputs.
We chose a simple dynamic pricing problem, modeled via a Mixed Integer Program (MIP), to illustate how the system works.
This project was inpired by Large Language Models for Supply Chain Optimization (Li et al.)
- LLM: OpenAI 4o-mini with function calling
- OR Model: OR-Tools
- UI: Mesop
- Automation: Selenium (used for scripted interactions and demos)
OptimAIzer provides an interactive AI pricing agent that can:
-
Retrieve default data
- Fetch information on supported products, current inventory levels, market size, and other relevant parameters.
-
Execute an OR model for optimal pricing
- Compute optimal pricing based on input parameters.
- Inject custom constraints that are executed dynamically at runtime.
-
Inspect OR model formulation
- Retrieve the source code of the OR model. Which helps the LLM understand the model syntax for injecting constraints correctly.
- The LLM receives a user query.
- If a function is required, we execute it on behalf of the LLM.
- Results are returned to the LLM (or an error if any).
- If no additional action is required, the LLM returns an answer to the user for further interaction.
- A Mesop-based chat UI enables easy interaction with the agent.
- A Selenium demo script automates predefined interactions, showcasing the agent’s capabilities.
🎥 Full demo on YouTube