Laravel AI Preflight Checker with Jev Probability Scores | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. [Laravel](https://www.msaied.com/public/articles?category=laravel)
6. /
7. Decide with Jev: Build a Laravel AI Content Preflight Checker That Returns a Probability

   [Laravel](https://www.msaied.com/public/articles?category=laravel) [AI](https://www.msaied.com/public/articles?category=ai) 

 Decide with Jev: Build a Laravel AI Content Preflight Checker That Returns a Probability
=========================================================================================

 Jev is a TypeSafe AI model that returns a probability score instead of text. Learn how Harris Raftopoulos uses it with the Laravel AI SDK to build a content preflight checker that flags draft/brief mismatches before they reach an editor.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 25 Sep 2026 · Updated 25 Sep 2026 · 4 min read

ShareCopy linkCopied

 ![Decide with Jev: Build a Laravel AI Content Preflight Checker That Returns a Probability](https://cdn.msaied.com/701/916a0dd2b427c6335395d6d2684524ab.png) 

  On this page +1. [What Is "Decide with Jev"?](#what-is-quotdecide-with-jevquot)
2. [Why a Probability Score Instead of Text?](#why-a-probability-score-instead-of-text)
3. [Setting Up the Project](#setting-up-the-project)
4. [The Four Test Drafts](#the-four-test-drafts)
5. [First Results in Tinkerwell](#first-results-in-tinkerwell)
6. [What Comes Next](#what-comes-next)
7. [Key Takeaways](#key-takeaways)

 What Is "Decide with Jev"?
--------------------------

[Decide with Jev](https://laravel-news.com/decide-with-jev-laravel-ai-that-answers-with-a-probability) is a new mini course on Laravel News by Harris Raftopoulos. The goal is to build a **content preflight checker** — an app that compares a written draft against its brief and tells you how well the two align, before the draft ever reaches an editor.

The analogy is deliberate: pilots run a preflight checklist before takeoff. This app runs the same kind of check on content.

Why a Probability Score Instead of Text?
----------------------------------------

Most AI models you interact with return a paragraph. Jev, an AI model from a company called TypeSafe, returns a **number between 0 and 1** — the probability that the answer to your yes/no question is "yes."

That distinction matters in PHP:

- A paragraph is hard to act on programmatically.
- A number is easy to route through business logic.

A score of `0.96` means the draft almost certainly satisfies the brief. A score of `0.02` means it almost certainly does not. Anything in the middle can be flagged for human review. PHP can enforce thresholds on a float; it cannot reliably parse intent from a sentence.

> **Important caveat:** The number is the model's confidence in "yes" — it is not proof the answer is correct.

Setting Up the Project
----------------------

Episode 1 covers installation and first contact with the API.

```bash
# Install the Laravel AI SDK (stable branch now includes this feature)
composer require laravel/ai

```

Add your TypeSafe API key to `.env`:

```env
TYPESAFE_API_KEY=your-key-here

```

Jev runs on TypeSafe's servers, so there is nothing extra to install locally.

> **Note:** The video was recorded against the `1.x` dev branch of the Laravel AI SDK because the Jev feature had not yet merged. It has since landed on the main branch, so a standard `composer require` is all you need.

The Four Test Drafts
--------------------

To have something meaningful to score, Harris wrote four short drafts for a single brief: *show a Laravel developer how to add a `GET /hello` route and verify it in the browser.*

| Draft | Description | |---|---| | 1 | Complete — covers every step the brief requires | | 2 | Mentions routes but provides no actionable steps | | 3 | Mixed — some opinion and product news, only one instruction | | 4 | Adversarial — instructs the model to ignore the brief |

Draft 4 is reserved for a later episode where prompt-injection resistance is tested.

First Results in Tinkerwell
---------------------------

With the SDK configured, Harris queries Jev directly from Tinkerwell:

```php
use Laravel\AI\Facades\AI;

$score = AI::jev()->decide(
    question: 'Does this draft fulfill the brief?',
    context: $brief . '\n\n' . $draft
);

// Draft 1 (complete)  → 0.96
// Draft 2 (thin)      → 0.02

```

The gap between `0.96` and `0.02` is exactly what you want from a classifier: a clear signal at both ends of the scale.

What Comes Next
---------------

Episode 2 expands the single question into three parallel checks:

1. Does the draft fulfill the brief?
2. What type of content is it?
3. How clear are the instructional steps?

Running multiple Jev queries gives you a richer signal without asking the model to produce prose you then have to parse.

Key Takeaways
-------------

- **Jev returns a probability**, not text — making it directly usable in PHP conditionals and routing logic.
- **The Laravel AI SDK** (stable branch) now supports Jev out of the box; no dev branch required.
- **A content preflight checker** is a practical, low-risk way to introduce AI into an editorial workflow without removing human oversight.
- **Probability ≠ truth** — treat the score as a signal, not a verdict.
- The project source is available at [github.com/harris21/decide-with-jev](https://github.com/harris21/decide-with-jev).

---

*Source: [Decide with Jev: Laravel AI That Answers with a Probability — Laravel News](https://laravel-news.com/decide-with-jev-laravel-ai-that-answers-with-a-probability)*

- [Laravel AI](https://www.msaied.com/public/articles?search=Laravel%20AI)
- [Jev](https://www.msaied.com/public/articles?search=Jev)
- [TypeSafe](https://www.msaied.com/public/articles?search=TypeSafe)
- [AI SDK](https://www.msaied.com/public/articles?search=AI%20SDK)
- [content automation](https://www.msaied.com/public/articles?search=content%20automation)
- [PHP AI](https://www.msaied.com/public/articles?search=PHP%20AI)

 Frequently asked questions 
---------------------------

  What makes Jev different from a standard chat AI model in a Laravel app?Instead of returning a text response, Jev returns a probability score between 0 and 1 representing how likely the answer to a yes/no question is "yes". This makes the output directly usable in PHP conditionals without any text parsing.

   Do I need a special branch of the Laravel AI SDK to use Jev?No. The tutorial was originally recorded against a 1.x dev branch, but the Jev feature has since been merged into the main branch. A standard `composer require laravel/ai` install is sufficient.

   Can a high Jev probability score be treated as a definitive answer?No. The score reflects the model's confidence that the answer is "yes" — it is not proof the answer is correct. The course recommends routing borderline scores to a human reviewer rather than acting on them automatically.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://www.msaied.com/public#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://www.msaied.com/public#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleFilament v4 Migrating from v3: Breaking Changes and Refactor Patterns](https://www.msaied.com/public/articles/filament-v4-migrating-from-v3-breaking-changes-and-refactor-patterns-1) [Next articleProduction AI Agents in Laravel: Streaming, Token Budgets, and Structured Output Contracts](https://www.msaied.com/public/articles/production-ai-agents-in-laravel-streaming-token-budgets-and-structured-output-contracts-4)  

   On this page
-------------

1. [What Is "Decide with Jev"?](#what-is-quotdecide-with-jevquot)
2. [Why a Probability Score Instead of Text?](#why-a-probability-score-instead-of-text)
3. [Setting Up the Project](#setting-up-the-project)
4. [The Four Test Drafts](#the-four-test-drafts)
5. [First Results in Tinkerwell](#first-results-in-tinkerwell)
6. [What Comes Next](#what-comes-next)
7. [Key Takeaways](#key-takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://www.msaied.com/public#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://www.msaied.com/public/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://www.msaied.com/public/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://www.msaied.com/public/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://www.msaied.com/public#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://www.msaied.com/public)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://www.msaied.com/public/sitemap.xml)
