ThinkThen

Yes or no, per record

rank: sort records by how likely the answer is yes.

The outage comes first and the quote due today second. The bill due in a month comes third, and the newsletter that needs no reply comes last.
question="Is this urgent?"

cat <<'EOF' |
Newsletter: our autumn catalog is here. No reply needed.
Our checkout page is down and customers cannot pay
Reminder: your invoice is due in 30 days
Please send the signed quote by 5 pm today
EOF
thinkthen rank "$question" --batch 1
Output
Our checkout page is down and customers cannot pay
Please send the signed quote by 5 pm today
Reminder: your invoice is due in 30 days
Newsletter: our autumn catalog is here. No reply needed.
exit 0: the run finished

You give it one yes-or-no question and many records. You get back every record again, most likely first.

Read the answer

rank takes no threshold. It drops nothing, and nothing is not sure. The sort happens on this machine.

Exit codeWhat it means
0the run finished
2usage or input error
4the backend failed or refused, as it does for evidence over the size limit
5a local failure
70a defect in the tool

Call it from your language

The Bash example opens this page.

Jobs that use rank

Watch rank answer questions about Beatles songs: rank sorts by your criteria.