Verified against Gemini · 2026-08-08
Use Gemini's extended reasoning to solve a real multi-constraint scheduling problem
A prompt structured for Gemini's extended-thinking reasoning mode that states every hard constraint and every soft preference explicitly for a genuinely constrained planning problem, so the model's reasoning step actually checks candidate solutions against all of them instead of producing a plausible-looking schedule that quietly violates one.
The prompt
Ready to copy — highlighted parts are example details you can swap.
PROBLEM building a two-week on-call rotation for an 8-person engineering team HARD CONSTRAINTS (a violated one makes the whole schedule invalid) no one is on-call two weekends in a row; nobody is scheduled during their stated vacation dates; every shift needs exactly one primary and one secondary SOFT PREFERENCES (optimize for these on a best-effort basis, but never at the expense of a hard constraint) try to balance total on-call hours roughly evenly across the 8 people over the two weeks, and avoid putting the same two people on together twice if it can be avoided PEOPLE AND DATA the 8 names, each with their specific vacation dates and any standing preference already noted (e.g., Priya prefers not to be primary on weekends) INSTRUCTIONS 1. Think through this as a genuine constraint-satisfaction problem, not a single confident pass — generate a candidate schedule, then actively try to find a way it fails before presenting it. 2. After producing a candidate schedule, explicitly check it against every hard constraint listed above, one by one, and only present it as final if all of them pass — if one fails, revise and recheck rather than presenting a schedule you haven't actually verified. 3. If you find a hard constraint violation during verification, don't patch just the one broken slot in isolation — re-check whether your fix creates a new violation elsewhere, since a schedule this constrained often has fixes that ripple. 4. If a genuinely impossible combination of hard constraints exists, — for example, everyone who could cover a specific weekend is on vacation that same weekend — say so explicitly rather than silently violating one constraint to produce a schedule that looks complete. Naming the actual conflict is more useful than a schedule I'd have to re-verify myself before trusting it. 5. Once you have a schedule that passes every hard constraint, note how well it satisfies the soft preferences and where it fell short, so I know what a human might want to adjust by hand. IF THE FIRST CANDIDATE SCHEDULE FAILS VERIFICATION Don't discard the whole candidate and start over from scratch by default — first check whether a small, targeted adjustment to the specific slot that failed resolves it without touching anything else, since a full restart risks losing soft-preference balance you'd already achieved elsewhere in the schedule. Only rebuild from scratch if a targeted fix genuinely isn't possible given the constraints. EXPLAINING TRADE-OFFS, NOT JUST STATING THE RESULT Where you had to choose between two soft preferences that couldn't both be fully satisfied (balancing hours evenly versus avoiding a repeated pairing), say which one you prioritized and why, so a human reviewing the schedule understands the trade-off that was made rather than just seeing the outcome without the reasoning behind it. IF THE PROBLEM IS UNDERSPECIFIED If the data provided leaves a genuine gap that affects the schedule (a ninth person mentioned in passing with no stated vacation dates), ask for the missing detail before proceeding rather than silently assuming a default that could be wrong. OUTPUT FORMAT The final schedule as a clear table. Below it: a section titled "Verification" showing each hard constraint from above and a one-line confirmation of how the final schedule satisfies it, a "Trade-offs" section explaining any soft-preference conflicts and how they were resolved, plus a short note on any soft preference it didn't fully achieve and why.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
Extended-thinking mode gives the model room to explore and backtrack from candidate solutions before committing to a final answer, which is exactly the shape a real constraint-satisfaction problem needs — a single-pass answer tends to satisfy the constraints stated earliest and most prominently while quietly dropping one stated later in the prompt, because token generation is sequential and doesn't naturally re-check earlier choices against a constraint introduced afterward without being explicitly told to loop back and verify. Explicitly separating hard constraints from soft preferences matters because they need genuinely different handling: a violated hard constraint invalidates the whole schedule and must trigger a revision, while a soft preference is something to optimize for only on a best-effort basis — collapsing both into one undifferentiated list of 'things to consider' is what produces a schedule that looks pretty good overall but has silently broken a rule that was never actually optional. The explicit verification step — checking the candidate schedule against every hard constraint one by one after generating it — forces a second, distinct reasoning pass dedicated purely to falsification, rather than trusting that the generation process already accounted for everything correctly; this catches the specific and common failure where a schedule looks locally reasonable shift by shift but violates a constraint only visible when checked against the full two-week picture at once, like the same person landing on two consecutive weekends. Providing the actual people, their real vacation dates, and any standing preferences as concrete data — rather than an abstracted version of the problem — is what makes the reasoning verifiable against ground truth at all: a schedule can only be checked against 'nobody works during their vacation' if the vacation dates are stated as facts the model can point back to during its own verification pass, not left implicit.
What you get back
Verification: (1) No consecutive weekends — checked, no person repeats on adjacent weekends. (2) Vacation dates respected — checked against all 8 stated ranges, no conflicts. (3) One primary + one secondary per shift — checked, all 14 shifts covered. Soft preference note: hours are balanced within 4 hours of each other across the team, except Priya, who has 6 fewer hours than average because her vacation removed one full weekend of availability — flagging this as the one imbalance a human might want to address in the next rotation.
Verified against
Gemini Gemini 3 Pro · 2026-08-08
Changelog
- 2026-08-08 — Initial publish, verified against Gemini 3 Pro extended-thinking mode on an 8-person on-call rotation problem.
Need this built into your business?
If a prompt isn't enough — what Scult builds, built and maintained for you — that's Scult's day job.
EXPLORE WHAT SCULT BUILDS
