The Decision Factory

Paper 04 of 06 · The architecture

The Decision Factory

Five stages and one room beside them. Four of the stages run without anyone assembling them. One is where a person enters, and what that person knows gets written down instead of lost.

The argument in brief

  1. The machine has five stages, and only one of them needs a person. Data, learned models, the decision engine and the learning loop run unattended. Human judgment is a designed interface, not a bottleneck and not a meeting.
  2. Separate what you control from what you do not. The demand model describes the world. The response models describe your levers. Mixing the two is how a marketing uplift becomes a negotiation instead of an estimate.
  3. Width costs money. At the ledger from Paper 02, every case of standard deviation costs $17.31. A new campaign promising 200 more cases than a familiar one loses to it by $5,715, because nobody yet knows what the new one does.
  4. The override is the point. Every override carries a reason code, a note and a value. Overrides that keep turning out right are a data feed nobody has built yet.
  5. The Lab sits beside the line, not inside it. It runs on the same data, models and ledger as production, and its most valuable output is a priced test. In the worked example, a test costing $5,715 is worth about $28,500 a season.
01

The machine on one page

Papers 01 to 03 argued for three components: a priced objective, a ledger that prices both directions of error, and forecasts that carry their uncertainty instead of discarding it. This paper shows where those components sit, what each one does, and, as importantly, what each one is not allowed to do.

The machine is called a factory for a reason. A factory has stations. Each station takes a defined input, does one job, and hands a defined output to the next. Nobody at station three reaches back to rework station one. When something goes wrong, you can find out where.

Exhibit 1

Five stages on the line, four of them unattended, and a Lab beside it that shares every assumption

STAGE 1 · UNATTENDED One data platform Every feed at one grain: item × location × week. Stockouts flagged, never deleted. STAGE 2 · UNATTENDED Learned models Demand model What you don’t control Weather, calendar, competitors, stores Response models What you do control Campaigns, price, promotion, display Economic ledger Cost of being wrong $10 over, $85 short, signed by finance STAGE 3 · UNATTENDED Decision engine Prices every option across thousands of futures. Ranks in dollars. STAGE 4 · THE ONE HUMAN INTERFACE Human judgment Accept or override anything. Each override records a reason, a note, a value. STAGE 5 · UNATTENDED Learning loop Actuals and overrides return. Each component updates on its own clock. actuals and overrides return to the data BESIDE THE LINE The Lab Same data, same models, same ledger as the line. Runs what-ifs and prices tests before anything is committed. Nothing in it reaches production directly. findings go to a person Unattended means nobody assembles the inputs by hand. It does not mean nobody is watching.
Architecture. Stages 1, 2, 3 and 5 run on a schedule without anyone assembling inputs by hand. Stage 4 is the one interface where a person enters. The Lab reads the same data, models and ledger as the line, and its findings go to a person, never straight into production.

Unattended does not mean unsupervised. It means nobody assembles the inputs by hand, nobody reconciles two copies of the truth, and nobody re-keys a number from one screen into another. The stages run on a clock. People watch them for drift and change them deliberately. What disappears is the monthly ritual of building the number.

The example we follow through every stage

One product: Solstice SPF 50, a 200 ml sunscreen, sold by the case of twelve to retailers in one region. The season is the sixteen weeks from Memorial Day to Labor Day. The plant commits the season’s production in April, so there is one large decision and very little room to correct it later. Everyone has bought sunscreen. Almost nobody has thought about how hard it is to sell the right amount of it.

The ledger is the one from Paper 02, carried forward unchanged: $10 for each case carried that was not needed (capital, storage, and the markdown or year of shelf time an unsold case of sunscreen faces) and $85 for each case of demand not served ($40 of forgone contribution plus $45 of customer damage). The critical ratio is 85 ÷ 95, or 89.5 percent, exactly as in Paper 03.

Marketing has $60,000 and two campaigns to choose from. That choice, and how much sunscreen to make alongside it, is the decision this paper follows.

02

Stage 1: One data platform

Every decision system starts as a data system, and most of them die as one. The first stage has a single job: publish one governed version of what happened, at one grain, that every later stage reads and none of them edits.

