Code every open-ended answer, not a sample
Ask the same questions of every survey answer, review or support chat: overall sentiment, how the customer feels about each aspect, which themes they raise. Then count, compare and track.
$0.09 per million input tokens · the scores are free
Calibrated answers for survey & review analysis, at any scale
Every aspect at once
One template with a placeholder asks about delivery, support, quality and price in the same call: a full aspect grid per response.
Numbers you can count
Probabilities over your own codes aggregate cleanly into shares, trends and segments, and the floor keeps questions comparable.
Every response
Cheap enough to code every answer of every wave, and to re-code the archive when the codebook changes.
One review, a full aspect grid
Overall sentiment, and one template asked for four aspects. The bars show p; the tick shows the floor, the same question with no review.
Customer review: Delivery was two days late and the box arrived dented, but support sent a replacement right away and the blender itself is excellent. Would buy again.
Overall, the review is (positive, mixed, or negative):
positive
0.77
mixed
0.20
negative
0.04
How does the customer feel about the {aspect} (positive, negative, or not mentioned)?
positive
0.19
negative
0.80
not mentioned
0.01
positive
0.08
negative
0.91
not mentioned
0.01
positive
0.98
negative
0.01
not mentioned
0.01
positive
0.97
negative
0.01
not mentioned
0.02
import os
import requests
resp = requests.post(
"https://api.spinf.com/v1/score",
headers={"Authorization": f"Bearer {os.environ['SPINF_API_KEY']}"},
json={
"model": "spinf-12b",
"messages": [
{
"role": "user",
"content": "Customer review:\nDelivery was two days late and the box arrived dented, but support sent a replacement right away and the blender itself is excellent. Would buy again."
}
],
"scoring": {
"queries": [
{
"id": "overall",
"template": "\n\nOverall, the review is (positive, mixed, or negative):{?}",
"options": [
" positive",
" mixed",
" negative"
]
},
{
"id": "aspect",
"template": "\n\nHow does the customer feel about the {aspect} (positive, negative, or not mentioned)?\nAnswer:{?}",
"options": [
" positive",
" negative",
" not mentioned"
],
"combinations": [
{
"aspect": "delivery"
},
{
"aspect": "packaging"
},
{
"aspect": "customer support"
},
{
"aspect": "product quality"
}
]
}
]
}
},
)
for query in resp.json()["results"][0]["queries"]:
for combo in query["combinations"]:
print(query["id"], combo["values"], [(o["text"], o["p"], o["floor_p"]) for o in combo["options"]])A live zero-shot call to spinf-12b: late delivery and a dented box read negative, support and the product positive, in one call.
Overall and per-aspect sentiment, measured
Measured on 125 synthetic customer reviews (625 aspect labels) labelled by two reviewers, and on two public review datasets, zero-shot and with 4 or 8 labelled examples placed in the prompt.
correct overall sentiment (3)
correct per-aspect sentiment
correct polarity · public product reviews
correct aspects · SemEval-2014 restaurants
The public datasets are the better guide: synthetic reviews are cleaner than real feedback. Measure on a coded sample of your own responses before relying on the numbers.
From questions to numbers
Self-serve on the on-demand API: sign up, create a key and send your first batch in minutes.
1
Turn the codebook into questions
One closed question per code or theme, and templates with placeholders for aspects. Add a few coded answers as examples when the codes are subtle.
2
Score every response
Send each wave in batches on the on-demand API: many answers per call, the questions shared.
3
Count and compare
Aggregate probabilities into shares per segment and over time, and pull the answers behind any number.
1M responses for about $32
Only input is billed, at $0.09 per million tokens: the content once per call, each question's own tokens, and one empty floor per question. The scores are free.
Assumes 120-token answers, 8 questions and aspects, batched calls. The first 50M tokens are free.
Survey & review analysis: questions, answered
More in the docs, or .
Same engine, other questions
The first 50M tokens are on us
Sign up, create a key and score your first batch in minutes.