Open source · Apache-2.0 · Python 3.9+
A pairwise LLM judge, as a Python library.
One call compares your texts two at a time against a rubric and returns them in order, with a 90% range on every place. On your machine, with your own model key.
uv add supposingfrom supposing import rank docs = {"a.md": "Solar panels for 40 rural schools, 4-year payback.", "b.md": "An app for everything. Details to follow.", "c.md": "Late opening hours at the town library, three evenings a week."} ranking = rank(docs, "Which proposal makes the strongest case for funding?", judge="mock") # a real judge: judge="quick", with OPENROUTER_API_KEY set print(ranking.summary) for row in ranking.leaderboard: print(row["rank"], "could be %d-%d" % (row["rank_lo"], row["rank_hi"]), row["item_id"])
ranking.summary
a.md ranks first, but the best could be any of the first 2.
ranking.leaderboardrank · rank_lo–rank_hi · rating
- 1a.md1712
- 2c.md1655
- 3b.md1133
ranking.comparisons[0]
a.mdoverc.md
A says who benefits and how much: 40 schools, paid back in four years. C describes a service but not what it changes.
ranking.diagnostics["reliability"]["line"]
Mostly consistent, with 1 caution: split-half reliability 0.63.
Example data
Any model can judge.
The judge is one argument. Nothing else in the call changes.
from supposing import make_provider, rank ollama = make_provider({"provider": "openai_compat", "base_url": "http://localhost:11434/v1", "model": "llama3.2"}) ranking = rank(docs, "Which proposal makes the strongest case for funding?", judge=ollama)
A model that reports a price can be capped with max_cost_usd. planned_calls(n, RankConfig(...)) gives the most calls a run will make, before it starts.
judge= | Needs |
|---|---|
"quick"Claude Haiku 5.5 on OpenRouter, the default | OPENROUTER_API_KEY |
"balanced"Claude Sonnet 5.5 | OPENROUTER_API_KEY |
"thorough"Claude Opus 5.5 | OPENROUTER_API_KEY |
"openai/gpt-6.2-sol"Any OpenRouter model id | OPENROUTER_API_KEY |
"anthropic"An Anthropic model, with model= | ANTHROPIC_API_KEY |
"claude_cli"Your Claude subscription | Claude Code, logged in |
make_provider(…)Ollama, vLLM, LM Studio, OpenAI | The server's URL |
my_judgeYour own function of two items | Nothing |
"mock"Made-up verdicts, to try the flow | Nothing |
The method, written down.
- 01
Swiss rounds
Each round pairs every document once, with one of similar rating. Default 8 rounds: about 4 judge calls per document.
- 02
Random first position
Each pair is judged once, a random text shown first, so position bias averages out. both_orders=True judges both ways.
- 03
Bradley-Terry
Ratings fitted to all verdicts at once, with a weak prior that keeps an unbeaten document finite.
- 04
A range on every place
From 2,000 draws of the rankings that fit the verdicts. Overlapping ranges are ties.
Each result also checks the judge: position bias, length bias, split-half reliability. And backtest scores a ranking against decisions you already made. The README has the detail
Pairs, against the same LLM scoring alone.
Two public back-tests, same model and rubric. Your texts are a different test: read a few verdicts.
SupposingLLM scores alone
Before you try it
Do I need an account?
No. uv add supposing and run it on your machine.
judge="mock" is free and needs no key, with made-up verdicts for trying the flow. A real judge needs a key for its provider, a Claude Code login, or a local model server.
Which models can judge?
Claude Haiku, Sonnet or Opus 5.5 and any other OpenRouter model id (OPENROUTER_API_KEY), an Anthropic model (ANTHROPIC_API_KEY), your Claude subscription through claude_cli, any OpenAI-compatible server such as Ollama, vLLM or LM Studio, or a Python function you write.
What does it cost?
The library is free and Apache-2.0.
Your model provider bills its own calls: by default 8 rounds of n ÷ 2 pairs, so about 4 calls per document. planned_calls gives the most calls a run makes, and max_cost_usd caps the spend for judges that report a price. claude_cli and local models cost nothing extra.
Where does my text go?
Only to the judge you choose: your model provider, your Claude subscription, or a model on your own machine.
The library sends no telemetry. Supposing Cloud is a separate, optional service.
Can I trust the order?
On 100 learner essays from the public ELLIPSE dataset, Supposing agreed with trained human raters on 86% of pairs; the same LLM asked for scores alone agreed on 67%.
On 300 real headline tests from the public Upworthy archive, Supposing picked the headline with more clicks 77% of the time; the same LLM asked for scores alone, 71%. On your texts, read the ranges, the judge checks and a few verdicts, or backtest against decisions you already made. The essay study
Can I change what the judge is told?
Yes, one argument at a time: context for a brief, examples of past judgements, your own system prompt as a JudgePrompt template, or your own judge function.
The library still chooses which text is shown first, reads the verdict and runs the judge checks. Customising the judge