Inside this stage

  • Automated feeds: shipments, retailer sell-out, inventory by location, price, campaign calendar and spend, weather history
  • Validation that flags outliers and stockout weeks
  • One key for item, location and week across every source
  • A published table at one grain: item × location × week

Not inside this stage

  • Forecasts, of any kind
  • Business rules, adjustments or fudge factors
  • “Cleaned” history with the awkward weeks deleted
  • Local spreadsheet copies that someone maintains on the side
Takes in
Raw feeds from the systems that already exist.
Hands on
One table, with flags, that the models read and nobody overwrites.

How it changes as data arrives

The rule that matters most is the dullest one: stockout weeks are flagged, never deleted and never left alone. Last summer, Solstice ran out of stock during the heat wave in weeks seven and eight.

Exhibit 2

Sales stop where the stock stops: two weeks of last summer recorded the shelf, not the customer

500 1,000 1,500 Week 1: 420 cases sold 1 Week 2: 520 cases sold 2 Week 3: 640 cases sold 3 Week 4: 760 cases sold 4 Week 5: 860 cases sold 5 Week 6: 980 cases sold 6 Week 7: 900 cases sold Week 7: 400 cases of demand lost to the stockout 7 Week 8: 820 cases sold Week 8: 560 cases of demand lost to the stockout 8 Week 9: 960 cases sold 9 Week 10: 880 cases sold 10 Week 11: 800 cases sold 11 Week 12: 720 cases sold 12 Week 13: 620 cases sold 13 Week 14: 520 cases sold 14 Week 15: 420 cases sold 15 Week 16: 320 cases sold 16 960 cases of demand that never became sales Stock ran out in the heat wave. Flagged, not deleted. Week of season, last year Recorded sales: 11,140 cases. Demand: 12,100. A model trained on the first number learns that heat waves are ordinary.
Illustrative. Weekly sales and estimated demand for Solstice SPF 50, last season. In weeks 7 and 8 sales were capped by available stock. The platform flags both weeks so the demand model can treat them as a floor on demand, not a measurement of it.

Hand the model the sales column and it learns that the hottest fortnight of the year looks like an ordinary one. It will then size next summer’s heat-wave response 960 cases too small, and do it confidently. Delete the two weeks and the model forgets heat waves happen. Flag them, and the model knows demand was at least what sold, which is the truth.

03

Stage 2: Learned models

The second stage holds three models. Each answers one question, and the discipline is keeping each one to its own question.

  1. The demand model: what will customers want, given the things we do not control?
  2. The response models: what do the things we do control change about that?
  3. The economic ledger: what does it cost when we are wrong, in each direction?

The line between the first two is the one most organizations blur, and it follows directly from the definition that runs through this series. A decision is anything you control. Weather is not a decision. A campaign is.

2a. The demand model

Inside

  • Drivers nobody in the building controls: weather, holiday timing, school calendars, competitor launches, store openings
  • A distribution of season demand, not a single number

Not inside

  • Your own campaigns, prices and promotions (those are 2b)
  • Capacity, batch sizes, lead times or any other constraint
  • An order quantity, a target or a service level

Exhibit 3

Before anyone spends a dollar on marketing, the season is already a range, and the range is the weather

5,000 7,500 10,000 12,500 15,000 Expected: 10,000 cases 1 summer in 10 is below 8,100 1 summer in 10 is above 11,900 Cases demanded across the 16-week season, before any campaign Shaded: the 80 percent band. The width is weather, which nobody in the building controls.
Illustrative. The demand model’s output for Solstice SPF 50 across the season, with no campaign: expected demand of 10,000 cases and a standard deviation of 1,500, almost all of it weather.

As the summer reveals itself, the model updates weekly. By July the weeks already played are no longer uncertain, and the band over the weeks remaining narrows. Nobody adjusts this by hand. Weather is data, not an opinion.

2b. The response models

Inside

  • The effect of each lever you control on demand: campaigns, price, promotion, display
  • Estimated from your own history of what you did and what followed
  • A confidence band for every effect, which narrows as evidence accumulates

Not inside

  • The decision about whether to spend (that is Stage 3)
  • Weather, calendar or competitor effects (that is 2a)
  • Last year’s uplift, carried forward by hand

