---
title: "Test your decision calls on last month's traffic | Snowplow Signals"
description: "System One models skipped the step where ML teams test on history. Replay a Jev call on past sessions to find overlapping and unsure answers before it ships."
source: https://signals.snowplow.io/blog/test-your-decision-calls-on-last-months-traffic
---

[Blog](https://signals.snowplow.io/blog) / Use cases 

# Test your decision calls on last month's traffic

![](https://signals.snowplow.io/images/authors/matus-tomlein.jpg) [Matúš Tomlein](https://signals.snowplow.io/blog/authors/matus-tomlein) , Principal Software Engineer Dec 2, 2026 · 8 min read 

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](https://typesafe.ai/blog/introducing-system-one-models-and-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](https://signals.snowplow.io/blog/ask-a-system-one-model-what-your-users-are-doing#what-goes-wrong-once-it-ships) 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](https://arxiv.org/abs/2608.10257), 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

Train

Test on past data

Ship

Measure live

Fix and test again before anyone sees it 

Decision model today

Write the call

No test

Ship

Measure live

Every fix is tried on real visitors 

Decision model with a replay

Write the call

Replay past sessions

Ship

Measure live

Fix and replay again before anyone sees it 

## 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](https://signals.snowplow.io/learning/ai-agents-and-memory/what-is-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](https://docs.snowplow.io/docs/signals/agentic-contexts/) 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](https://docs.snowplow.io/docs/signals/datasets/) cover the options.

[![Two lanes. Live: your app sends events to Signals, which holds each visitor’s values as of now, and your decision call reads them. Replay: your warehouse holds every past event, a Signals dataset rebuilds the values as of each past moment, and the same call answers them so you can compare with outcomes. Both lanes use the same attribute groups and agentic contexts, defined once.](https://signals.snowplow.io/images/blog/test-your-decision-calls-on-last-months-traffic/replay-diagram.png)](https://signals.snowplow.io/images/blog/test-your-decision-calls-on-last-months-traffic/replay-diagram.png) 

For our example, the dataset has one row per session, at the visitor’s first product page view, using the [event anchors](https://docs.snowplow.io/docs/signals/datasets/anchors/#event-anchors) mode. It reads the attribute group and agentic context the app already uses, and adds two [outcome columns](https://docs.snowplow.io/docs/signals/datasets/context-and-outcomes/#add-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](https://docs.snowplow.io/docs/signals/datasets/evaluate-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](https://developers.google.com/analytics/bigquery/web-ecommerce-demo-dataset) 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.

Four versions of the call, on the same moments Median confidence:0.85 or higherbelow 

1. 01  

**First draft** five answers  
`comparing` and `researching` both describe a visitor reading product pages, and split the same visitors between them.

  * browsing **0.92**
  * researching **0.66** , unsure
  * comparing **0.46** , unsure
  * deal\_seeking **0.68** , unsure
  * ready\_to\_buy **0.95**
2. 02  

**Answers merged** question changed  
We merged them into `considering`, which came back sure. `deal_seeking` was now the answer the model was least sure about.

  * browsing **0.88**
  * considering **0.93**
  * deal\_seeking **0.57** , unsure
  * ready\_to\_buy **0.99**
3. 03  

**Context added** Signals data changed  
We gave the state the promotion names and a count of Sale section views. Close calls between `deal_seeking` and `browsing` only fell from 121 to 111.

  * browsing **0.95**
  * considering **0.92**
  * deal\_seeking **0.56** , unsure
  * ready\_to\_buy **0.99**
4. 04  

**Definition fixed** question changed  
We said that one visit to the Sale section counts as looking for a bargain. `deal_seeking` came back sure, and its close calls fell to 10.

  * browsing **0.96**
  * considering **0.93**
  * deal\_seeking **0.91**
  * ready\_to\_buy **0.99**

### 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.

What visitors did after each answer, final version 

Bought later in the session

ready\_to\_buy13% of moments 18.0% 

deal\_seeking9% of moments 7.1% 

browsing45% of moments 2.2% 

considering33% of moments 2.1% 

All moments 4.7%

Added to cart within 10 minutes

ready\_to\_buy13% of moments 45.9% 

deal\_seeking9% of moments 15.4% 

browsing45% of moments 13.8% 

considering33% of moments 3.5% 

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](https://docs.snowplow.io/docs/signals/datasets/train-ml-models/) from the same definitions.

To try it on your own traffic, [start free](https://signals.snowplow.io/start) and follow the docs on [evaluating decision models](https://docs.snowplow.io/docs/signals/datasets/evaluate-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.

![](https://signals.snowplow.io/images/authors/matus-tomlein.jpg)

[Matúš Tomlein](https://signals.snowplow.io/blog/authors/matus-tomlein) 

Principal Software Engineer, Snowplow

Follow Matúš for more on real-time customer context.

[LinkedIn](https://www.linkedin.com/in/matustomlein) [X](https://x.com/matus%5Ftomlein) [More from Matúš → ](https://signals.snowplow.io/blog/authors/matus-tomlein) 

Start on the free tier

Add the SDK and watch an attribute updating against your own traffic in the first session. The free tier runs on the real engine: no card, no sales call.

[Start free](https://signals.snowplow.io/start) 

Share this post

✕

Click the image to zoom in. Esc closes. Scroll to pan. Click the image to zoom out. 

In this post

* [Decision models skipped the test](#decision-models-skipped-the-test)
* [What it takes to rerun the past](#what-it-takes-to-rerun-the-past)
* [Example: a shopping intent question on the Google Merchandise Store](#example-a-shopping-intent-question-on-the-google-merchandise-store)
* [What a replay gives you](#what-a-replay-gives-you)

Start on the free tier

Add the SDK and watch an attribute updating against your own traffic in the first session. The free tier runs on the real engine: no card, no sales call.

[Start free](https://signals.snowplow.io/start)
