Skip to content

CLI quickstart

At the end of this page you will have ranked a file of model outputs, first on your machine and then in the cloud. It takes about five minutes and costs nothing.

You need Python 3.12 or later, and the texts to rank: a JSONL or CSV file with one item per row, or a folder with one document per file (.md, .txt or .html). The examples use outputs.jsonl.

Terminal window
pip install supposing

No file at hand? This makes a small one, four answers to the same prompt:

Terminal window
cat > outputs.jsonl <<'JSONL'
{"id": "gpt-a", "prompt": "Explain tides to a 10-year-old.", "output": "The Moon pulls on the sea, so the water bulges toward it. As Earth spins, your beach moves in and out of that bulge: high tide, then low tide, twice a day."}
{"id": "gpt-b", "prompt": "Explain tides to a 10-year-old.", "output": "Tides are caused by gravitational interactions between the Earth, Moon and Sun, producing periodic variations in sea level."}
{"id": "claude-a", "prompt": "Explain tides to a 10-year-old.", "output": "Imagine the Moon gently tugging the ocean like a blanket. Where it tugs, the water piles up a little. Earth turns under that pile, so the sea comes in and goes out."}
{"id": "claude-b", "prompt": "Explain tides to a 10-year-old.", "output": "Water goes up and down because of the Moon."}
JSONL
Terminal window
supposing rank outputs.jsonl --text-field output --id-field id --rubric "Which explanation would a 10-year-old understand best?" --provider mock

--text-field names the field with the text to judge and --id-field the row’s id, which every result keeps. For a CSV, name the columns the same way; repeat --text-field to join several columns. Without these flags, a field called text, output, response or answer and a field called id are used.

--provider mock is a fake judge. It is free and needs no account, so you can check the whole flow first. No data at all yet? supposing rank --sample stories --provider mock ranks a built-in sample. It picks winners from a hash of each text, so its ranking means nothing.

The output starts with one sentence, the verdict. Then comes one row per item. could be is the range of places the item holds with 90% confidence. Where two ranges overlap, the judge has not told those items apart. Reading the result explains the rest.

The cloud keeps your datasets and runs, makes many judge calls at once, and shows every verdict in the web app. Sign up at app.supposing.app, create an API key under Developers, then:

Terminal window
supposing login

Paste the key when asked. The CLI checks it and saves it to ~/.config/supposing/config.json, readable only by you.

Terminal window
supposing run outputs.jsonl --rubric "Which explanation would a 10-year-old understand best?" --provider mock

Before anything starts, the CLI prints the estimate: items, judge calls, money and time. Then it uploads the rows as a dataset, starts the run, follows it and prints the result. A folder of documents works the same way: supposing run ./proposals ....

Put the rubric in a file, so you can reuse and refine it:

Terminal window
echo "Which explanation would a 10-year-old understand best? Prefer concrete images over jargon." > rubric.md

Then leave out --provider mock. The estimate now has a price, and the CLI asks before it spends anything. In a script, add --yes to skip the question and --max-cost to cap the spend:

Terminal window
supposing run outputs.jsonl --rubric @rubric.md --yes --max-cost 2

@rubric.md reads the rubric from the file. A file can also weight its criteria: see the CLI reference.

  • supposing run uploaded the rows of outputs.jsonl as a dataset, each titled by its id. Running it again with the same rows reuses that dataset.
  • The run paired documents of similar strength, round after round, and asked the judge about each pair in both orders. How pairwise ranking works has the detail.
  • Every verdict is kept. List them with supposing comparisons <run-id>:
Terminal window
RUN=$(supposing run outputs.jsonl --rubric @rubric.md --provider mock --rounds 4 --detach)
supposing runs watch "$RUN" > /dev/null
supposing comparisons "$RUN" --limit 2

Next: Rank applications against a rubric, or the CLI reference.