Reading time: about 10 minutes
Here the AI does the boring part — distributing shifts and adding hours — and you do what it cannot: check the result against the collective agreement. It is the most delicate case in this block because a bad rota is a claim waiting to happen, so the weight here is on the checking, not on the generating.
Step by step
-
Give it the hard rules before the problem
A rota is a constraint problem, and a model respects the constraints you write down and no others. If you do not mention weekly rest, it will happily produce seven-day weeks.
The non-negotiables, all of which go in the prompt: the annual cap, rest between shifts, weekly rest, each person’s holidays, and hours already worked or committed.
And do not give it names. "Person 1, person 2" works exactly the same and saves you sending a third party who works in your pharmacy and when. You add the names at the end, on your own sheet.
Help me build the annual rota for a pharmacy in Spain. STAFF (no names): - Person 1: full time - Person 2: full time - Person 3: 60% part time - Person 4: 50% part time, afternoons only OPENING: Mon-Fri 9:00-14:00 and 17:00-20:30; Sat 9:30-14:00 Closed Sundays and 12 public holidays. RULES THAT CANNOT BE BROKEN: - Maximum 1,785 hours a year for a full-time contract. Part-timers, pro rata. - Minimum 12 hours’ rest between the end of one shift and the start of the next. - One and a half consecutive days of weekly rest. - 30 calendar days of holiday per person. - There must ALWAYS be at least one pharmacist on during opening hours. Give me: 1. The typical weekly distribution, as a table. 2. The ANNUAL HOUR TOTAL each person ends up with under that pattern. 3. The gap between that total and their maximum, in hours. 4. Any week where one of the rules above is broken. Show me how you calculated the annual hours. If a constraint is impossible to meet with this staff, SAY SO instead of inventing a rota that looks like it adds up.
-
Add the annual hours yourself. Always.
This is the check you never skip here, and it is three lines of arithmetic: hours in the typical week × weeks actually worked. Weeks actually worked are not 52: holidays come off.
With 30 calendar days of holiday you get about 47.7 working weeks. If the typical week is 37.5 hours, 37.5 × 47.6 ≈ 1,785. That is the reconciliation, and it has to come out for you too.
If the model gives you a total you cannot reproduce with that multiplication, do not accept it however good it sounds. And watch for the opposite, which is the commonest: totals well below the cap, meaning weeks were left out of the calculation.
-
Check the part-timers separately
Part-time contracts are where it goes wrong most, and in a specific way: it applies the percentage to the weekly hours and then multiplies by full-time weeks, or the other way round.
The check is the same one, done against their own cap: 60% of 1,785 is 1,071 hours. If the model gives them 1,150, that is not rounding: it calculated by a different route.
And there is an agreement detail that is not arithmetic and the model does not know: on part-time contracts the night supplement is not pro-rated. If your rota has shifts running into night hours, that is paid separately and does not come out of this table.
-
Move it to your own sheet and put the names there
Ask for the table as CSV or Markdown and paste it into your spreadsheet. That is where the names go, where each person’s specific requests go, and where the real rota lives.
This is not only about privacy: the rota will change twenty times during the year, and your own sheet with a running-hours column tells you in March what used to surface in November.
-
Before you pin it up: what a person decides, not a model
A rota can meet the hours and still be a bad rota. None of this is in any number and you know all of it: who cannot do Tuesday afternoons, who has done every Saturday for three years, and that two particular people do not work well together on a bank-holiday Friday.
The AI gave you the legal skeleton. The version you pin up you adjust yourself — and then you add the hours again, because every adjustment moves the total.
And if there is staff representation or an internal agreement on how shifts are shared, that overrides any rota a model generates. This is not a technical check: it is whose decision it is.
A full example, and what is wrong with it
The four people from step 1 — two full time, one at 60% and one at 50% afternoons — with the opening hours given. This came back.
Calculated annual totals:
Person 1 (full time): 37.5 h/week × 47.6 weeks = 1,785 h. Margin: 0 h.
Person 2 (full time): 37.5 h/week × 47.6 weeks = 1,785 h. Margin: 0 h.
Person 3 (60%): 22.5 h/week × 47.6 weeks = 1,071 h. Margin: 0 h.
Person 4 (50%, afternoons): 18.75 h/week × 47.6 weeks = 892.5 h. Margin: 0 h.
"No week breaches the stated rules. The distribution respects the 12-hour rest and the day-and-a-half weekly rest."
And now, what is wrong with that reply:
- The arithmetic is impeccable, and that is the problem. 37.5 × 47.6 = exactly 1,785. The part-timers, exactly pro rata. Everything matches to the decimal. And a margin of zero on all four is the signal that something is wrong: a real rota never lands exactly on the cap, because there are absences, swaps, training and busy weeks.
- With no margin, the first absence puts you in breach. If somebody gets flu for a week and another covers, that other goes over 1,785 and there is nowhere left to compensate: the year is full. A rota at 100% of the cap is not a tight rota, it is one that cannot survive reality. A sensible buffer is 40 to 60 hours per person.
- The 47.6 weeks assume everybody takes holiday at once. 30 calendar days is 4.3 weeks, and 52 − 4.3 = 47.7. Correct for one person. But in a pharmacy holidays are spread across the year, and the weeks somebody is away have to be covered — so the others’ effective weeks are not 47.6. The per-person calculation is right and the whole does not close.
- And "no week breaches" is a statement, not a calculation. The prompt asked for "any week where one of the rules is broken". It answered that there are none, without showing the sweep. It may be true; you do not know. Ask explicitly for "show me the week with the least rest between shifts and the one with the least weekly rest" — with day names. If those two comply, the rest do.
None of the four problems is arithmetical, which is why none shows up when you check the sums. They show up when you ask whether the rota survives a real year, a question the model does not ask itself.
Ask again with two more things in the prompt: "leave a 50-hour margin per person" and "holidays do not overlap, spread them between June and September". You get a worse rota on paper and a much better one in January.