Jev Case Study: Spam Comment Detection (Full Code)
TL;DR: This Jev example runs spam comment detection as a single judgment question on Jev 1.13. A
yesabove your confidence threshold auto-hides the comment; anything lower goes to the moderation queue. Full request body, example-fixture response, and a copy-paste curl command below.
Scenario
Our engineering blog accepts comments under every post. Every few weeks a spam wave hits — replica-watch ads, casino links, SEO gibberish that names the article topic once and then pivots to a discount site. Keyword filters catch the lazy ones; anything with light obfuscation (“best-deals-now dot club”) sails through, and the team wastes a morning cleaning up.
The fix is deliberately boring: one Jev judgment call per comment, at ingestion time, before the comment is ever shown.
- If the answer is
yesand confidence is at least0.9, hide the comment automatically and log the rationale. - If the answer is
nowith high confidence, publish immediately. - Anything else — low confidence, or an
unclearanswer — goes to the human moderation queue.
This is exactly the shape of problem Jev is built for: a judgment question (yes / no / unclear) with a typed JSON answer and a confidence value, not a chat reply that has to be parsed out of prose. Jev is TypeSafe AI’s System One judgment model, released September 2026; this example runs it through the OpenRouter OpenAI-compatible endpoint.
One design note: we do not ask the model to write anything. The question is fixed, the answer space is fixed, and the confidence score is what the gate is built on.
Request
{
"model": "typesafe/jev-1.13",
"messages": [
{
"role": "system",
"content": "Judgment question. Is this comment spam? Answer yes, no, or unclear. Reply with JSON only: {\"answer\": <yes|no|unclear>, \"confidence\": <0-1>, \"rationale\": <one sentence>}"
},
{
"role": "user",
"content": "Great article! Also check best-deals-now dot club for 90% off designer bags, fast shipping worldwide!!!"
}
]
}
Response
Example fixture — illustrative output, not a live capture:
{
"answer": "yes",
"confidence": 0.97,
"rationale": "The comment promotes an external discount site, uses urgency and punctuation patterns typical of spam, and has no substantive relation to the article topic."
}
The only fields the gate needs are answer and confidence. The rationale goes straight into the moderation audit log so a reviewer can confirm the auto-hide in one glance.
Reproduce
Set OPENROUTER_API_KEY and run:
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "typesafe/jev-1.13",
"messages": [
{
"role": "system",
"content": "Judgment question. Is this comment spam? Answer yes, no, or unclear. Reply with JSON only: {\"answer\": <yes|no|unclear>, \"confidence\": <0-1>, \"rationale\": <one sentence>}"
},
{
"role": "user",
"content": "Great article! Also check best-deals-now dot club for 90% off designer bags, fast shipping worldwide!!!"
}
]
}'
The JSON body of the response arrives inside the standard OpenAI-compatible chat completion structure; parse the message content as JSON to get the fields above.
Key parameters
| Field | Value | Why it matters |
|---|---|---|
model | typesafe/jev-1.13 | Pin the version. Confirm the exact slug on the OpenRouter model page — slugs can change between releases. |
messages[0] (system) | Judgment question + answer space + JSON shape | Declaring yes/no/unclear up front keeps the typed output stable instead of hoping the model guesses the format. |
messages[1] (user) | The raw comment | Pass the comment unmodified; pre-cleaning can strip the very signals Jev uses. |
answer (response) | yes | The gate decision: yes + high confidence → auto-hide. |
confidence (response) | 0.97 (example fixture) | The threshold input. Tune it on your own moderation history, not on ours. |
rationale (response) | One sentence | Free audit trail for every auto-hide decision. |
| Price | $0.0462 per 1M input tokens | One short call per comment; verify current pricing on OpenRouter before budgeting. |
Notes
- Responses are example fixtures; verify field names against official docs before relying on them. Official API details live at typesafe.ai — see the System One announcement post.
- Confirm the exact model slug (
typesafe/jev-1.13) on the OpenRouter model page before shipping. - Start the auto-hide threshold conservative (e.g.
0.95) and lower it only after reviewing a week of rationales from the moderation queue. A false positive hides a real reader; a false negative just costs a moderator a click. - Keep
unclearas its own path — do not collapse it intono. - Applies to Jev 1.13 (released September 2026) via the OpenRouter demonstration channel.