Distillery
Shown by TestExhibit in pkg/distillery. Each block feeds generated traffic through the affinity still used by the tests and shows what it distills, next to the persona that actually produced the traffic. The taste is one vector across every category; similarities to personas are cosine, and the highlighted avatar is the reading. It is then read per category, in every category the shopper chose from — dresses, trousers, and the home category of its pick: the product the taste ranks first there, by the shop's own score — the taste seen through that category's weights — must be one the persona likes — within 80% of its favourite there. Shoppers do not always open their favourite, so the favourite is shown where they differ. Home decoration is reached only through the dimensions it shares with fashion, and through the shopper's home picks. Decay uses a one-week half-life at BaseTime, Thu 10 Sep 09:18; phases split below a similarity of 0.90.
How the still works
A still is set up once, with a cut and a chain of infusers, and then only ever does two things: Feed it a batch, which cuts and infuses each event exactly once as it arrives, and Distill it with a recipe, which hands the infused events to the recipe and returns whatever spirit it makes — a pure read, as often as you like. The infusers below are read off the chain the tests use, in order.
1 · A request
One mpv2 request per interaction, as the client sends it: its event, and an envelope — what upstream knows beyond the event. A visit is many requests under one session id.
2 · Cut
Config.Cut keeps or cuts each event. It sees the envelope, so it can cut by where an event came from as well as by what it is.
3 · Infusers, in order, once per event
Stamp— copies the batch's time and session off the envelope, so a recipe can decay by age and group by visitAddAttractors— sums the attractors of the items the event carries into one vector, whatever their categoryWeighByIntent— scales that by how deliberate the choice is — select and view 1, the cart 3
4 · The still
Kept events with their infusion, in arrival order: Infused{Event, Infusion}, where the infusion is At · Session · Affinity. Never rewritten; only drawn off.
5 · Draw off
A Rule selects what the still should no longer hold: by position, name, time or session, composed with Any, All and Not. It runs as a standing policy after every feed, and on request.
6 · Recipes
Fade.Vector— the personalization vector the shop ranks every listing with: faded per event, collapsing its past on a strong change of intentFlat— taste, summed in fullDecayed— taste, every event halved per half-life of agenearestIn— a taste read in one category: the product the shop's score ranks first therephases— the history cut into windows of steady taste, a session at a timefunnel— events counted by name — a question that ignores taste altogether
One visit, request by request
Kate's third visit of her month, two weeks before BaseTime: the shop knows two visits of hers by then, and this one ends in the cart, run through the chain above one infuser at a time. Each column is what that infuser made of the event: the envelope stamped on, the taste its items carry — one vector, dresses, trousers and lamps alike — and finally the weight it is scaled by: a selection in full, the cart three times over. Listings never get that far: the affinity still keeps only the choices it learns from, and cuts everything else at the door.
| # | event | list / item | items | affinity cut | consent cut | Stamp | AddAttractors | WeighByIntent |
|---|---|---|---|---|---|---|---|---|
| 1 | view_item_list | womens-fashion | 36 | cut | keep | not kept — never infused, never stored | ||
| 2 | select_item | Ledger Suit Trousers | 1 | keep | keep | Thu 27 Aug 09:18 · 1787822299 | 4 dimensions · business 0.85, classic 0.8 | × 1 → business 0.85, classic 0.8, structured 0.75 |
| 3 | view_item_list | womens-fashion/trousers | 18 | cut | keep | not kept — never infused, never stored | ||
| 4 | select_item | Ledger Suit Trousers | 1 | keep | keep | Thu 27 Aug 09:20 · 1787822299 | 4 dimensions · business 0.85, classic 0.8 | × 1 → business 0.85, classic 0.8, structured 0.75 |
| 5 | view_item_list | womens-fashion/dresses | 18 | cut | keep | not kept — never infused, never stored | ||
| 6 | select_item | Whitehall Sheath Dress | 1 | keep | keep | Thu 27 Aug 09:21 · 1787822299 | 6 dimensions · business 0.9, structured 0.9 | × 1 → business 0.9, structured 0.9, classic 0.8 |
| 7 | view_item_list | womens-fashion | 12 | cut | keep | not kept — never infused, never stored | ||
| 8 | select_item | Temple Pleated Trousers | 1 | keep | keep | Thu 27 Aug 09:22 · 1787822299 | 5 dimensions · business 0.9, classic 0.8 | × 1 → business 0.9, classic 0.8, structured 0.8 |
| 9 | view_item | Temple Pleated Trousers | 1 | keep | keep | Thu 27 Aug 09:23 · 1787822299 | 5 dimensions · business 0.9, classic 0.8 | × 1 → business 0.9, classic 0.8, structured 0.8 |
| 10 | add_to_cart | Temple Pleated Trousers | 1 | keep | keep | Thu 27 Aug 09:23 · 1787822299 | 5 dimensions · business 0.9, classic 0.8 | × 3 → business 2.7, classic 2.4, structured 2.4 |
| 11 | view_item_list | womens-fashion | 36 | cut | keep | not kept — never infused, never stored | ||
| 12 | select_item | Temple Pleated Trousers | 1 | keep | keep | Thu 27 Aug 09:23 · 1787822299 | 5 dimensions · business 0.9, classic 0.8 | × 1 → business 0.9, classic 0.8, structured 0.8 |
| 13 | view_item_list | home-decoration | 18 | cut | keep | not kept — never infused, never stored | ||
| 14 | select_item | Archive Brass Table Lamp | 1 | keep | keep | Thu 27 Aug 09:25 · 1787822299 | 5 dimensions · classic 0.9, cozy 0.5 | × 1 → classic 0.9, cozy 0.5, opulent 0.4 |
| 15 | view_item_list | home-decoration/lamps | 6 | cut | keep | not kept — never infused, never stored | ||
| 16 | select_item | Archive Brass Table Lamp | 1 | keep | keep | Thu 27 Aug 09:26 · 1787822299 | 5 dimensions · classic 0.9, cozy 0.5 | × 1 → classic 0.9, cozy 0.5, opulent 0.4 |
| 17 | view_item | Archive Brass Table Lamp | 1 | keep | keep | Thu 27 Aug 09:27 · 1787822299 | 5 dimensions · classic 0.9, cozy 0.5 | × 1 → classic 0.9, cozy 0.5, opulent 0.4 |
| 18 | view_item_list | all-products | 54 | cut | keep | not kept — never infused, never stored | ||
One session
A single converting journey per persona — fashion, then home decoration — summed flat. The reading should be the persona itself, right in every category it chose from, and in the category of the purchase the product bought.
shopped
Kate
0.82
Sofia
-0.05
Lena
0.05
Mira
0.15
| classic | +10.05 | |
|---|---|---|
| business | +7.80 | |
| structured | +7.10 | |
| minimalistic | +3.20 | |
| retro | +2.50 | |
| modern | -1.80 | |
| colourful | +0.90 | |
| feminine | +0.40 |
shopped
Kate
0.03
Sofia
0.88
Lena
-0.38
Mira
-0.16
| bold | +10.10 | |
|---|---|---|
| opulent | +9.90 | |
| colourful | +9.20 | |
| minimalistic | -8.70 | |
| festive | +8.50 | |
| feminine | +6.25 | |
| retro | +1.80 | |
| romantic | +0.90 | |
| classic | +0.60 |
shopped
Kate
-0.29
Sofia
-0.24
Lena
0.78
Mira
0.58
| minimalistic | +9.95 | |
|---|---|---|
| casual | +8.55 | |
| modern | +6.60 | |
| edgy | +4.80 | |
| opulent | -1.00 | |
| natural | +0.85 | |
| industrial | +0.80 | |
| cozy | +0.20 |
shopped
Kate
-0.14
Sofia
-0.14
Lena
0.46
Mira
0.93
| modern | +10.65 | |
|---|---|---|
| minimalistic | +9.75 | |
| edgy | +8.40 | |
| structured | +7.50 | |
| business | +6.90 | |
| classic | -3.00 | |
| industrial | +2.70 | |
| bold | +1.50 |
Steady month
A month of one persona's visits, read with decay and cut into phases. A steady shopper should read as themselves, per category as in a single session, and stay one phase.
shopped
Kate
0.84
Sofia
-0.01
Lena
0.01
Mira
0.14
Fri 14 Aug 09:18 – Thu 10 Sep 09:26 · 7 visits
shopped
Kate
0.11
Sofia
0.96
Lena
-0.40
Mira
-0.22
Fri 14 Aug 09:18 – Thu 10 Sep 09:26 · 7 visits
shopped
Kate
-0.28
Sofia
-0.28
Lena
0.83
Mira
0.58
Fri 14 Aug 09:18 – Thu 10 Sep 09:26 · 7 visits
shopped
Kate
-0.16
Sofia
-0.14
Lena
0.46
Mira
0.94
Fri 14 Aug 09:18 – Thu 10 Sep 09:26 · 7 visits
Drift
Every ordered pair: the first three visits (up to two weeks ago, including a purchase) are one persona, the last four another. Summed flat, the old taste too often wins; decayed, the recent one should — as a persona, and in every category the recent half chose from. Phases should recover both, split where the taste changed.
| Shopped | Read flat | Read decayed | Categories, decayed | Phases |
|---|---|---|---|---|
Kate then Sofia | 5/5 categories | 5/5 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Kate then Lena | 2/4 categories | 4/4 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Kate then Mira | 3/3 categories | 3/3 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Sofia then Kate | 0/3 categories | 3/3 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Sofia then Lena | 0/4 categories | 4/4 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Sofia then Mira | 3/3 categories | 3/3 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Lena then Kate | 3/3 categories | 3/3 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Lena then Sofia | 5/5 categories | 5/5 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Lena then Mira | 3/3 categories | 3/3 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Mira then Kate | 0/3 categories | 3/3 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Mira then Sofia | 5/5 categories | 5/5 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | |
Mira then Lena | 2/4 categories | 4/4 categories | Fri 14 Aug 09:18 – Thu 27 Aug 09:27 · 3 visits Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits |
Drawing off
Four of the drifts above, fed into two stills: one holds everything, the other has a standing draw-off, affinity.Rules.OlderThan(env.Stamped().At, 10 days), run after every feed against the time of the batch. By the end of the month the old taste has been drawn off: summed flat, the still that holds everything misreads some of them as the old shopper (red), the bounded one reads every one as the recent shopper, and only the recent phase is left.
| Shopped | Holds everything, read flat | Draws off after 10 days, read flat | Choices held | Phases left |
|---|---|---|---|---|
Kate then Sofia | 37 of 65 | Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | ||
Sofia then Lena | 37 of 65 | Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | ||
Lena then Mira | 37 of 65 | Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits | ||
Mira then Kate | 37 of 65 | Tue 1 Sep 09:18 – Thu 10 Sep 09:26 · 4 visits |
Detour
Kate's month with visits three and four shopped by Sofia. Phases are contiguous, so the return is a third phase rather than a Kate phase with a hole in it.
Fri 14 Aug 09:18 – Fri 21 Aug 09:24 · 2 visits
Thu 27 Aug 09:18 – Tue 1 Sep 09:25 · 2 visits
Sat 5 Sep 09:18 – Thu 10 Sep 09:26 · 3 visits
Consent
The same detour, but Sofia's two visits were made without personalization consent. The consent cut drops them on the way in, so the still never sees them and Kate's month is one unbroken phase.
Fri 14 Aug 09:18 – Thu 10 Sep 09:26 · 5 visits
