Scheduling that can’t break the rules
Staff scheduling from plain English that cannot break the rules.
Why
A café manager describes the week the way people talk: who can't do Tuesdays, nobody closes then opens, keep it under budget. An LLM alone will happily return a schedule that looks right and breaks a labour law.
In scheduling, a plausible wrong answer is worse than no answer.
What
A pipeline where the LLM only extracts the request into a closed schema, a CP-SAT constraint solver builds the schedule, a verifier checks every rule, and an explainer says why, including why a request is impossible.
How
- Recorded the key decision up front: the LLM never writes solver code. It fills a closed schema, and validation is the trust boundary.
- Built a seeded benchmark of 100 scenarios with exact ground truth: 20 deliberately infeasible, 15 off-menu, 15 ambiguous.
- Gave the LLM-only baseline every advantage (maximum reasoning effort, the cost objective stated) so the comparison survives scrutiny.
- 312 automated tests, then live runs, because stubs only test your own assumptions.
Outcome
Live runs caught what the automated tests could not. The demo had dropped the café's 44 standing house and legal rules and scheduled a minor for 9.5 hours a day, seven days straight. Standing rules now always apply. The honest weekly cost went from $4,910 to $5,298: the correct schedule costs more, and that is the point.
They also caught a baseline that would have scored near zero for budget reasons, not capability. It was fixed before publishing so the comparison is fair.
| Measure | Result |
|---|---|
| Benchmark scenarios+ 10 hand-written holdouts | 100 |
| Infeasible / off-menu / ambiguousbuilt to test refusal and clarification | 20 / 15 / 15 |
| Automated testsplus live runs, which caught 5 bugs the tests missed | 312 |
| Weekly cost, rules enforcedwas $4,910 with rules silently dropped | $5,298 |
| Solver vs LLM-onlyfull run not yet executed | Pending |
What success meant
Success means the solver pipeline beats the LLM-only baseline on rule violations across all 110 scenarios, holdouts included. The harness is built; the full run is pending, and no result is claimed until it runs.