Marketing has two options for the same $60,000.

Illustrative. Two campaigns, same spend, very different evidence behind them.
 Campaign A: “Beach Weekend”Campaign B: “Every Game”
What it isTV and in-store displays timed to holiday weekendsYouth-sports sponsorship and a parent influencer program
Times runFive summersNever
Expected lift+1,800 cases+2,000 cases
80 percent band+1,297 to +2,303−307 to +4,307
Where the estimate comes fromIts own five seasonsBorrowed from similar programs in adjacent categories

Campaign B does not start from nothing. A new campaign borrows its estimate from its nearest relatives, and it borrows their spread too. That is why its band is so wide that it includes zero: the honest answer, before it has run, is that it might do nothing. Each season it runs, its own evidence takes over from the borrowed evidence and the band closes in. Move the slider to watch it.

Exhibit 4 · Interactive

The more often a campaign has run, the narrower its band, and every case of width the band loses is money the season keeps

0 seasons

Zero is Campaign B today. Five is how much evidence sits behind Campaign A.

80 percent band
−307 to 4,307
Season uncertainty
±2,343 cases
Engine’s commitment
14,925 cases
Ledger cost of width
$40,549
Illustrative. Expected lift held at +2,000 cases so only the evidence changes. The prior is borrowed from similar campaigns (standard deviation 1,800 cases); each season’s readout carries noise of 900 cases. Season uncertainty combines the campaign’s band with the weather’s 1,500 cases. Commitment and cost come from the Paper 02 ledger, rounded to 25-case batches.

Two things happen as the slider moves. The band narrows quickly at first and slowly after: the first season of real evidence is worth more than the next four together. And the ledger cost of width falls with it, from $40,549 to under $27,000. Nothing about the campaign changed. Only what the organization knows about it.

2c. The economic ledger

Inside

  • A per-unit price for each direction of error: $10 over, $85 short
  • Derived from cost categories finance has signed

Not inside

  • A forecast
  • A service-level or fill-rate target
  • A number that changes because someone argued well in a meeting

The ledger is the slowest-moving component in the machine, and it should be. It changes when the business changes, through a signed revision, not when a forecast misses.

When it does change, everything downstream moves with it. Suppose finance reviews last season’s write-offs and finds that an unsold case actually costs $14, not $10, because markdowns ran deeper than assumed. The critical ratio drops from 89.5 to 85.9 percent, and the engine’s commitment for Campaign A falls from 13,750 cases to 13,475. Not one forecast changed. Two hundred seventy-five cases moved because the price of being wrong moved, which is exactly how it should work.

Check the working

When the commitment sits at the critical ratio, the expected ledger cost is the total of the two prices, times the height of the standard normal curve at that ratio, times the season’s standard deviation. At 89.5 percent the curve’s height is 0.1822, so the cost is 95 × 0.1822 = $17.31 for every case of standard deviation. Campaign A’s season carries 1,551 cases of it: $26,834. That one number, $17.31, is the price of not knowing, and the rest of this paper keeps spending it.

04

Stage 3: The decision engine

The engine is where the three models meet a decision. It generates candidates, runs each one against thousands of possible seasons drawn from the models, prices every season with the ledger, applies the constraints, and ranks the candidates in dollars.

Inside

  • Candidate options: which campaign, how many cases
  • Simulation of each option against thousands of futures from Stage 2
  • Real constraints: 25-case batches, a 15,000-case plant limit, an April commitment
  • A ranking in dollars, with the uncertainty behind each option shown

Not inside

  • Choosing the objective (Papers 01 and 02 did that)
  • Assumptions of its own that Stage 2 does not hold
  • Final authority over the decision

Here is a slice of what it produces for Solstice. Value is the season’s contribution, less the ledger cost of error and the $60,000 of campaign spend.

Illustrative. Selected candidates from the engine’s ranking. Over and short are expected cases across all simulated seasons.
CampaignCommitCases overCases shortLedger costSeason value
A13,0001,395195$30,536$381,464
A13,7502,02777$26,834$385,166
A14,5002,72626$29,434$382,566
B13,7502,059309$46,854$373,146
B14,5002,672172$41,298$378,702
B14,9253,044119$40,549$379,451

