Using Nash Bargaining and LLMs to Systematize Fairness

Toward a universal protocol for fair agreements

March 23, 2026 by Ian Clarke

When my wife and I hired a mediator for our prenup in 2018, I assumed there’d be some kind of systematic process: gather each person’s concerns, weigh the tradeoffs, propose something fair. Instead it was mostly talk therapy. The mediator was great at getting us to open up about what we cared about, but actually synthesizing that into an agreement that addressed both sides was left as an exercise for the reader.

That experience got me thinking about negotiation more broadly. Without a systematic process, outcomes default to whoever is more assertive or better at strategic bluffing. Research shows that agreeable people consistently earn less over their lifetimes. Not because they’re less competent, but because they’re disadvantaged by systems that reward playing hardball.

Impact of Agreeableness on Lifetime Income

I’d read the usual negotiation books, but the ah-ha moment was discovering John Nash’s 1950 bargaining solution.

John Forbes Nash Jr.
John Nash, 1928–2015. Photo: Peter Badge / Typos1, CC BY-SA 3.0

Nash, best known from A Beautiful Mind, proposed a rigorous method for resolving conflicts of interest between two parties. His solution assumes that each participant has a utility function, a way of scoring how much they value different outcomes, and identifies the agreement that maximizes the product of their gains over fallback options.

What makes Nash’s solution compelling is that it’s provably fair in ways that feel intuitive. Neither side can gain at the other’s expense. Only relative preferences matter, not how you measure them. And the benefit of reaching a deal gets divided based on how much each side gains compared to walking away. It doesn’t care who’s louder or more stubborn.

The catch is defining each party’s utility function. Even for everyday negotiations (splitting chores, selling a house, dividing expenses) capturing your true preferences in a formal utility function is beyond what most people can (or want to) do. And without that, the Nash solution remains a mathematical ideal, not a practical tool.

Translating Natural Language into Math

You don’t need people to define their own utility functions. You just need to talk to them. An LLM interviews each party in plain language, building a picture of what they care about and why. Then, behind the scenes, we simulate hundreds of pairwise comparisons between hypothetical agreements (“would you prefer A or B?”) to build an approximate utility function from the conversation alone.

Why pairwise comparisons? We need accurate scores, but LLMs are better at comparing two options than rating each one on a numeric scale. By asking hundreds of these relative questions (“is agreement A or agreement B better for this person?”) against the priorities each party has stated, we can build a surprisingly precise utility function from plain conversation.

This approach makes honest preference reporting the best strategy. Misrepresenting what you care about only distorts your own utility function, which means a worse outcome for you. Overstating your fallback option could theoretically shift the outcome in your favor, but at the risk of eliminating agreements that would have benefited both sides.

Searching for the Best Agreement

Once we can compare any two agreements from each party’s perspective, we need to search for the one that maximizes the Nash product across all parties. Mediator.ai uses a genetic algorithm: start with a pool of candidate agreements, then repeatedly combine and mutate them to breed better ones. Crossover takes two high-scoring agreements and splices their terms together: deadline from one, payment split from another. Mutation tweaks individual terms: adjusting a dollar amount by 10%, shifting a date, swapping a clause. Each candidate gets scored against every party’s utility function, and the Nash product determines which survive to the next generation.

The mutations themselves are driven by small Lua scripts, sandboxed “mutators” that each represent a different strategy for adjusting terms. Over time, mutators that consistently produce higher-scoring offspring get selected more often. We chose Lua for its lightweight footprint and ease of sandboxing; each mutator runs isolated with no access to the filesystem or network.

Mediator.ai System Architecture

You interact with a chat-based assistant that asks questions, helps clarify your priorities, and models your preferences in the background. Each party’s assistant runs in a sandboxed environment to ensure privacy, and represents your interests during the optimization process.

That mediator my wife and I hired was good at the empathy part, getting us to articulate what we actually cared about. What was missing was the math: a way to take those preferences and turn them into something provably fair. That’s what we’re trying to build.

We’re starting with low-stakes domains: roommate agreements, household chores, shared parenting plans. The kinds of negotiations that don’t justify hiring a lawyer but still benefit from structured fairness. Most cost a few dollars, about the price of a coffee. Longer term: prenups, business partnerships, multiparty deals (though this isn’t a substitute for legal advice, and for anything binding you should still consult an attorney).

If you want to try it, poke at it, or tell us why it’s wrong: mediator.ai