---
title: Jev won't tell you why it scored an event. Here's how we tuned it for fraud anyway
source_page: https://www.sardine.ai/blog/tuning-typesafe-ai-jev-fraud-detection
canonical: https://www.sardine.ai/blog/tuning-typesafe-ai-jev-fraud-detection
format: text/markdown
date: 2026-11-19T14:00:00.000Z
author: Chen Zamir
description: Sardine tuned TypeSafe AI's Jev for real-time fraud detection. After a leak fix and feature trimming, Jev matched Claude Opus 5.5 at under 1% of the cost.
---

**Quick links:** [Human page](https://www.sardine.ai/blog/tuning-typesafe-ai-jev-fraud-detection) · [Home](https://www.sardine.ai) · [Customers](https://www.sardine.ai/customers) · [Blog](https://www.sardine.ai/blog) · [Demo](https://www.sardine.ai/demo)

---

# Jev won't tell you why it scored an event. Here's how we tuned it for fraud anyway

**Author:** Chen Zamir · **Published:** 2026-11-19T14:00:00.000Z · **Read time:** 10 · **Categories:** Fraud Prevention, Product, Engineering

Sardine tuned TypeSafe AI's Jev for real-time fraud detection. After a leak fix and feature trimming, Jev matched Claude Opus 5.5 at under 1% of the cost.

Sardine Insights is our new deep research series, where our teams share the experiments behind our fraud and risk work, including what worked, what didn’t, and what surprised us.
Sardine makes fraud decisions in real-time, so every model we run has to be fast, affordable at scale, and consistent. Jev, a new model from TypeSafe AI, was built for that kind of decision. Over the past few weeks, we put it through a series of fraud experiments.
We've already used it for narrower jobs. In an earlier post, we shared how Jev scored events tied to a fraud ring, helped us build a new feature to compare customer names and emails, and turned business verification findings into structured answers.
This time we asked it a broader question: is this event fraud?
We ran the experiments on small samples of 100 labeled events. At this stage we wanted to learn how Jev responds to each change, and a small sample lets you run dozens of controlled tests in a day before you commit to a large dataset.
We haven’t cracked fraud. But we figure our early learnings from tuning Jev might help other teams.
What Jev is
TypeSafe AI calls Jev a System 1 model, after the fast, intuitive mode of thinking in Daniel Kahneman's Thinking, Fast and Slow. You send it an event's data and a question, and it answers in a single pass, with no step-by-step reasoning.
You can ask it three different types of questions. A probability question is a yes-or-no question that comes back as a number between 0 and 1. A score question places the answer on a scale you define, with a description for each level. The third type picks an answer from a list of options, which we didn't use here.
Jev is also stateless. It remembers nothing between calls, so every request has to carry all the data and instructions the model needs. That means we have to pre-calculate linking-based features (velocity, entities, block lists, etc.) and feed them to Jev as part of the input data.
Why Jev for fraud
Jev answers in roughly 70 to 500 milliseconds, which is fast enough for a live decision. Input costs $0.042 per million tokens and output is free, so we paid between two and seven cents for each 100-event run. TypeSafe AI also trained it to return calibrated probabilities, meaning its confidence should match how often it's right.
In contrast, general-purpose LLMs can reason through a suspicious event well, but they take seconds to answer and cost far more per call, which keeps them out of most real-time decisions. They can also give different answers to the same question, and a decision engine needs the same event to get the same score every time.
A model with Jev's speed, price, and consistency could score every event as it happens. This would put transformer-based models within reach of real-time fraud detection, which is why we were so curious to see how close Jev could get.
There’s one catch, though.
When a machine learning model gets a fraud case wrong, you can look inside it. You check which features carried the most weight, find the one that misled it, and fix the data or retrain. An LLM at least shows its reasoning, so you can read where it went off track.
Jev gives you neither. You send it an event and a question, and it sends back a number, with no explanation, no feature weights, and nothing that shows which field pushed the score up or down. You can't retrain it on your data either, since it exposes nothing for you to adjust.
So for our first days with Jev, we were mostly guessing. What got us out of it was treating every change as a controlled experiment: change one thing, run the same events again, and measure the effect.
Since the setup was the only thing we could control, we treated every design choice as a variable in its own right. And that’s what we wanted to share: what worked, what didn’t, and what surprised us.
The setup, and how we broke it on day one
Each sample had 50 events that were later confirmed as fraud and 50 legitimate ones. A 50/50 split is far from what any fraud team sees, since fraud usually makes up well under 1% of activity. We used it so that a small sample would still contain enough fraud cases to compare one run against another, knowing it makes the results look better than they would at a realistic fraud rate. Our plan was to get a handle on the basic workings, and then scale the experiments.
Each event went to Jev with four questions. Two were probability questions that asked how likely it was that the event was fraudulent and named what to weigh: the user's history, velocity (how quickly activity piles up) across different data elements, mismatches, and other suspicious activity. The other two were score questions that asked how strong the risk signals were, on this scale:
One question of each type also carried a data dictionary, a plain-language guide to the data we sent. Our thinking here was that the more context we share with Jev, the better the results would be.
To compare runs, we used area under the curve (AUC). If you pick one fraudulent and one legitimate event at random, AUC is the chance that the model scores the fraudulent one higher. A score of 0.5 is a coin flip and 1.0 is perfect. We also checked how each group's scores were distributed, because AUC alone doesn't show where a cutoff would land.
Our first run produced the classic too-good-to-be-true result (Figure 1). The blue bars are the legitimate events, and all of them fall below 0.5. Most of the orange bars, the fraud, stack up between 0.5 and 0.7. We wanted to believe it, so it took us a day to check it properly. Experience, it turns out, doesn't make you immune to a result you like.
The cause was, of course, a leak. We had removed the fraud label before sending the data, but a second field was still in the request. It recorded what kind of feedback each event had received after the fact, and for every fraudulent event it named the fraud report. That one field was enough to separate the two groups. Once we removed it, AUC fell to 0.60 on the probability question and 0.63 on the score question, a little better than a coin flip. In Figure 2, the red fraud bars and the blue legitimate bars now pile into the same range, between about 0.15 and 0.45.
If a result looks too good, assume a leak until you've ruled it out. Jev explains nothing, so a leaked field won't announce itself. Check the request for anything that only exists once the outcome is known: labels, review decisions, feedback types, case statuses, and the dates any of these were recorded.
Lesson 1: More context in the prompt barely changed the results
Because a stateless model needs its instructions with each call, every word you add to a Jev request is paid for on every event. Before adding context, we wanted to know whether it would improve the results enough to justify that cost.
Our hypothesis was that explaining the data would help, since Jev reads the whole request at once, instructions included. A field called “timeSinceFirstSeen” means little until you know its unit, and a value of “no_data” looks like a signal until you instruct Jev to ignore it.
So we wrote a data dictionary. It walks through each section of the data, from user history, email, and phone to device, IP address, session, and behavioral biometrics. For each one it explains what the fields count and which values are safe to ignore. We sent each question twice, once with the dictionary and once without.
The dictionary made almost no difference (Figure 3). In the left-hand chart, each line shows how much fraud a question catches (vertical axis) as you accept more false positives (horizontal axis), and higher is better. For each question, the solid line without the dictionary and the dashed line with it nearly overlap. The bars on the right show the same result as single numbers: AUC went from 0.739 to 0.740 on the probability question and from 0.704 to 0.721 on the score question.
The data dictionary was cheap to try on a small sample and didn’t hurt results, but it raised costs by about 25% with no performance gain.
Lesson 2: Fewer features worked better, up to a point
Sardine computes thousands of features, the data points that describe each event. Jev accepts large inputs cheaply, so we started by sending almost everything. Our first cleanup removed personal information, empty fields, fields with the same value across the whole sample, and the fraud label along with anything derived from it. That left about 1,000 features per event, and after the leak fix and a rewrite of the questions, this setup reached an AUC of 0.70 on the probability question and 0.61 on the score question.
A machine learning model usually copes with 1,000 features, because training teaches it which ones to ignore and when. Jev can't learn that from your data. Everything in the request competes for attention at once, so we suspected the few useful signals were getting diluted by everything around them.
Two kinds of noise stood out. The first was duplication. Sardine computes most counters over several time windows, from two minutes to seven days (and sometimes up to a year!). For a user whose only recent activity happened a minute ago, all six windows read 1, so six fields carry a single fact and Jev may count it six times.
The second type of noise was fields that mean nothing on their own, such as account age written as a 12-digit number of milliseconds, an email's top-level domain, or the city an IP address resolves to.
Step 1: From 1,000 features to 180
We tackled both kinds of noise first, which cut the input to between 165 and 210 features per event. We:
Kept two or three time windows per counter instead of six.
Cut raw values that carry no meaning by themselves, like account age in milliseconds.
Removed features built for other products and use cases that didn't apply to these events.
Dropped perfectly correlated duplicates, such as the same total stored in three formats.
AUC rose from 0.70 to 0.76 on the probability question and from 0.61 to 0.72 on the score question (Figure 4). In both charts, the green line for 180 features runs above the grey line for 1,000 features almost all the way across, which means the trimmed input caught more fraud at nearly every rate of false positives. The gap is widest on the score question, where the grey line stays close to the coin-flip diagonal for much of the chart.
The leaner input was also cheaper and faster: cost per event fell from about $0.0007 to $0.0002, and response time from 0.18 to 0.12 seconds.
Step 2: From 180 features to about 75
Since trimming features helped, we went further and removed most counters whose value was 0 or 1. The logic was that an event with 25 counters at 1 might bury the single one at 4.
But it had the opposite effect. AUC dropped to 0.72 on the probability question and 0.67 on the score question (Figure 5). In the two left-hand charts, the new orange line for 75 features mostly runs between the green and grey lines. The bars on the right put the three setups side by side, with 180 features on top for both questions. The thin black line on each bar shows the range the true AUC most likely falls in. With only 100 events those ranges are wide and overlap, so we trust the direction of each change and treat its exact size as provisional.
The results surprised us, so we took a closer look at what drove the drop. In Figure 6, each dot is an event’s score with 180 features, and each arrow shows how that score moved when processed with only 75 features. In both charts (fraud on the left, legitimate on the right), almost every event’s score went up.
With the zero and one values gone, the counters that remained stood out in every event, so Jev scored nearly everything as riskier. The legitimate events on the right rose more than the fraud on the left, by an average of 0.19 against 0.15, which pushed the two groups closer together. Seeing that, we decided to roll back to the 180-feature setup.
Less is more, up to a point. Going from 1,000 to 180 features improved results on both questions, and going down to 75 made them worse. Jev's answers look like machine learning scores, but its inputs need the kind of curation you'd give an LLM prompt. Finding the right amount takes experimentation, and a close look at how scores shift.
Lesson 3: After tuning, the results look decent until you consider a realistic scenario
Our best setup used about 180 features and the probability question, and it reached an AUC of 0.74. In Figure 7, the grey bars are the legitimate events, which peak between 0.3 and 0.5. The blue bars are the fraud, which peaks at 0.6. Between 0.4 and 0.6 the two groups overlap.
To turn Jev's probability into a decision, you pick a cutoff and flag everything above it. Two cutoffs show the trade-off in this sample:
At 0.6, four out of five flagged events are fraud. On a 50/50 sample with only 50 legitimate events, that looks close to usable.
Precision, the share of flagged events that turn out to be fraud, depends on how common fraud is. Live traffic carries 50 to 100 times less fraud than our sample did, so this performance wouldn’t hold there. With 10,000 events and a 1% fraud rate, which is high for most businesses, the 0.6 cutoff would catch 50 of the 100 fraud cases. It would also flag 12% of the 9,900 legitimate events, or about 1,190 good users. In a realistic scenario then, the precision would drop from 81% to about 4%. That is far from being usable.
That doesn’t rule out real-time fraud detection with Jev. It means there’s still plenty of work to be done (we’ll expand on it in a bit).
Jev versus a frontier LLM
To see whether a more powerful model would get further on the same data, we ran the same 100 events through Claude Opus 5.5 on high effort, one of the most capable general-purpose LLMs. It got the same features and the same probability question, adapted so it returned its answer in a structured format.
The two models performed almost identically, with an AUC of 0.766 for Jev and 0.760 for Opus (Figure 8). In the chart, the blue line for Jev and the orange line for Opus track each other most of the way. Opus starts slightly higher at the very strictest cutoffs on the far left, Jev pulls ahead between about 5% and 20% false positives, and Opus edges back ahead past 40%. On 100 events, that's practically a tie.
The more interesting comparison was technical performance, where the two models differ significantly in cost and speed:
Opus cost roughly 170 times more per event. Over three weeks of testing, our Jev bill came to about $5, while a single day of six full runs on Opus cost $14. And of course, speed is an even bigger issue for fraud decisions made in real time: 0.11 seconds per event is fast enough for a live decision, while 2.75 seconds is too long for most merchants, and certainly for financial services.
After tuning, Jev ranked fraud as well as a frontier LLM, at less than 1% of the cost and 4% of the time. At realistic fraud rates, though, this setup would still stop far too many good users, so the next gains have to come from more tuning on larger datasets.
Lesson 4: Jev's answers are steadier
We also compared Jev head-to-head with a frontier LLM on reproducibility. When you can't see inside a model, you need stable outputs to trust an experiment. If scores swing between identical runs, you can't tell whether a change you made helped or you got a lucky run.
We ran the same setup six times on each model, with the same events, features, and probability question. On a typical event, both were stable. The average gap between an event's highest and lowest probability was 0.03 for Jev and 0.07 for Opus, and AUC stayed between 0.753 and 0.761 for Jev and between 0.751 and 0.780 for Opus.
On the surface, both models seemed quite stable and consistent. When we took a closer look, though, we found some dramatic differences (Figure 9). Each bar spans the range of probabilities one event received across the six runs, for the 10 events that moved most on each model.
Jev's widest bar covers a 0.06 score change. Opus's bars reach up to 0.23, and four of them cross the 0.5 line, so at that cutoff, Opus would flag those events on some runs and pass them on others. One of Jev's crosses it, by a hundredth.
Both models give near-identical answers on a typical event. On the edge cases, Opus swung far enough to change four decisions between runs, against one for Jev. In our tests, run-to-run noise moved Jev's AUC by less than 0.01, so in your own experiments, treat any smaller change as noise.
The work ahead of us
This was a first, technical proof of concept on small, balanced samples, and it taught us five things about working with Jev:
Validation: A result that looks too good probably is. One leaked field made Jev look nearly perfect.
Prompting: A data dictionary barely moved the results, so put the effort into feature selection.
Feature selection: Less is more, up to a point. Trimming from 1,000 to 180 features helped, and going down to 75 hurt.
Performance: Jev ranked fraud as well as a frontier LLM at a fraction of the cost and time, but this setup isn't ready for realistic fraud rates.
Stability: Jev's answers held steadier than the LLM's, especially on the events that moved most.
Each of these leaves a question we now want to answer.
First, we want to know whether Jev’s results hold up on live traffic. A balanced sample of 100 events flatters any model, so the next round uses larger datasets with realistic fraud rates. It will measure how much fraud Jev catches when only a small, fixed share of legitimate events can be flagged, which is how a fraud team judges a model in production.
Second, we want to understand why Jev lets some fraud through. Jev won't tell us, so a fraud analyst will review the fraud that scored low and the legitimate events that scored high, work out which fields most likely drove each score, and feed what we find back into the questions and inputs.
Third, we want to try to combine the two models. If Jev ranks fraud as well as a frontier LLM at a fraction of the cost and time, the natural design uses both, in Kahneman's terms a fast System 1 for every event and a slow, deliberate System 2 for the hard ones. Jev would score everything in real time and pass only the uncertain events to the slower model, which can also give its reasoning. Can we produce better results with optimized cost and time?
Jev still won't explain its scores, so we'll keep doing what worked here: change one thing, re-run the same events, and measure the effect.
Curious about how this will develop? Watch this space for more Sardine Insights research.
