6 min read
Can ChatGPT build your staff schedule? We tested it.
We gave a month of nurse scheduling to ChatGPT and to an optimization engine, then checked every rule. The results, the costs, and what to use when.
Many managers now ask the same question: “Can’t ChatGPT just make our rota?” It is a fair question. Large language models write code, summarize contracts and pass exams. Next to that, a staff schedule (a nurse rota, a shift plan) looks like a smaller problem, and AI scheduling is now promised everywhere.
So we tested it, on a realistic month, with every rule checked by an independent program.
The test: a month of nurse scheduling
An emergency department needs nurses for February 2026. Anyone who has planned shifts in a hospital will recognize it:
- 100 nurses, most of them with a single skill (triage, resuscitation, pediatrics, obstetrics…)
- 20 shift types every day: day, swing and night
- 527 shifts to fill over 28 days, with only 5% spare capacity
- Half the team has vacation planned, and many people have requests: no nights, no weekends, specific days off, at most one weekend…
The rules come in three levels:
- Mandatory: right skills, one shift per day, 12 hours of rest, no work on vacation, contract limits.
- Important:
- every shift covered
- minimum hours, two weekends off, no more than 3 nights or 5 days in a row, two days off after a series of nights
- no backward rotation (no day shift right after a night)
- enough senior nurses on every shift group
- colleagues who must work together (carpool, mentoring), and others who must not
- shifts already promised to someone
- personal requests
- Nice to have: weekends and nights shared fairly.
Both methods got the same data and the same rules. ChatGPT got everything in one detailed prompt and the instruction to take its time.
The scoreboard
Important rules broken
- Optimization engine
- 9
- ChatGPT
- 60
Time
- Optimization engine
- 5 min
- ChatGPT
- 24 min
The engine had a first full schedule after 3 seconds.
Cost
- Optimization engine
- $0.03
- ChatGPT
- $0.54
The engine is free on your own computer.
| Optimization engine | ChatGPT (gpt-6.1-sol) | |
|---|---|---|
| Shifts covered | 100% | 100% |
| Mandatory rules broken | 0 | 0 |
| Important rules broken | 9 | 60 |
| Weekend fairness (gap to average) | 11.8 pts | 21.7 pts |
| Night fairness (gap to average) | 25.6 pts | 39.7 pts |
| Time | 3 s for a first full schedule, 5 min to polish | 24 min |
| Cost | ~$0.03 (free on your own computer) | ~$0.54 |
ChatGPT did deliver a legal schedule too. But it broke 7 times more important rules, was about twice as unfair, and took 24 minutes. The optimization engine had a better schedule after 8 seconds.
Seconds versus minutes
An optimization engine improves its schedule step by step, and you can stop it whenever the result is good enough. ChatGPT gives one answer at the end.
Important rules broken, over time
- Optimization engine
- ChatGPT
Rules brokenTime (log scale)
| Time | Optimization engine | ChatGPT |
|---|---|---|
| 3 s | 242 | - |
| 10 s | 47 | - |
| 30 s | 13 | - |
| 1 min | 11 | - |
| 5 min | 9 | - |
| 24 min | - | 60 |
What ChatGPT got wrong
Most of its mistakes are rules that link several people or several days. They are exactly the rules that make shift scheduling hard by hand:
Rules broken, by kind of rule
- Optimization engine
- ChatGPT
- Must work together115
- Rest after nights012
- No-weekend requests06
- One-weekend limit05
- Two weekends off04
- One block of shifts53
- Nights in a row03
- Not Monday + Tuesday03
- Requested days off03
- Senior nurse missing03
- Shift-time requests32
- Weekly caps01
| Rule | Optimization engine | ChatGPT |
|---|---|---|
| Must work together | 1 | 15 |
| Rest after nights | 0 | 12 |
| No-weekend requests | 0 | 6 |
| One-weekend limit | 0 | 5 |
| Two weekends off | 0 | 4 |
| One block of shifts | 5 | 3 |
| Nights in a row | 0 | 3 |
| Not Monday + Tuesday | 0 | 3 |
| Requested days off | 0 | 3 |
| Senior nurse missing | 0 | 3 |
| Shift-time requests | 3 | 2 |
| Weekly caps | 0 | 1 |
- Colleagues who must work together were split 15 times.
- Recovery after night shifts was cut short 12 times.
- People who asked for no weekends still got 13 weekend shifts.
- Seniority: three evenings with no senior nurse on the acute shifts.
Here is what that looks like across the whole month. Each row is a nurse, each column a day. (Think you can do better? Try a small version yourself against the same kind of engine.)
The two schedules, nurse by nurse
- Works that day
- Rule broken
Optimization engine
1February28
16 days with a rule broken
ChatGPT
1February28
86 days with a rule broken
One row per nurse (100), one column per day. Shaded columns are weekends (Friday and Saturday).
Its own summary listed most of these problems, which is honest. But it also missed some: it counted three people short of weekends off, the checker found four. Without a checker, you cannot know which part to trust.
“Then I’ll ask ChatGPT to write the program”
It is the natural next idea. ChatGPT writes code well, and the engine we used is free and open source. Why not ask it to write the scheduling program, and let the program do the math?
For a one-off test, it can work. For a schedule your team depends on every month, it creates new problems:
- It is a project, not a prompt. Someone has to describe every rule precisely, run the code, read the errors, fix them and check the output. That is the job of an optimization engineer, done by trial and error.
- Code that runs is not code that is right. A rule written slightly wrong, such as rest counted from the start of a shift instead of its end, still produces schedules that look fine. You find out when a nurse complains, or when someone checks every rule, as we did here.
- A different program every time. Ask twice and you get two programs, with different shortcuts and different results. Month to month, nobody knows which version made the schedule.
- Fine for the easy month, lost in the hard one. When the rules cannot all be met, as in our test, a good model knows which rule gives way first and says so. Quickly generated code often stops with no schedule at all, or quietly drops a rule.
- Rules change. New staff, a new agreement, a sick call on the 12th. Every change means a new prompt, new code and new risk, and someone has to own it.
- Nobody can explain the result. When a nurse asks why she has three weekends this month, “the program decided” is not an answer.
- Your staff data leaves the building. Names, contracts, vacations and sometimes health reasons end up in an outside service.
Used by an expert, ChatGPT speeds up writing the program. That is how I work with clients on scheduling engines. It does not replace knowing what a good model looks like, and how to check it.
Where AI does help
None of this means AI has no place in scheduling. It is the wrong tool to make the decisions, and a very good one for everything said in words around them:
- Turning requests into rules. A nurse writes “no more than two nights in a row this month, I have exams”. AI turns it into a rule the engine understands, and flags requests that are unclear. In ShiftHarmony, a scheduling platform I helped build for hospital departments, doctors write their requests this way instead of filling forms.
- Explaining the result. “Why am I on nights on the 12th?” The engine knows which rules forced that choice; AI turns that into a plain answer.
- Asking “what if?” “What if we hire two more nurses for nights?” AI sets up the scenario, the engine computes the answer in seconds.
- Getting started. AI can draft the list of rules from your current rota, your policies and your collective agreement, for you to review.
The bottom line
Use AI for the words, and an optimization engine for the decisions.
ChatGPT can produce a schedule that looks right. On a realistic month, it broke 7 times more rules, shared weekends and nights less fairly, took 24 minutes, and gave no way to know which parts to trust. The optimization engine found a better schedule in seconds, can explain every trade-off, and runs for free on your own computer.
How we tested: one run per method on the same data. ChatGPT was gpt-6.1-sol through the OpenAI API, with high reasoning effort and the whole month in one prompt. The optimization engine was Google OR-Tools (CP-SAT) on 8 processor cores, stopped after 5 minutes. A separate program checked every rule in both schedules.