Service
Decision model API
Typed questions about a text, answered with probabilities.
This is a small classifier, not a chat model. You give it a text and up to 8 questions, each one of three kinds: a predicate (how likely is this statement to hold), a choice (which option fits, with a probability for each) or a score (where on an ordered scale). It answers in well under a second.
From code
curl -s https://slop.her.st/api/decide -H 'Content-Type: application/json' -d '{
"input": "Subject: Your invoice is 30 days overdue. Please pay within 7 days.",
"questions": [
{"name": "spam", "type": "predicate",
"instructions": "This message is unsolicited bulk or fraudulent mail."},
{"name": "topic", "type": "choice", "instructions": "What is this message about?",
"choices": {"billing": "payments and invoices", "personal": "private correspondence",
"marketing": "promotions"}},
{"name": "urgency", "type": "score", "instructions": "How urgent is this message?",
"levels": ["low: no action needed", "medium: within weeks", "high: within days",
"critical: immediately"]}
]
}' | jq .{
"answers": {
"spam": {"type": "predicate", "probability": 0.32},
"topic": {
"type": "choice", "choice": "billing", "confidence": 0.68,
"probabilities": {"billing": 0.78, "personal": 0.15, "marketing": 0.06}
},
"urgency": {
"type": "score", "score": 1.81, "confidence": 0.5,
"legend": {"0": "low: no action needed", "1": "medium: within weeks",
"2": "high: within days", "3": "critical: immediately"},
"probabilities": {"0": 0.01, "1": 0.36, "2": 0.5, "3": 0.13}
}
},
"usage": {"input_tokens": 253}
}Tip: phrase predicates as statements ("The author is angry."), not questions. This small model answers statements more reliably, and its probabilities are cautious: a clearly true statement may come back around 0.6, a clearly false one near 0. For a compact view, pipe through jq:
curl -s https://slop.her.st/api/decide -H 'Content-Type: application/json' -d @request.json \
| jq -r '.answers | to_entries[] | "\(.key)\t\(.value.probability // .value.score // .value.choice
| if type == "number" then (. * 100 | round / 100) else . end)"'
# spam 0.32
# topic billing
# urgency 1.81Reference
| Field | Type | Notes |
|---|---|---|
input | string | The text to judge, up to 16,000 characters. |
questions | list | 1 to 8 questions. |
name | string | Unique per request: lowercase letters, digits, underscores; at most 32. |
type | string | predicate, choice or score. |
instructions | string | The statement or question, up to 500 characters. |
choices | object | Choice only: option to description, 2 to 10 pairs. |
levels | list | Score only: 2 to 10 strings, lowest first. |
| Question type | Answer fields |
|---|---|
| predicate | probability, 0 to 1: how likely the statement holds. |
| choice | choice (the winner), probabilities (every option), confidence. |
| score | score (0 up to the top level index), legend, probabilities per level, confidence. |