DEV Community

Renato Marinho
Renato Marinho

Posted on

Stop asking LLMs to 'be fair'. Give them an algorithm instead.

If you ask Claude or ChatGPT to "make a chore schedule so everyone is happy," you aren't getting logic. You're getting a probabilistic guess masquerading as fairness.

LLMs are notorious for losing track of stateful constraints over long sequences. They might suggest Alice does the dishes on Monday, and then—forgetting they just did that—suggest she does them again on Tuesday. They call it a schedule; we call it a recipe for an argument in the kitchen.

When building AI agents, the mistake people make is assuming the model possesses inherent mathematical reasoning for scheduling. It doesn't. It predicts tokens. To get actual reliability, you have to move the heavy lifting from the prompt to a specialized tool via MCP.

The Deterministic Fix

I recently looked into the Fair Chore Rotation Algorithm MCP server, and it addresses exactly this gap between "vibes" and "verifiable math." Instead of letting an agent hallucinate a sequence, this server provides three distinct primitives that turn an LLM from a storyteller into a scheduler:

  1. generate_rotation_grid: This isn't just text generation. It creates a complete day-by-day assignment schedule using cyclic rotation and daily offsets.
  2. validate_rotation_integrity: This is the crucial part most developers skip. It’s an automated check to ensure no person receives the same task twice in a row.
  3. calculate_task_frequency: A utility to measure assignment equality across the entire period.

The magic happens in the daily offset implementation. By incrementing the task index for every participant each day, it mathematically guarantees that no one repeats a chore on consecutive days—something even GPT-4o struggles to guarantee consistently without external validation.

Why 'Prompt Engineering' fails here

You can spend 500 tokens describing "rules for fairness," but eventually, as the schedule grows to 14 or 30 days, the attention mechanism will drift. The agent will lose interest in those rules mid-way through generating the third week.

By exposing these functions through MCP, you change the workflow entirely:

  • Weak Workflow: User $\rightarrow$ Prompt ("Make a schedule") $\rightarrow$ Agent (Hallucinates violation) $\rightarrow$ User (Angry).<br>
  • Strong Workflow: User $\rightarrow$ Prompt ("Make a schedule") $\rightarrow$ Agent calls generate_rotation_grid $\rightarrow$ Agent calls validate_rotation_integrity $\rightarrow$ Result (Verified Math).<br>

A single glance at how engineers interact with tools tells me everything I need to know about production readiness. Most hobbyist MCP servers provide "information retrieval"—they fetch data and spit it back out. Production-grade servers provide "computation"—they solve discrete problems within isolated environments.

The Fair Chore Rotation server operates under our standard V8 isolation layers used in Vinkius, meaning you can trust its execution doesn't leak or bloat your context window unnecessarily. We focused heavily on keeping latency low ($\approx 692\ ext{ms}$ average), which is vital when an agent needs several turns of thought to finalize a plan.

Practical Application

You don't need permission from your housemates once you have a verified grid. If you want to test this yourself within Cursor or Claude Desktop, you can plug this directly into your environment through Vinkius without having to manually handle OAuth callbacks or containerize your own Python scripts.(It's really just: subscribe, grab token, paste.)<br>
A quick example of what high-quality tool usage looks like:<br>><br>>User: Generate a 5-day chore schedule for Alice, Bob, and Charlie with tasks: Laundry, Dishes, and Vacuuming.<br>>Agent (via Tool): Day 1: Alice - Laundry... Day 2: Alice - Dishes... (and so on)<br>/><br>
The difference isn't just in the output format; it's in the certainty behind it.

The goal of MCP shouldn't be giving agents more things to talk about; it should be giving them things they can actually do correctly.\


MCPs are the music of AI Agents. We built the catalog. Discover Vinkius MCP Catalog.

Top comments (0)