The Constraint Your LLM Will Quietly Ignore (with Gurobi's Jerry Yurchisin)

Jerry Yurchisin from Gurobi Optimization explains mathematical optimization as an AI technology where constraints are hard guarantees, unlike LLMs which may ignore critical constraints. He outlines the three core building blocks of any optimization model: decision variables, constraints, and an objective function. The discussion highlights where optimization fits in the agentic AI era, with agents framing problems and generating code, then handing off to solvers like Gurobi via MCP servers. Jerry also covers advancements in non-linear solving, strategies for pitching optimization to stakeholders, and diverse case studies including energy grids, retirement planning, and USA Cycling's Paris 2024 gold medal.

7 min read
The Constraint Your LLM Will Quietly Ignore (with Gurobi's Jerry Yurchisin)
source: https://www.youtube.com/watch?v=gBjcT9yH9T0

The episode features Jerry Yurchisin, Manager of Decision Intelligence Strategy at Gurobi Optimization, discussing mathematical optimization as a critical AI technology. Unlike Large Language Models (LLMs) that “confidently tell you they’ve optimized your entire business while quietly ignoring the one constraint that could cost you millions,” mathematical optimization treats constraints as “hard guarantees” that are “mathematically impossible” to break.

Core Concepts of Mathematical Optimization

Jerry outlines the three fundamental building blocks of any mathematical optimization model:

  1. Decision Variables: These are the elements over which a business has control, such as “how much of this certain type of product am I going to order.”
  2. Constraints: These define the restrictions or rules governing decisions, like “how much money do I have available,” “storage space,” or diversity measures (e.g., “at least 30% of my product is this type”). Constraints ensure solutions are feasible and adhere to business rules and physical limitations.
  3. Objective Function: This is the goal to be optimized (maximized or minimized), such as “minimal cost,” “anticipated customer satisfaction,” “profit,” “revenue,” or “carbon footprints.”

If a problem exhibits these three characteristics, mathematical optimization can be applied. The process involves translating the business problem into mathematical inequalities and equations, which a solver like Gurobi then uses to determine optimal values for decision variables, guaranteed to meet all constraints while pushing the objective function to its extreme. This framework offers a different problem-solving approach compared to machine learning, which primarily focuses on prediction rather than decision-making within a system of rules.

Gurobi’s Expanding Reach and Educational Tools

Gurobi, a B2B business, is widely adopted, with “something like 80% of Fortune 100 businesses” using its optimization solver. Its applications span various industries, from logistics and supply chain to mom-and-pop bakeries, demonstrating its versatility.

To teach optimization principles, Gurobi has developed interactive games:

  • The Burrito Optimization Game: A well-known tool for illustrating optimization concepts.
  • Grow Bean: A new game simulating a coffee shop where players decide “how much of certain types of coffee to have sort of prepared for a certain amount of time.” It introduces queuing theory and the challenge of balancing customer satisfaction (minimizing wait times) with minimizing waste (raw product). The game visually represents the “feasible region”—the area defined by constraints where solutions are possible—and tackles nonlinear objective functions.

Advancements in Non-Linear Optimization

Historically, a drawback of mixed integer programming (Gurobi’s core strength) was its limitation with nonlinear functions, often requiring linearization (piece-wise approximation). However, significant “advances in hardware and advances in the algorithmic side” have dramatically improved Gurobi’s ability to solve nonlinear problems directly. This means users can now model exponential functions or other nonlinear relationships as constraints or objectives without sacrificing accuracy or blowing up problem size. This allows for greater “realism” in models and enables solutions for previously intractable problems, solving “five times faster now because of algorithmic purely alone improvements.” Jerry encourages revisiting optimization if past nonlinear challenges deterred its use.

Optimization in the Agentic AI Era

Jerry emphasizes a clear division of labor in the emerging agentic AI landscape:

  • LLMs/Agents: Excellent for “developing the problem statement,” “writing the code,” generating “mathematical formulation,” and identifying overlooked regulations or considerations. They can help frame the problem by considering “all the other bits and pieces.”
  • Optimization Solvers (e.g., Gurobi): Essential for “the solving” to provide “optimal solution[s]” with “defendability, the explainability” and “hard constraints” that “cannot be violated.” This is crucial for “high-stakes decisions” where LLMs might “forget” a critical constraint, leading to “bad things happen[ing].”

Gurobi is developing an Intelligence Hub to facilitate this collaboration:

  • Modeler Agent: Helps users define problem statements, write code, and formulate models, guiding them through best practices and generating test scenarios.
  • Gurobot: A support agent that provides “first line of support” for debugging models, improving formulations, or increasing runtime speed by leveraging Gurobi’s extensive knowledge base.
  • Explainer (upcoming): Addresses “infeasible models” (where no solution satisfies all constraints) by identifying the conflicting constraints. Tools like FeasRelax can then suggest minimal adjustments to constraints (e.g., “if you increased our budget by 10%”) to make the model feasible, providing actionable insights for business discussions.

The goal is to “streamline the modeling process” and “lower the barrier to entry” for optimization, enabling a “flawless deterministic guaranteed optimal solution” that LLMs alone cannot provide, soon callable via MCP (Model Context Protocol) servers.

Case Studies: Beyond Supply Chain

Jerry presents diverse applications:

  • Energy Grids: Solving “unit commitment problems” (what power supplies to use to meet demand) and “renewable dispatch optimization” (managing solar/wind energy and battery storage to minimize costs and meet demand). Nonlinear aspects are particularly relevant here, showing increased adoption due to Gurobi’s advancements.
  • Retirement Planning: MyGoals, a Toronto-based fintech platform, uses Gurobi to help individuals “balance competing life and financial goals” while adhering to complex regulations. This approach led to a 2% to 10% improvement in after-tax retirement income compared to conventional tools, by evaluating multiple goals simultaneously to build “actionable tailored strategies.” It highlights how optimization can reveal “infeasible” financial plans and suggest necessary trade-offs.
  • USA Cycling (Paris 2024 Gold): Project 405, an effort with the USA women’s cycling team, used mixed integer programming to optimize rider rotation strategies and effort levels for indoor track cycling events. By considering “the physics of air resistance plus energy levels” and “rules of the sport,” the model generated prescriptive plans that minimized race finishing time, contributing to a gold medal at the Paris 2024 Olympics. The model even helped identify talent by matching physiological profiles with cycling disciplines. This demonstrates optimization’s utility in high-performance sports and its ability to work alongside traditional machine learning for comprehensive analytics.

Selling Optimization Internally

Implementing optimization requires effective change management. Jerry advises:

  • For Management (CFO/CEO): Articulate the “value that it brings” to the “bottom line,” monetary savings, or increased organizational robustness. Clearly differentiate optimization from LLMs/generative AI, emphasizing optimization’s guarantees for “high-stakes decisions.”
  • For Planners/End-Users: Emphasize that optimization tools “make your job easier” and do not replace them. Referencing the NFL scheduling example, Jerry notes that optimization makes teams “super more efficient,” allowing them to “analyze thousands of them [schedules]” instead of just one. Involve these experts in the modeling process, as their “15-20 years of experience” provides crucial “realism” and identifies implicit constraints (“I’d never do that”). The “human in the loop” remains vital for interpreting results and making nuanced decisions.

Learning Resources

Jerry recommends:

  • gurobi.com/learn: A comprehensive resource for training materials, including:
    • OPTI Series: Four training courses (Optimization for Data Scientists, OPTI 101, 201, 202, 301) covering basics to advanced techniques, available as YouTube playlists with Jupyter notebooks.
    • Udemy Course: A four-part, more in-depth training developed with Dr. Joel Sokol at Georgia Tech.
    • Gurobi Intelligence Hub: Use the Modeler agent to get started, defining problems and generating code.
    • Jupyter Notebooks: Numerous examples across industries and difficulty levels.
    • Gurobi Games (Burrito, Grow Bean): Excellent for developing intuition and demonstrating optimization’s benefits to non-technical stakeholders.
  • OPTI GenAI Training (Mid-November): A new training focused on integrating generative AI with optimization, emphasizing best practices for using both technologies. It will be remote and available on-demand.
  • Gurobi Decision Intelligence Summit (Sept 22-23, Las Vegas): Features customer success stories, advanced technical tracks, and a beginner track covering core concepts, modeling with Python API, and using the Intelligence Hub.

Book Recommendation

Jerry recommends Flatland by Edwin A. Abbott, describing it as a “super unique way of exploring the relationship between geometrical objects” within a “medieval setting.” He highlights its value in demonstrating “how do you talk about something that somebody has no idea what you really mean,” emphasizing the importance of communicating complex ideas in accessible language.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

Boris Cherny: Building Claude Code

Boris Cherny: Building Claude Code

Boris Cherny, creator of Claude Code, discusses the transformative capabilities of Opus 5, highlighting its prompt injection resistance and long-task execution. He delves into Claude Code's empirical development philosophy of "unhobbling" AI by constantly adapting to new model generations, and shares insights on how to build advanced AI products using higher-level tasks, self-verification, and dynamic workflows to orchestrate thousands of agents.

The Age Of The 40-Year-Old Solo Founder Is Here

The Age Of The 40-Year-Old Solo Founder Is Here

Bryant Chou, co-founder of Webflow, introduces his new AI-powered platform, Ploy. This episode delves into how Ploy transcends traditional website builders by integrating analytics, CRM, and SEO to autonomously optimize marketing. Chou discusses Ploy's 'anti-slop' approach, leveraging curated data and expertise to produce high-quality web designs, and reflects on building a startup in the AI era compared to Webflow's early days. He also explores the competitive moat of purpose-built AI, the concept of 'agents as customers,' and how experienced founders can leverage AI to 'clone themselves' and achieve unprecedented speed and scale.