Article
CommunityJev Integrations & Adapters
Spam and Auto-Reply Detection in There There
Freek Van der Herten describes replacing a fifteen-language subject-prefix list with Jev in There There's helpdesk: three questions in one call, header checks first, raw probabilities stored next to each thresholded verdict.
- Format
- Article
- Reading time
- 3 min
- Published by
- Community
- Author
- Freek Van der Herten
- Last verified
- Oct 2026
- Languages
- PHP
- Capabilities
- Requires API key
Highlights
- Jev support landed in the 1.x branch of the Laravel AI SDK a day before the post, and There There started using it for spam detection the same day.
- Mail headers are checked first, and the subject-prefix lists Jev replaced covered fifteen languages plus nine bounce patterns.
- An InboundJudgement enum carries each question with its threshold: IsAutoResponse 0.75, and IsBounce and IsSpam 0.9; true and false descriptions are optional.
- All unsettled questions go out in one request with a 10-second timeout; the body is truncated with Str::limit(..., 10_000) and failures are logged and skipped.
- Measured: three questions on one mail take 639 ms, about 48 per second in parallel, at $0.042 per million input tokens - roughly 36 cents a month.
Watch out
One team's production notes rather than a benchmark: the 639 ms and 48-per-second figures come from There There's own setup with no tuning, and the calibrated-probability claim is TypeSafe's. The $0.042 per million input tokens price and the cents-per-month estimate are specific to that workload.
Questions about this entry
Short answers drawn from the linked project or page.
Helpdesk mail that is not from customers: out-of-office replies, bounces, subscription confirmations, DMARC reports, and spam. Header checks and a growing subject-prefix list handled some; everything they could not answer now goes to Jev before an LLM writes titles and summaries.
Classification::of(state)->question(...)->classify() returns answers by name: a Boolean gives a probability, so urgent came back 0.94 with isTrue(threshold: 0.8); a Choice gives the pick, probabilityOf per option, and confidence; a Score rates on levels and can land between them.
As a string or an array whose parts have names. The refund example combines subject, message, an order with its charges, and a refund policy into one state, still a single thing being judged.
Each InboundJudgement case carries its own threshold and is applied with isTrue(threshold). Raw probabilities are stored next to the verdicts so a threshold can change later and you can see what it would have done; workflow conditions then read a column without calling Jev.
Configure Jev like any other provider in config/ai.php with a TYPESAFE_API_KEY in your env file, then use the Classification facade with Boolean, Choice, and Score questions, a 10-second timeout, and the message body truncated before sending.
Classifying one mail with three questions took 639 ms, and the pipeline processes around 48 per second in parallel. At $0.042 per million input tokens with free output tokens, the post estimates four hundredths of a cent per mail, about 36 cents a month.
It reports one helpdesk's operational numbers, not an accuracy benchmark; the claim that a 0.9 probability is right about nine times in ten is TypeSafe's description of calibration. Thresholds here are the author's choices, and the failure path just logs and moves on.
Reactions & coverage
Posts, threads, and videos about this entry from around the web.
X: 1,565 emails, six decision models
X: Fifty emails in under two seconds
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.