Building True Intelligence
I was sure I'd shipped a bug the first time Contour told me Riley was a Size 29
I spent twenty minutes hunting for a defect that did not exist, because Contour, the AI fit-prediction demo I built, recommended Riley a Size 29 in a pair of jeans a waist-only size chart calls a 28. Contour is a physics-grounded size recommender for apparel: you give it a body in centimetres (no photo) and a garment's fabric mechanics, and it computes the circumferential strain at each zone (waist, hip, thigh, inseam) against that fabric's stretch limit, then returns a size with a confidence score. Riley's waist measurement pointed straight at 28. The engine returned 29 at 95 percent confidence, comfortable at every zone, with a line I had written but not yet believed: "A waist-only size chart would say Size 28. Wrong here." The garment was the Ironside 14oz Raw Selvedge Straight Jean, 100 percent cotton, rigid non-stretch, roughly a 1 percent stretch fabric. My first instinct was that my strain math had a sign error. It did not. At size 28 the thigh exceeded what that zero-stretch denim can give, and the engine had refused to seat a body in a fabric that would not move for it.
Riley on the Ironside 14oz Raw Selvedge Straight Jean: Size 29, 95% confidence, comfortable at every zone. The waist-only chart says 28; at 28 the thigh exceeds this rigid denim's stretch limit. Riley and the Ironside jean are synthetic fixtures, not a real shopper or product.
Then I kept the body identical and swapped only the jean
I did the one experiment that would tell me whether the engine was wrong or I was, and it changed how I think about sizing entirely. I kept Riley's body measurements byte-for-byte identical and changed nothing but the garment, from the rigid Ironside to the Driftwood Stretch Slim Jean, a comfort-stretch denim that reads at roughly 14 percent stretch. Same shopper, a visually similar jean, and the correct size dropped to 28 at 90 percent confidence, clean at every zone. On this fabric the engine and the waist chart finally agree on 28, because the stretch forgives the thigh that the raw selvedge punished. That side-by-side is the whole thesis in one beat: the same body is a different correct size in raw selvedge than in stretch denim, and a size chart cannot tell the two jeans apart because it has four one-dimensional numbers and no idea what the cloth is made of. Fit is not a property of the body alone. It is the body meeting a specific fabric, and that meeting is mechanical.
The identical body, one garment later. Riley on the Driftwood Stretch Slim Jean (a ~14% stretch denim): Size 28, 90% confidence, clean. Same body, different fabric, different correct size. Both are synthetic fixtures.
Once I could watch the fabric move the size, I stopped trusting the one part that couldn't feel it
I made a deliberate architectural choice the week that catch landed: the size decision does not live in the language model. There is an LLM in Contour, and it does real work reading messy vendor product copy ("14oz raw selvedge denim", "100% cotton", "rigid non-stretch") into a structured fabric spec. But I moved the actual decision, the per-zone strain calculation and the size selection, into plain Python (backend/strain.py), pinned by 8 unit tests, because the moment I asked a model to grade its own fit judgment I got answers that drifted, and a checkout API cannot drift. Agents advise, code decides. The payoff shows up in the receipt: every recommendation writes a replayable JSON record with the extracted fabric spec, the exact source phrases that drove each parameter, the full per-size strain matrix, and the final decision. For Riley's raw-selvedge call it records fabric_class: raw_selvedge_denim, stretch_pct: 1, the phrases it read those from, and the regret score for each candidate size. I can hand that file to a skeptical engineer and they can replay exactly why 28 lost and 29 won, without taking my word or a model's for any of it.
The audit receipt for Riley's call: the extracted fabric spec with the exact source_phrases that produced it, the critic's sign-off, and the per-size strain matrix that shows why the engine chose 29. Generated offline from synthetic data.
The number I refuse to put in a headline is the 100 percent, and the reason is the number I lead with instead
I want to be careful about the strongest-looking number in this project, because the honest one is more useful. On a fixed, labeled 105-pair synthetic golden set (15 bodies against 7 scored garments), Contour scores 100 percent against a naive waist-only baseline's 60 percent. I will not lead with that 100, and I would push back on anyone who did, because that set's labels use the same measurable fabric-stretch figures the engine uses, so it is a property of this constructed set and not an open-world guarantee. The number I stand behind is the gap: a 40 percentage-point lift over the real incumbent method, the waist-only size-chart matching that most fashion sites run today. The advantage is largest exactly where it matters, on rigid, fit-sensitive fabrics: on raw selvedge the engine reads 100 percent against the chart's 33 percent, while on a 50 percent-stretch ribbed knit the chart nearly catches up (93 percent) because the fabric forgives almost everything. That shape is the point. Fit prediction earns its keep on denim and tailoring, not on the fabrics that fit no matter what. It matters because fit-related returns run 53 to 67 percent of apparel returns and 63 percent of shoppers bracket, ordering two sizes to send one back (Veriprajna WP34 research, 2026).
The build decision I defend hardest is the one where Contour refuses to answer
I am proudest of the recommendation Contour will not make. When I ran Jordan against the same rigid Ironside jean, no size came out clean: the smaller sizes fail the thigh, the larger sizes run loose at the waist, and on a 1 percent-stretch fabric there is simply no size that clears every zone. The tempting move, the one a confident model makes, is to round up and print a number anyway. The engine abstains instead. It surfaces the least-bad size, drops its confidence to 58 percent, names the genuine conflict ("waist strain loose, no size clean at every zone"), and tells the shopper to bracket or speak to a stylist rather than bluff. Across the whole eval it does this on 33 of the 105 pairs. A naive chart, on that same case, confidently prints a 28. Building the abstain path took me longer than building the happy path, and it is the behavior I would defend first in a room full of skeptics, because a wrong-but-confident size is the expensive kind of wrong: it is the return, the reverse-logistics cost, and the shopper who does not come back.
Jordan on the Ironside raw selvedge jean: no size clears every zone, so Contour abstains at 58% confidence, surfaces the least-bad size, and says "bracket or speak to a stylist" instead of guessing. It abstains on 33 of 105 pairs. A synthetic fixture.
What I keep coming back to
I keep coming back to how much of the fashion industry's returns problem is being treated as a picture problem. A better size chart is still four numbers, and a generative try-on image can render the jeans on a body beautifully and still have no idea whether the thigh exceeds the denim's stretch limit when that body sits down. Neither can feel the fabric, and fit is a fabric fact. You can run the same experiment I did, keep one body fixed and swap the cloth, and watch the correct size move, at veriprajna.com/demos/ai-fit-prediction-fashion. The question I have not stopped asking is the one I would put to anyone building recommendation systems for physical goods: when your model is about to state a confident answer that a plain, testable calculation would refuse, which one do you let reach the customer?