# Rank applications against a rubric

At the end of this guide you will have a shortlist of the 3 strongest applications from a folder, with the evidence behind each place. It uses the CLI; the same steps work from [Python](../python.md) or [the API](../api-reference.md).

You need the CLI, logged in ([CLI quickstart](../quickstart.md)), and the applications: a CSV export from your form tool (one row each), or a folder with one file per application.

## 1. Point at the applications

A form export has one row per applicant and the answers in columns. Name the columns the judge should read, the column with each application's id, and any columns it must not see:

```sh
supposing datasets push applications.csv --text-field Summary --text-field Plan --text-field Budget --id-field "Submission ID" --title-field "Project title" --metadata-field "Applicant name" --metadata-field Email --json | jq '{n_items, skipped}'
```

The judge reads Summary, Plan and Budget, each under its own heading. Names and emails stay on the items for you but are never shown to the judge. Leave the flags out and the API guesses the columns, putting names and dates in metadata. An `.xlsx` works the same way, with `--sheet` for a workbook. A folder of PDF or Word files works too; add `--redact` to remove names, emails and phone numbers from what the judge reads. The rest of this guide uses a folder, `./applications`; a CSV takes the same flags everywhere.

## 2. Write the rubric

The rubric is what the judge reads before each comparison. Write it as you would brief a reviewer. Named criteria with weights tell the judge what matters most:

```sh
cat > rubric.md <<'RUBRIC'
# Small grants 2027

Which application makes the stronger case for a grant?

## Criteria

- Impact (weight 2): how many people benefit, and how much.
- Feasibility: can this team do it with this budget and time?
- Evidence: data, pilots or letters that back the claims.

## Judge instructions

Ignore formatting, spelling and length.
RUBRIC
```

## 3. Check the cost

```sh
supposing run ./applications --rubric @rubric.md --top-n 3 --provider mock --dry-run
```

`--top-n 3` tells the run you only need the best 3. After 3 rounds it spends its calls on the applications near the cut, and stops once the top 3 are settled. So the estimate is a range.

`--provider mock` keeps this guide free. For the real run, leave it out and the default judge, Claude Haiku, is used.

## 4. Run it

```sh
supposing run ./applications --rubric @rubric.md --top-n 3 --provider mock --json > shortlist.json
jq -r .results.summary shortlist.json
```

The summary says how many of the 3 places are settled. An application is settled in the top 3 when it has at least a 95% chance of a place there.

## 5. Read the shortlist

```sh
jq -r '.results.ranking.leaderboard[:5][] | "\(.rank)  could be \(.rank_lo)-\(.rank_hi)  \(.title)"' shortlist.json
```

**could be 2-4** means the application belongs somewhere from 2nd to 4th with 90% confidence. If 3rd and 4th overlap, the judge has not separated them: read both. [Reading the result](../concepts/intervals.md) explains more.

## 6. Check the evidence

Every place rests on verdicts you can read. List the judge's reasoning for the top application:

```sh
RUN=$(jq -r .run.id shortlist.json)
TOP=$(jq -r '.results.ranking.leaderboard[0].item_id' shortlist.json)
supposing comparisons "$RUN" --item "$TOP" --limit 3
```

And check that the judge was consistent:

```sh
jq -r .results.ranking.diagnostics.reliability.line shortlist.json
```

If a check is poor, [Judge checks](../concepts/judge-checks.md) says what to change.

## Recap

1. A CSV export or a folder, with the columns the judge reads and the ones it must not.
2. A rubric file with weighted criteria.
3. `--dry-run` to see the cost before spending.
4. `--top-n 3` to spend calls only where the shortlist is decided.
5. `could be` ranges to see which places are settled and which are ties.
6. `supposing comparisons` to read the reasoning behind a place.
