<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk-m23nmqifi" -->

---
title: Detecting spam and auto-replies with Jev and the Laravel...
description: Jev, a classification model from TypeSafe, landed in the 1.x branch of the Laravel AI SDK, and freek.dev used it the same day to detect spam and auto-replies...
canonical: https://daily.dev/posts/detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk-m23nmqifi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Detecting spam and auto-replies with Jev and the Laravel AI SDK | daily.dev
og:description: Jev, a classification model from TypeSafe, landed in the 1.x branch of the Laravel AI SDK, and freek.dev used it the same day to detect spam and auto-replies...
og:url: https://daily.dev/posts/detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk-m23nmqifi
og:image: https://api.daily.dev/og/posts/M23NMqifi.png
og:image:alt: Detecting spam and auto-replies with Jev and the Laravel AI SDK
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Detecting spam and auto-replies with Jev and the Laravel AI SDK

**[FREEK.DEV](https://daily.dev/sources/freek)** · 8 min read · 0 upvotes · 0 comments

## Summary

Jev, a classification model from TypeSafe, landed in the 1.x branch of the Laravel AI SDK, and freek.dev used it the same day to detect spam and auto-replies in their new helpdesk product, There There. Unlike an LLM, Jev doesn't generate text; it takes state and a question and returns calibrated probabilities via three question types: Noul (yes/no), Choice (pick one option), and Score (rate against custom levels). The team replaced a growing list of subject-prefix and header heuristics with Jev questions defined as enum cases carrying their own thresholds, running header checks first and sending only unresolved messages to Jev in a single batched request. They report classification of three questions taking 639ms, ~48/sec throughput in parallel, and a cost of about $0.042 per million input tokens (output free), coming to roughly 36 cents a month for their volume.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://freek.dev/3194-detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk>

## Questions this post answers

### What is Jev and how is it different from a regular LLM for classification tasks?

Jev, made by TypeSafe, is a classification model that returns calibrated probabilities instead of generated text. Rather than writing a reply you then have to parse as JSON, you give it state and a predefined question, and it returns a number: the probability of yes/no (Noul), a chosen option with per-option probabilities (Choice), or a score against custom levels (Score). TypeSafe calls these System One models, trained so a 0.9 probability is correct roughly nine times out of ten.

_daily.dev surfaces practical writeups like this for developers evaluating structured AI classification versus prompting an LLM._

### How do I use Jev with the Laravel AI SDK to classify email as spam or auto-reply?

Define each classification as a Boolean, Choice, or Score question, then call Classification::of() with the message state, chain .question() or .questions(), and call .classify(). For example, a Boolean question like 'Does this request need an immediate response?' returns a probability such as 0.94, and isTrue(threshold: 0.8) converts it to a boolean using a threshold you choose per question. Jev support landed in the 1.x branch of the Laravel AI SDK, configured via TYPESAFE_API_KEY in config/ai.php.

_Developers wiring AI classification into Laravel apps follow SDK updates like this one on daily.dev._

### How fast and cheap is Jev for classifying inbound email messages?

Classifying a mail with three questions at once takes 639ms, and around 48 classifications per second are achievable when run in parallel, without any tuning effort. Jev costs $0.042 per million input tokens with output tokens free, which worked out to about four hundredths of a cent per email, or roughly 36 cents per month for one helpdesk's mail volume.

_Teams weighing AI classification costs against manual heuristics track real-world numbers like these on daily.dev._

## Similar posts on daily.dev

- [What is Jev? How System One models could change AI agents : fireup.pro](https://daily.dev/posts/what-is-jev-how-system-one-models-could-change-ai-agents-fireup-pro-eqcqub8on) · FireUp · 1 upvotes · 0 comments
- [Jev Doesn't Write Text. It Returns Probabilities.](https://daily.dev/posts/jev-doesn-t-write-text-it-returns-probabilities--3tcrb0ghc) · DEV · 7 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel)

[View this post on daily.dev](https://daily.dev/posts/detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk-m23nmqifi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Detecting spam and auto-replies with Jev and the Laravel AI SDK","url":"https://daily.dev/posts/detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk-m23nmqifi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk-m23nmqifi"},"datePublished":"2026-09-18T15:44:27.240Z","dateModified":"2026-09-18T16:16:37.602Z","description":"Jev, a classification model from TypeSafe, landed in the 1.x branch of the Laravel AI SDK, and freek.dev used it the same day to detect spam and auto-replies...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e9d134b35070f0492dc98d132c26d6fb?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e9d134b35070f0492dc98d132c26d6fb?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"FREEK.DEV","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"FREEK.DEV","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/286e833d1aaa453d99849cd4dbb7a106","url":"https://daily.dev/sources/freek"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk-m23nmqifi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,laravel","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"FREEK.DEV","item":"https://daily.dev/sources/freek"},{"@type":"ListItem","position":3,"name":"Detecting spam and auto-replies with Jev and the Laravel AI SDK"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/detecting-spam-and-auto-replies-with-jev-and-the-laravel-ai-sdk-m23nmqifi#faq","mainEntity":[{"@type":"Question","name":"What is Jev and how is it different from a regular LLM for classification tasks?","acceptedAnswer":{"@type":"Answer","text":"Jev, made by TypeSafe, is a classification model that returns calibrated probabilities instead of generated text. Rather than writing a reply you then have to parse as JSON, you give it state and a predefined question, and it returns a number: the probability of yes/no (Noul), a chosen option with per-option probabilities (Choice), or a score against custom levels (Score). TypeSafe calls these System One models, trained so a 0.9 probability is correct roughly nine times out of ten. daily.dev surfaces practical writeups like this for developers evaluating structured AI classification versus prompting an LLM."}},{"@type":"Question","name":"How do I use Jev with the Laravel AI SDK to classify email as spam or auto-reply?","acceptedAnswer":{"@type":"Answer","text":"Define each classification as a Boolean, Choice, or Score question, then call Classification::of() with the message state, chain .question() or .questions(), and call .classify(). For example, a Boolean question like 'Does this request need an immediate response?' returns a probability such as 0.94, and isTrue(threshold: 0.8) converts it to a boolean using a threshold you choose per question. Jev support landed in the 1.x branch of the Laravel AI SDK, configured via TYPESAFE_API_KEY in config/ai.php. Developers wiring AI classification into Laravel apps follow SDK updates like this one on daily.dev."}},{"@type":"Question","name":"How fast and cheap is Jev for classifying inbound email messages?","acceptedAnswer":{"@type":"Answer","text":"Classifying a mail with three questions at once takes 639ms, and around 48 classifications per second are achievable when run in parallel, without any tuning effort. Jev costs $0.042 per million input tokens with output tokens free, which worked out to about four hundredths of a cent per email, or roughly 36 cents per month for one helpdesk's mail volume. Teams weighing AI classification costs against manual heuristics track real-world numbers like these on daily.dev."}}]}
```

