v0.7.0Open source · Apache 2.0 Document ranking
Document ranking
from your terminal.
An open source library for document ranking, powered by LLMs and statistical methods.
uv add supposingrank rating won-lost itemrange 1 2335 16-0 The Lighthouse Keeper's Ledger 2 1913 12-4 The Census Taker 3 1899 12-4 Salt 4 1752 10-6 The Translator 5 1722 9-7 An Inheritance of Clocks 6 1567 10-6 Notes Toward a Second Moon 7 1566 7-9 Quarterly Review 8 1316 7-9 My Cat 9 1249 6-10 The Battle of Zorgon Prime 10 1179 5-11 Rain 11 894 2-14 The Most Beautiful Sunset 12 607 0-16 The Meeting That Could Have Been An Email
from code
Command line, Python or HTTP.
Every run shows its estimate before it spends.
# free first try: the mock judge, no key uvx supposing rank --sample stories \ --rubric "Which is the better short story?" \ --judge mock # then a real judge: estimate first, then cap the spend uvx supposing rank --sample stories --dry-run uvx supposing rank --sample stories --max-cost 2
Real output, mock judge
Estimate: 12 items, 48 judge calls with mock, free: made-up verdicts, no model is called The Translator ranks first, but the best could be any of the first 6. …
# uv add supposing
from supposing import rank, samples
docs = samples.load("stories")["items"]
ranking = rank(docs, "Which is the better short story?", provider="mock")
print(ranking.summary)
for row in ranking.leaderboard:
print(row["rank"], row["title"], row["rank_lo"], row["rank_hi"])Real output, mock judge
The Translator ranks first, but the best could be any of the first 6. 1 The Translator 1 4 …
# price it, then run it, with the same body
curl https://api.supposing.app/v1/runs/estimate \
-H "Authorization: Bearer $SUPPOSING_API_KEY" \
-H "Content-Type: application/json" \
-d '{"dataset_id": "'$DATASET'",
"judge": "quick",
"ranking": {"rubric": "Which pitch is more fundable?"}}'Response shape, from the docs
GET /v1/runs/{id}/results
{ "summary": "…",
"ranking": { "leaderboard": [
{ "rank", "rank_lo", "rank_hi", "title" } ] } }Evaluating prompts and modelsChecking prompt changes in CIPairwise LLM judge in PythonIssue backlog triage
from your agent
Or hand it to your agent.
Use Supposing to rank the files in <path> by which is strongest against <rubric.md>. Read https://rank.supposing.app/docs/llms.txt first. Do a free run with the mock judge, show me the cost before any paid run, and tell me which places are close calls.
Hosted MCP connector
https://api.supposing.app/mcp- Claude Code
claude mcp add --transport http supposing https://api.supposing.app/mcp- Claude and ChatGPT
- Add a custom connector with the URL above, then sign in.
rank_documentscompare_optionsget_runget_resultslist_samples
Connector setup On GlamaRanking documents over MCPBest of N for agentsReviewing agent transcripts