Read the ranking against the way the question gets settled today. Campaign B promises 200 more cases than A. At $40 a case, a point-estimate meeting picks B and credits it with $8,000 more. The engine picks A, by $5,715. The swing between the two answers is $13,715, and all of it is the cost of B’s width: it needs 1,175 more cases of production to protect the same customers, and it still runs short more often.

The meeting asks which campaign sells more. The engine asks which campaign costs less to be wrong about.

That answer is not permanent. It depends entirely on how wide B’s band is, and the band is something the organization can change.

Exhibit 5 · Interactive

Campaign B’s extra lift is fixed at $8,000; what it costs to be unsure of that lift decides the ranking

±1,800 cases

One standard deviation, in cases. 1,800 is B today. 805 is B after one season of its own evidence. The ranking flips at 1,342.

Engine ranks first
A, by $5,715
B’s commitment
14,925 cases
B season value
$379,451
A season value
$385,166
Illustrative. Campaign A held at five seasons of evidence (±393 cases, season value $385,166). B’s expected lift held at +2,000. Width cost is the difference in ledger cost between the two options at their best commitments, using the same $10 and $85 and 25-case batches.
05

Stage 4: Human judgment

This is the one stage with a person in it, and it is the reason the other four exist. The machine is built so that a decision owner spends their time on the decisions where their knowledge changes the answer, not on assembling the number they will be asked to defend.

Inside

  • The ranked options, the reasons for the ranking and the width behind each
  • Authority to accept or override anything
  • An override record: a reason code, a short note and the new value

Not inside

  • A consensus meeting that rebuilds the number
  • Editing the forecast to make the decision come out a certain way
  • Sign-off on every line, including the ones nobody would change
  • Overrides that leave no trace

The system asks for three fields, not a justification. Here is the first override of the Solstice season.

Illustrative. An override record, as entered.
DecisionSeason commitment, Solstice SPF 50, Campaign A
Engine recommendation13,750 cases
Reason codeDistribution change: new stores
NoteNational chain opening 30 stores in the region in early June. Not in any history the model has seen. Expect roughly 600 cases.
New value14,350 cases

The person knows something the model does not, and the record says what. If the stores open as planned, the override is worth $2,273 against the engine’s recommendation. If they do not, it costs money, and the record will show that too. Either way, it is evidence. The value of a recorded override is not that it was right this time. It is that the next hundred of them can be scored.

06

Stage 5: The learning loop

The last stage closes the line. Actuals and overrides return, and each component updates on its own clock. A factory that does not do this is not a factory. It is a forecast with extra steps, and it starts decaying the day it ships.

Inside

  • Actual demand, with stockout weeks flagged
  • Every override, matched to what happened afterward
  • Update rules and a cadence for each component

Not inside

  • Retraining everything every night because it can
  • Ledger changes that skip a signature
  • Treating overridden quantities as if they were customer demand
Illustrative. What returns to each component, how often, and what a change requires.
ComponentWhat returnsCadenceChange requires
Data platformShipments, sell-out, inventory, stockout flagsDailyAutomated validation
Demand modelDemand, corrected for stockouts; weatherWeekly in seasonAutomatic, watched for drift
Response modelsEach campaign’s readoutAfter each campaignAutomatic; review if a readout lands outside its band
Economic ledgerWrite-offs, markdowns, customer penaltiesQuarterlyA signed revision
Override recordEach override against its outcomeEnd of seasonReview: which reason codes become data

The last row is the one most systems skip. The 30 stores opened, and demand ran about 540 cases above what the model expected. The override was right. Across the catalog, “distribution change” overrides were right seven times in nine over two seasons. A reason code that keeps being right is a data feed nobody has built yet. So the store-opening calendar becomes an input to the demand model, and next year nobody has to remember to override it.

An override that keeps being right is not a judgment call. It is a missing input.

07

The Lab, beside the line

Every organization runs what-ifs. Most run them in a spreadsheet that someone built for the occasion, with its own demand assumption, its own cost assumption, and no connection to the numbers the business will actually commit to. The answer is only as good as whoever built it last.

The Lab is the same idea, with one rule that changes everything: it uses the same data, the same models and the same ledger as the line. A what-if in the Lab and a recommendation on the line disagree only because the question differs, never because the assumptions do.

