Eight Hours

5-minute guide · By Kelvin Cheng, Hong Kong medical graduate

Why ChatGPT fails at shift rostering — and what actually works

If you've ever pasted your staff list, leave dates, and call rules into ChatGPT hoping to save your Sunday — and ended up spending two hours fixing silent mistakes — you didn't write a bad prompt. Chatbots are the wrong tool for shift schedules.

1. Why chatbots silently break shift rules

Paste 20 names, 30 days, leave dates, and 8 rules into ChatGPT or Claude. Five seconds later, it prints a tidy table and says: “Here is your conflict-free schedule.”

Rule: Rest day (OFF) after every Night (N)Typical chatbot output
StaffFri 4Sat 5Sun 6Hidden error
Dr. ChanNAOFFBooked AM right after Night
Dr. LeePNNBack-to-back nights missed

When you reply “Fix Dr. Chan on Saturday,”it apologizes, fixes Saturday, and quietly breaks someone else's rest rule three rows down.

This happens because language models write one cell at a time by predicting plausible text. Moving one night shift affects post-call rest, weekly caps, seniority coverage, and weekend fairness across the whole month at once. A chatbot cannot verify all of those together.

2. What works instead: a constraint solver

Shift rostering isn't a writing task — it's a constraint-satisfaction problem. A constraint solver evaluates every person, day, and shift simultaneously:

  • Never-broken rules stay guaranteed. If the solver returns a roster, zero safety, coverage, or leave rules were silently dropped.
  • Fairness is balanced across the whole month. Weekends, nights, and spacing are scored as soft goals without making the month unsolvable.
  • When rules clash, it tells you which ones. Instead of hallucinating a broken table, the solver isolates the exact 2 or 3 rules that contradict each other.
Eight Hours rule levels: Never broken, Hard, and Soft

3. The 5-part ward rule checklist

Before you automate any roster (in Python or in an app), separate hard safety rules from nice-to-haves using these five buckets:

1. Daily coverage (who must be on)

How many people must work each shift every day — and which seniorities or call tiers count.

Example: Every day needs 1 Senior and 2 Juniors on Night (N), and 3 staff on AM (A).

2. Workload caps and spacing

The most calls, nights, or hours one person can safely work in a week or month.

Example: At most 1 call every 3 days, and at most 6 nights per month.

3. Rest rules and shift sequences

Transitions that are never allowed — including across the 31st of last month into the 1st.

Example: After Night (N), the next day must be OFF. Never schedule PM immediately before AM.

4. Hard leave and rotations

Approved Annual Leave (AL / PTO), study leave, mid-month trainee changeovers, and concurrent leave limits.

Example: At most 2 people off on leave on the same day across the department.

5. Soft fairness goals (optimize, don't block)

What turns a barely legal roster into one your team actually considers fair.

Example: Equal Saturday/Sunday calls, evenly spaced nights, and informal day-off wishes.

4. How to switch from Excel in one weekend

  1. Test your rules on last month's real roster first. If last month broke a rule you wrote down, that rule is really a soft goal — not a hard law.
  2. Start with safety, coverage, and leave as Hard; move everything else to Soft until you see the first clean solve.
  3. Re-solve freely. A solver takes seconds, so tweak rules and re-run until the balance feels right.
  4. Export back to Excel.Your department doesn't have to change its workflow on day one.

Want to try this without writing code?

I built Eight Hoursaround a real constraint solver so roster makers can write rules in plain English, collect leave with a single mobile link (WhatsApp, Teams, Slack, or email), and export back to Excel. It's free to try during early access — no credit card and no patient data needed.