Skip to content
Blog

LLMs can’t optimize schedules, but AI can

LLMs have come a long way in recently, but they still struggle with complex planning, however, there’s an older form of AI that handles complex planning…

As a cat person, I’m very happy the internet has embraced cats as the “ultimate feel-good” subject when it comes to pictures and videos. And now with LLMs and GenAI the fun is endless! Want a cat sitting on a crocodile while playing the banjo? Boom!

Generated by ChatGPT

Or a cat in a tiny top hat hosting a stand-up comedy show for a crowd of impressed goldfish, here you have it!

Generated by ChatGPT


Of course this is purely for entertainment. LLMs have proven themselves to be very valuable tools that help us brainstorm, proof-read e-mails or even help us rewrite texts for specific audiences. The progress in the past few months has been mind-blowing, which might suggest they're the answer to everything. At least, if you believe the hype machine.

But when it comes to solving practical, real-world problems, they’re not there yet.

# LLMs and everyday planning problems

My neighbor Jamie works at a hospital and creates the work schedule for the nurses and doctors. It’s a logical nightmare juggling availabilities, contracts, and other employee preferences. Every week, she spends hours creating the schedule, but there is always somebody who thinks they got the short end of the stick.

Our local plumber, Robert, is always in high demand, constantly driving around the neighborhood. His services are in high demand, but he wastes valuable time on the road because he isn't tackling jobs in the most efficient order. Smarter scheduling would mean helping more customers and spending less time driving.

With all the power that people subscribe to tools like ChatGPT, creating such schedules should be a walk in the park? Right?

Reality is however disappointing: LLMs can’t deal with these tasks very well. Most of it comes down to the sheer size of the problem space: the total number of possible combinations of input parameters. Even a seemingly simple problem like assigning shifts to 10 Employees for a week has a problem size of 1063 combinations. That takes a lot of processing power to solve even with specialized algorithms, let alone trying it with a general language model.

7 days, 3 shifts per day, on average 3 employees per shift, yes that’s a 1 with 63 zero’s behind it!

Sometimes LLM models do find a feasible solution. This is especially true for the newer reasoning models. Those seem to think through the problem and can create a feasible schedule on very small datasets. As these models can reason about discrete steps, they break down the creation of a schedule to smaller steps, just like a human would.

Recent updates have given LLMs to replicate human reasoning.

When you try medium sized datasets, LLMs run both into the problem space issue and in some cases even context window limitations due to the amount of tokens in the input. Although we do believe the latter is a temporary problem as the technology evolves (looking for example at Gemini with a context window of 2 Million Tokens!), the former is going to be much harder to overcome… at least without some help.

# A solved problem, almost forgotten

By their very nature, LLMs just predict the next token and “the next token” isn’t what we are looking for when trying to solve planning problems. Luckily, for most gaps in current LLM capabilities, we can look back at “older” forms of AI which resolve these gaps.

The different layers of AI, Timefold fits into the outer layer of old-school AI.

When looking at our problem, we have to peel back the layers of AI evolutions. As mentioned, LLMs and GenAI aren’t the solution here.

Deep Learning and Machine Learning are excellent at pattern recognition and learning from data. Unfortunately, the learning part is often the problem.

ML solutions require large volumes of high quality data to learn from. Real world planning problems usually have their own unique nuances and are often still being done manually… so there is no large amount of high quality data available. No training data, no training, no Machine Learning model.

We need to go even further back, to the origins of AI. In the “old-school” AI layer, we find a pretty unassuming part of AI called Mathematical Optimization. This blob of techniques has been a proven way to solve planning problems for the past 30 years. Here you’ll find techniques such as Linear programming and our personal favorite at Timefold: Metaheuristics.

These algorithms don’t need a big upfront training set to build a model, as the models are programmed manually by domain experts. They work with enormous datasets and find (near) optimal solutions to your planning problems.

It’s frankly a wonder Metaheuristics and friends are so undervalued and get overshadowed by the commoditization of GenAI. By our estimations, 95% of these planning problems remain unresolved while the answer has been out there for decades.

Maybe it got lost in history? It’s time to rebrand this part of our industry and start our own hype machines. It’s time for #PlanningAI.

PlanningAI is a type of artificial intelligence designed specifically to handle complex planning and scheduling tasks, and to satisfy the constraints of planning problems. It helps you make better decisions by sorting through countless possibilities to find the best solutions. Solutions that save you time, reduce costs, and improve efficiency.

This form of AI can be a bit unwieldy and overwhelming to operationalize. We realized that and removed as many barriers as possible to make it as simple as it can be. We’ve created pre-built models for common use-cases, ready for consumption through a REST API interface on our Platform.

Using these APIs, we can generate a shift schedule for my neighbor Jamie, or calculate an optimized route for our local plumber Robert, without even needing to know anything about solving these complex planning problems. It’s basically our decade long planning expertise in a box.

# Not one or the other, but together

While LLMs can’t handle planning problems efficiently, nobody can deny that they’re an amazing enabler. So instead of staying in our respective corners of the AI-Ecosphere, let’s start being a big happy AI family and leverage each other's strengths for the betterment of all!

PlanningAI can leverage Custom GPT models to help domain experts build better PlanningAI models and help explain them to a larger audience. It can also help transform data into information and translate complex ideas into something even the most technophobic person can understand.

LLMs from their part can leverage the capabilities of PlanningAI through “Tool Calling” functionality or the Model Context Protocol, giving LLMs access to advanced algorithms specialized for solving these kinds of problems.

The fusion of AI technologies is reshaping how we solve planning problems, opening up new and innovative solutions. What a time to be tackling these challenges!

Continue reading