Inside

  • The production data, models and ledger, read-only
  • Scenarios: a cool summer, a competitor launch, a new campaign, a new policy
  • Tail questions: how bad is the bad case, and how often
  • Proposed tests, each with a price

Not inside

  • Its own copy of the assumptions
  • A route to production that skips the engine and the decision owner
  • The recurring decision itself, which stays on the line

The commercial director asks the obvious question about Campaign B: what happens if we commit to it and the summer is cool? The Lab runs both campaigns, at their engine commitments, across every summer the demand model can produce, and then across three weather scenarios.

Exhibit 6

The weather does not separate the two campaigns; B is wider than A in every kind of summer

  • Campaign A, familiar
  • Campaign B, new
$200k $250k $300k $350k $400k $450k $500k All summers A, familiar Campaign A, All summers: 1 in 10 seasons below $293k, median $392k, 1 in 10 above $470k 293470 B, new Campaign B, All summers: 1 in 10 seasons below $241k, median $389k, 1 in 10 above $506k 241506 Cool summer A, familiar Campaign A, Cool summer: 1 in 10 seasons below $277k, median $318k, 1 in 10 above $358k 277358 B, new Campaign B, Cool summer: 1 in 10 seasons below $196k, median $316k, 1 in 10 above $436k 196436 Normal summer A, familiar Campaign A, Normal summer: 1 in 10 seasons below $352k, median $393k, 1 in 10 above $433k 352433 B, new Campaign B, Normal summer: 1 in 10 seasons below $271k, median $391k, 1 in 10 above $500k 271500 Heat wave A, familiar Campaign A, Heat wave: 1 in 10 seasons below $440k, median $470k, 1 in 10 above $486k 440486 B, new Campaign B, Heat wave: 1 in 10 seasons below $367k, median $468k, 1 in 10 above $524k 367524 Season value: contribution, less ledger cost and campaign spend
Illustrative. Season value in thousands of dollars from simulated seasons at each campaign’s engine commitment (A: 13,750 cases; B: 14,925). Bars run from the 1-in-10 bad season to the 1-in-10 good season; dots mark the median. Weather scenarios fix the summer and leave the campaign’s uncertainty in place.

The director asked about the weather. The Lab’s answer is that the weather is the wrong worry. A beats B in every kind of summer, by between $2,000 and $11,000 on average, and the gap is the campaign’s own uncertainty, not the climate. B’s 1-in-10 bad season is roughly $52,000 worse than A’s. Its 1-in-10 good season is roughly $36,000 better.

So the useful question is not whether to fear a cool summer. It is whether B’s width is worth paying to reduce. That is a question only the Lab can price, and it is the subject of the next section.

08

What a new campaign is worth

Campaign B costs $5,715 this season compared with A. That is the price of running it. What it buys is a season of B’s own evidence, which narrows its uncertainty from ±1,800 cases to ±805, measured as one standard deviation. Exhibit 5 already showed that below 1,342, the ranking flips.

But the band does not just narrow. It moves, to wherever B’s real effect turns out to be. Nobody knows that in advance, so the Lab prices the full range of what the season could reveal.

Exhibit 7

A test that costs $5,715 this season is worth about $28,500 in every season after it, because a bad result costs nothing to walk away from

$0k $10k $20k $30k $40k $50k $60k Weak readoutB comes in near +800 cases Go back to A. Gain: $0 Expected readoutB comes in near +2,000 Expected readout: next-season gain $5,374 Switch to B. Gain: $5,374 Strong readoutB comes in near +3,200 Strong readout: next-season gain $53,374 Switch to B. Gain: $53,374 Expected, across every readout: $28,468 a season Price of the test this season: $5,715 Value added to next season by knowing what B does The weak case costs nothing next season because the option to go back to A is kept. That asymmetry is what the test is buying.
Illustrative. Next-season value of switching to Campaign B over staying with A, after one season of B’s evidence. Readouts shown at three points in the range of what B could reveal. The expected figure averages over the full range of readouts, of which B wins 53 percent.

