Skip to content

rank

rank returns results in rank order, retaining each original message.

Terminal window
thinkthen rank --level routine --level urgent \
'How urgent is the request?' messages.txt

Output

I was charged twice for one invoice.
Where is my parcel?
Please refund my order.
messages.txt
Please refund my order.
Where is my parcel?
I was charged twice for one invoice.

rank puts many messages in order along your levels, highest first.

Terminal window
thinkthen rank 'How urgent is the request?' messages.txt \
--level routine --level urgent --json |
jq -r 'select(.status == "answered") | "\(.answer) \(.item)"'

answer is the rank, starting at 1, and item is your message. rank reads the whole file before it prints anything. --top 5 ranks only the first five. A failed message comes after the ranked ones, with status set to failed. Without --json, rank prints your messages in rank order.

Options
OptionWhat it does
<QUESTION>Question to ask
[FILE]...Input files; default: standard input
--name <NAME>Optional execution identity
--text <TEXT>Judge this text instead of reading input
--level <LEVEL>Scale level; repeat low to high
--describe <LABEL=TEXT>Description for a label; repeat
--top <TOP>Maximum answered ranks
--column <COLUMN>Field column; repeat; replaces a saved pointer
--details [=<DETAILS>]Add status, probability, error, detail and source columns
--in-place [=<IN-PLACE>]Replace source with backup
--into <INTO>Answer field for JSON Lines; column for tables
--output <OUTPUT>Destination path
--sheet <SHEET>Worksheet

Shared options