Say you want your product pages to react to what each visitor is trying to do: browsing, comparing products, hunting for a deal, or ready to buy. So you add a call to Jev, a decision model, that asks that question on every product page view and gets back one of those answers. In this post, the call is the request your app makes, and the question is what it asks: an instruction and the allowed answers. The call answers every time, nothing shows up in your error logs, and the answers look sensible when you spot-check a few. You still don’t know whether they are any good.
Our last post listed what tends to go wrong after a call like this ships: two answers that mean the same thing, a model that is sure of itself with little to go on, and questions that were only ever tried on tidy examples.
Most of that can be caught before launch, the same way machine learning teams catch problems in their models: by running the call on last month’s traffic and looking at what comes back. This post shows how we did that for one question, and what we found.
Decision models skipped the test
When a team answers a question like this with a model of its own, testing on past data is part of the job. They train the model on past sessions labeled with what visitors went on to do, score last month’s visitors with it, and only ship it once the scores look right. Large language model teams do the same. When Netflix built GenRec, an LLM that ranks titles for each member, it compared versions on past viewing data, including how much viewing history to put in the model’s context, before running an A/B test with real members.
System One models such as Jev don’t need training. You write the question and the allowed answers, send a state object, and get back a probability for each answer. But the test step went away with the training, because there was no dataset to test on, so the first real test is the one your visitors run.
Offline, on past data
Online, with real visitors
Machine learning model
Decision model today
Decision model with a replay
What it takes to rerun the past
To ask the model about last month, you need each moment your app would have made the call, such as every product page view, along with what the visitor did afterward. The hard part is the state your code would have sent at each moment. It has to be built only from events that happened before that moment, or the model sees the future and the results look better than they will in production. The agentic context, the short list of recent events the model reads, also has to be rebuilt with the same filters, age limit, and number of entries that Snowplow Signals uses when it serves your app live.
The Signals dataset builder does this for you. It runs the attribute groups (the values Signals computes for each visitor) and agentic context definitions that serve your app live over the events stored in Snowflake, the warehouse it supports today, so each row holds the values your app would have read at that moment, along with what the visitor did next. The rows end up in a table in your Snowflake account, and the docs on building datasets cover the options.
For our example, the dataset has one row per session, at the visitor’s first product page view, using the event anchors mode. It reads the attribute group and agentic context the app already uses, and adds two outcome columns: whether the visitor bought later in the session, and whether they added to cart within ten minutes. The docs on evaluating decision models show the request in the Python SDK.
From there, the test is a loop. Build the state for each row with your own state-building code, ask the model, then change one thing and ask again on the same rows. We ran the loop with a coding agent, and the same docs include the code for the checks and a prompt for your own agent.
Example: a shopping intent question on the Google Merchandise Store
We tried this on Google’s public GA4 sample from its Merchandise Store, converted to Snowplow events. The call runs on product pages and asks Jev what the visitor is trying to do right now. The state holds six session attributes and the last ten events from an agentic context. Our first version of the question had five answers:
{
"shopping_intent": {
"type": "choice",
"instructions": "What is this visitor trying to do right now on an online merchandise store?",
"criteria": {
"browsing": "Looking around without a specific product in mind: home and category pages, few product pages.",
"researching": "Learning about products they might buy: reading several product pages and their details.",
"comparing": "Weighing up a few similar products against each other before choosing one.",
"deal_seeking": "Looking for a bargain: sale pages, promotions and discounted items.",
"ready_to_buy": "Close to purchasing: items in the cart, cart or checkout pages, attention narrowed to what they will buy."
}
}
}
The dataset had 2,865 product page views from January 2021, one per session. We went through four versions of the call on those same moments, and all the Jev calls together cost $0.38. It is one store and one question, so read it as an example of what the checks can find, not a benchmark.
First draft five answers
comparingandresearchingboth describe a visitor reading product pages, and split the same visitors between them.- browsing0.92
- researching0.66, unsure
- comparing0.46, unsure
- deal_
seeking 0.68, unsure - ready_
to_ 0.95buy
Answers merged question changed
We merged them into
considering, which came back sure.deal_seekingwas now the answer the model was least sure about.- browsing0.88
- considering0.93
- deal_
seeking 0.57, unsure - ready_
to_ 0.99buy
Context added Signals data changed
We gave the state the promotion names and a count of Sale section views. Close calls between
deal_seekingandbrowsingonly fell from 121 to 111.- browsing0.95
- considering0.92
- deal_
seeking 0.56, unsure - ready_
to_ 0.99buy
Definition fixed question changed
We said that one visit to the Sale section counts as looking for a bargain.
deal_seekingcame back sure, and its close calls fell to 10.- browsing0.96
- considering0.93
- deal_
seeking 0.91 - ready_
to_ 0.99buy
Two answers that meant the same thing
The first thing we looked at needed only the model’s answers. Jev picked comparing for 1% of visitors, with a median confidence of 0.46, and when it did, most of the rest of the probability went to researching and browsing. researching itself won a quarter of the moments, at 0.66. Looking at the two definitions side by side, the problem was ours. Both describe a visitor reading product pages, and nothing in the state could show whether someone was reading about one product or weighing three.
So we merged them into a single answer, considering. Since only the question had changed, we could ask again on the same rows without rebuilding anything, and considering came back at 0.93.
An answer the model wasn’t sure about
After the merge, deal_seeking was the answer Jev was least sure of. More than half of those answers had a confidence under 0.6, and in 121 moments it was within 0.4 of browsing. The numbers told us where to look, but only reading the states told us why. Many of them looked like this one, shortened:
{
"visitor": { "page_views": 5, "device": "desktop" },
"last_10_events": [
{ "event": "page_view", "page": "Home" },
{ "event": "promo_view", "product": "(not set)" },
{ "event": "page_view", "page": "Home" },
{ "event": "promo_click", "product": "(not set)" },
{ "event": "promo_view", "product": "(not set)" },
{ "event": "page_view", "page": "Eco-Friendly | Google Merchandise Store" }
]
}
Every home page view logs the carousel banners as promo_view events without a name, so the model had no way to tell a sale banner from any other. Our first guess was that it needed better data, so we added the promotion names to the agentic context and an attribute that counts views of the Sale section. That brought the close calls down only from 121 to 111.
Letting outcomes settle the definition
The extra data barely helped because the model wasn’t missing information. When we read the states that were still unsure, most belonged to visitors who had opened the Sale section once while browsing categories. Our definition of deal_seeking didn’t say whether one visit to the Sale section counts as looking for a bargain, so the model split those visitors between deal_seeking and browsing.
Whether it counts is a product decision, not a modeling one, and the outcome columns gave us something to base it on. Visitors who had opened the Sale section once were nearly twice as likely to add to cart within ten minutes as those who hadn’t (25% vs. 13%), and more than twice as likely to buy later in the session (9% vs. 4%). One visit clearly said something about the visitor, so we decided it should count. The new definition says the visitor “has opened the Sale section in this session, even once, and has nothing in the cart yet.”
On the same rows, deal_seeking came back at 0.91, and its close calls with browsing dropped from 111 to 10. Across all the answers, close calls went from 17% of moments in the first version to 10%.
Which answers are worth acting on
With the question settled, we looked at what visitors did after each answer.
Bought later in the session
All moments 4.7%
Added to cart within 10 minutes
All moments 14.8%
Visitors tagged ready_to_buy bought almost four times as often as average, which is what you’d hope. considering was the surprise. Jev was confident about it, yet those visitors were the least likely to add to cart, so if you were planning to show them a nudge toward the cart, this is where you would find out it may not pay off. The biggest overlap left is between browsing and considering, and that is where we would start the next round.
What a replay gives you
Two of the problems from our last post turned up in this one question. Two answers meant the same thing, and real sessions were messier than the examples we had in mind when we wrote deal_seeking, so the model couldn’t place them. The replay also found one we hadn’t listed: a confident answer, considering, whose visitors were the least likely to add to cart. None of these showed up as an error, and each took a few minutes and a few cents to find on last month’s traffic, before any visitor saw a wrong answer. That is why we think a replay belongs before every change to a decision call, the way a test set does for a trained model.
To do the same with your own call, start from the moments your app makes it: log the calls, or note which event triggers them. Decide which outcomes the decision is supposed to change, since those are what you check the answers against. Then rerun the replay whenever you change the question, the state, or the model version, the way you rerun tests after changing code.
A replay does have limits. An outcome isn’t the same as a correct answer, since a visitor tagged ready_to_buy who left may simply have found a better price elsewhere. The replay is a rebuild rather than a recording, so some edge cases will differ from production. And past sessions can’t tell you whether acting on an answer helps, because the action itself changes what visitors do next. We use the replay to decide what to ship, and an experiment to confirm it.
The same dataset is also a starting point if you later want to train a model of your own on what visitors did next. The dataset builder builds training datasets from the same definitions.
To try it on your own traffic, start free and follow the docs on evaluating decision models, either yourself or with your coding agent. The free tier runs on the real engine, needs no card, and shows an attribute updating against your own traffic in the first session.