The asymmetry is the whole argument. If B turns out weak, next season goes back to A and loses nothing. If B turns out strong, it wins by tens of thousands of dollars a season, every season. The downside is capped at the price of the test. The upside is not. That is what an option looks like, and organizations that only ever run the campaign with the best point estimate never buy one.

Check the working

After one season, B’s uncertainty is ±805 cases and its ledger cost is $29,461. B beats A next season whenever its updated lift is above 1,866 cases. Before the test, that has a 53 percent chance. Weighting every possible readout by its probability, the expected gain over staying with A is $28,468 a season. Against a one-time cost of $5,715, the test pays for itself in its first season after.

This changes the decision, and the change is recorded the same way as any other. The decision owner overrides the engine’s ranking with a reason code of Deliberate test, a note pointing to the Lab’s run, and the new value: Campaign B. Buying information is a legitimate reason to depart from the ranking. It just has to say so.

09

One season through the machine

Here is the season as the machine saw it, at three moments.

Exhibit 8

Over one season, Campaign B goes from a band that includes zero to the engine’s first choice for next year

  • Campaign A, five seasons of evidence
  • Campaign B, evidence accumulating
Pre-seasonWeek 0 0 2,000 4,000 ACampaign A, 80% band 1,297 to 2,303 cases BCampaign B, Week 0: 80% band -307 to 4,307 cases, center 2,000 -307 to 4,307 Band includes zero. Engine ranksA first. First readoutWeek 8 0 2,000 4,000 ACampaign A, 80% band 1,297 to 2,303 cases BCampaign B, Week 8: 80% band 1,001 to 3,665 cases, center 2,333 1,001 to 3,665 Half a season of evidence. Band42% narrower. Season closeWeek 16 0 2,000 4,000 ACampaign A, 80% band 1,297 to 2,303 cases BCampaign B, Week 16: 80% band 1,448 to 3,512 cases, center 2,480 1,448 to 3,512 Next season, engine ranks B firstby $24,574. Seasonal lift, cases. Bars show the 80 percent band; dots the center.
Illustrative. Campaign B’s estimated seasonal lift before the season, after an eight-week readout, and at season close, with Campaign A for reference. B’s realized lift in this example comes in near +2,600 cases.
Illustrative. What each stage did at each moment.
StageWeek 0Week 8Week 16
1. DataPublishes last season with weeks 7 and 8 flaggedEight weeks of sell-out, no stockoutsFull season, plus the new stores’ sell-out
2. ModelsDemand 10,000 ±1,500; B +2,000, band −307 to 4,307B +2,333, band 1,001 to 3,665B +2,480, band 1,448 to 3,512
3. EngineB plus new stores wants 15,525 cases; capped at the 15,000 plant limit, at a reported expected cost of $1,154Reprices in-season allocation across retailer warehousesRanks B first for next season, by $24,574
4. JudgmentTwo override records: new stores, deliberate testNone neededNone needed
5. Loop B’s first readout updates its bandStore-opening calendar added as a demand input
LabPrices the testRetires the tail question: B’s band no longer includes zeroNext question queued: B in a second region

Count the meetings in that table. There are none where anyone builds a number. There is a director’s question in week zero, answered with a price. There are two override records, each three fields long. Everything else ran on a clock.

10

What to ask on Monday

Most organizations already own pieces of this machine. The question is which stations are missing and which ones are doing another station’s job. Five questions are usually enough to find out.

  1. What happens to stockout weeks in our history? If they are deleted, or left in as if they were demand, every model downstream is learning the shelf instead of the customer.
  2. Is marketing’s effect a model with a band, or an adjustment someone makes? If it is an adjustment, the organization pays for every campaign twice: once to run it, and again to forget what it did.
  3. Where does the price of being wrong live, and who signed it? If the answer is a service-level target, the engine has nothing to rank against.
  4. When someone overrides the recommendation, what gets written down? If the answer is nothing, the organization’s best knowledge leaves the building every time someone changes jobs.
  5. Do our what-ifs run on the same assumptions as our commitments? If each analysis builds its own, the organization does not have a Lab. It has a collection of opinions with formulas in them.

None of these require a platform purchase, and the machine runs on the data and tools most organizations already have. What it does require is people in roles that rarely exist today, which is where the next paper picks up.