Hanyu Liu

Flagship case study. Applied AI for garment manufacturing: a language model reads, a rule engine computes, people confirm.

AI Quote Copilot

Turning unstructured manufacturing inquiries into traceable, rule-governed quotations. A garment quote starts from tech packs, size charts, sketches and emails and ends in a number that must be exactly right — so the product question was never "can a model read a tech pack", but which judgments may be probabilistic, which must be deterministic, and which stay with people.

StatusIn validated use inside one manufacturer
RoleIndependent product lead and system architect
PeriodAugust 2026 – present
Validation26 real inquiries, 216 quotes, 149 reviewed line by line
In 90 secondsProblemProductInterfaceTry itUnder the hoodEngineering and evaluationJudgmentBusiness impactIdentity

In 90 seconds

What was built, why it matters, how it works, what was decided and what was measured. Everything below this section is the deep dive.

What I built
A quoting system for a garment manufacturer: the inquiry files go in, a quotation with every number traceable comes out.Independent product lead and system architect; built with AI coding agents under direction.
Why it matters
Inquiries arrive faster than an estimating team can answer them, and an unanswered inquiry is an order that goes elsewhere.The inputs are incomplete and contradictory; the output has to be exactly right.
How it works
A language model reads and proposes; a rule engine does all the arithmetic; a person confirms what the evidence does not settle.The architecture, node by node
What was validated
0.64%mean system computation error on 149 reviewed quotes216 quotes from 26 real inquiries, checked line by line against human costing; error counted at the system level only, net of human-set parameters and business terms. How it is measured
Try it
A deterministic demo on one synthetic inquiry, taken through four steps: read, constrain, compute, review.Open the demo

What I decided

Four choices that shaped the system. Pick one to compare the road taken with the road not taken.

01

The problem, and why it is a good one for AI

A garment factory quotes by hand. An estimator reads what the buyer sent — PDFs, spreadsheets, sketches, size charts, the email thread — and works out fabric, cut pieces, processes, trims and freight for every style. Inquiries arrive far faster than a small estimating team can answer them, and an unanswered inquiry is an order that goes elsewhere.

The hard part is not that the inputs are unstructured. It is that they are usually incomplete (no size chart, no process note), often contradictory (the email says one fabric, the tech pack another), governed by layered cost rules (area from the size-chart rows, surcharges per process, trims by count), and the answer must satisfy strict business constraints — units, rounding, minimums, the customer's own conventions. Uncertain inputs, exact outputs.

Who it is for
The estimating team of one manufacturer; later, sales staff who need a first number quickly.Built from inside the workflow, after years of reading the same documents.
What had to be true
Every number traceable to a source; nothing defaults silently; the company's costing rules stay the company's.Set before the first model call was wired in.
What was deliberately not built first
A new front end, customer-facing delivery, broad category coverage.One real historical order had to run end to end before any of that.
The design principle
Probabilistic reasoning × deterministic execution.The model handles judgment under uncertainty, rules handle arithmetic, people handle the exceptions that carry risk.
02

The product

One inquiry travels through the eight stages in the product's left rail (the agent timeline inside shows its five attributed steps); the agent does the reading and the rules do the arithmetic. These are the real screens of the working product, with client names, codes and prices replaced and the clients' styles swapped for stand-in garments. The interface is in Chinese; each caption says what the screen does.

AI Quote Copilot home screen
Home. Drop every file for one inquiry — sketches, tech packs, size charts, the email — fill four fields, start the quote.
03

Interface, recorded

Two short recordings from the working interface. The library is designed so that fabric is the only thing with texture and the agent is the only thing that glows; everything else is white, black and one accent.

Fabric library: point at a category and the rest fades; a card lifts out of the stack as you hover; click to open the swatch.
Hand feel: press a swatch and it sinks the way that cloth does — fleece deep and slow, rib stretches sideways and springs back. A WebGL mesh per fabric type, switched off when idle.
04

Try it: a deterministic demo on synthetic data

This is not connected to the production backend. It reproduces the system's behaviour — evidence before facts, explicit unit conversions, seam allowance kept separate, conflicts held for a person, every number traceable — on a made-up inquiry with made-up prices.

Inquiry documents (synthetic)

Email from buyer Quantity 1,200 pcs, 3 colours Fabric: 100% cotton single jersey 180 gsm Terms: FOB, delivery December
Tech pack Women's drop-shoulder tee, short sleeve Main fabric: 95/5 cotton/spandex single jersey 180 gsm Neck: 1×1 rib, 2 cm, 220 gsm Print: chest, 12 × 9 cm, 2 colours Woven main label, care label, hangtag
Size chart (cm) Chest ½ — S 51 / M 54 / L 57 Body length from HSP — S 66 / M 68 / L 70 Sleeve length from shoulder point — 24 (all) Bicep ½ — S 21 / M 22 / L 23 Neck opening circumference — 50 (all)

Half measurements are stated as such on purpose: the demo must double them exactly once, visibly.

Fields the model proposed, each tied to its evidence

Hover a field to see the source line it came from. Dashed blue = read by the model; solid black = checked against the document; amber = two sources disagree.

Prices, rates and the style are invented for this page. In the real system the costing rules, price libraries and customer terms are the company's own and are not shown.

05

Under the hood

Click a node. Each one carries a decision — why it is where it is, and what it would cost to put it somewhere else.

Unstructured inputsdocs, charts, email Interpretationmodel, probabilistic Evidence checkreading becomes fact Constraints, costingrules, deterministic Independent reviewsecond agent Human confirmation: only what the system cannot settle Delivered quote Company knowledge: rules, price libraries, customer terms, precedents, snapshots, regression casesmodels can be swapped; this layer stays
Start here

Why a hybrid, not a pure agent

A single agent that reads the documents and writes the quote would have been the fastest thing to build. It was rejected because a model that produces the final number makes the result hard to reproduce, the process hard to audit and the cost hard to bound — and ties the product to one vendor. Three rules have held since the first persistent version: no unconfirmed model output enters a formula; nothing silently defaults; every number is traceable to its source.

One annotation's journey

A note on a sketch pointing at a sleeve becomes a line in the quote like this: the model links the annotation to the part it points at and to any matching text in the documents; the process is written into a structured field with its source; the rule for that process computes its cost line; and if the drawing and the text disagree, the item is held for a person. The working convention for that last step — structure follows the drawing, fabric follows the text — is itself a rule the business set, not something the model decides.

06

Engineering and evaluation

Every keyword below corresponds to something that exists in the system. If it did not, it would not be here.

Reliability engineeringwhat it means here
No unconfirmed model output enters a formula. A missing input blocks the quote and names what is needed instead of defaulting. Upgrades re-derive every delivered order and report drift with its cause.
Error taxonomysystem / data / business
Each review finding is classified: a system computation error, a data gap the customer never filled, or a business-term adjustment. Only the first kind counts against the system; all three are tracked.
Regression testingon real orders
Reviewed real orders become regression cases. A rule change that moves a delivered number fails the build. 184 numbered development and validation batches over about ten weeks.
Human-in-the-loopby design, not as fallback
Conflicting sources, missing data and customer-specific conventions go to a person with the candidates shown; the decision is recorded with who made it and why.
Traceability and auditabilityevery number has a source
Structured business objects carry evidence and source location; delivered quotes are snapshotted; every read, change and export is logged.
Independent reviewtwo agents, two paths
A second agent that has not seen the quoting session reads only the backend, the originals and the order log, runs the mechanical checks, and ranks judgment items by their effect on the final price so a reviewer's attention goes where it matters.
Cost controlrouting and caps
Deterministic work costs no model calls; routine reading uses a light model; only hard judgments escalate. Multi-model routing with a monthly spend cap keeps accuracy and cost a deliberate trade.

How accuracy is measured

What is counted
Per reviewed quote: the absolute difference on every cost line the system computed, summed, divided by the human-reviewed price. Signs do not cancel.Quotes are averaged by count. A quote the estimators have not checked has no accuracy figure.
What is not counted as system error
Business-term adjustments made at review; prices only the estimating team holds; data the customer never supplied; the estimator's own judgment calls.Recorded as pending, data or business issues — excluded from the metric, not from the product's responsibility.
Result
0.64% mean system computation error on 149 reviewed quotes85% of reviewed quotes within 2%. Error concentrates in a few single points; each one above 2% has a documented cause and a status: turned into a rule, turned into a delivery check, or kept as a human judgment.
What this figure is not
It is not the overall gap between the system's quote and the human quote, which also includes the adjustments above.
Why define it this way: "total deviation from the human quote" mixes system mistakes with business decisions and sends iteration in the wrong direction. A metric that separates them is what made the iteration converge.
07

Judgment: what closes, what stays open

Two reviewed orders, two opposite outcomes. Together they are the clearest statement of the design principle: a reliable AI system is not one that removes all uncertainty, but one that knows which uncertainties system constraints can close and which must stay with the business.

Closed by a constraint

Body and rib fabric read as one

The parser merged two adjacent fabric lines — jersey for the body, rib for the trims. The waste allowance changed and the quote moved by about one cent. It was reproducible and had a definite cause, so it became structure: every fabric field now carries the garment part and the source location it came from, and comparable real orders were re-run as regression cases.

Kept with people

Embroidery the business counts as a woven badge

The documents said embroidery; the estimating team prices that decoration as a woven badge and asked to keep the system's reading and adjust by hand. No rule was added. The convention belongs to this customer and this team; a hard rule would be wrong on the next one. The item is flagged for human confirmation and the adjustment is recorded with its reason.

Only reproducible errors with a definite basis are turned into rules. A convention that depends on a customer or a team is recorded as precedent and proposed, never promoted to a rule by itself. Not every error is fixed by another rule; the system's job is to tell the two kinds apart and leave a trace either way.

08

Business impact

Throughput: the inquiries get answered

Multiple inquiries and multiple styles are quoted in parallel; one inquiry is read once as shared order context and each style takes only the pages it needs. The capacity problem — "we cannot quote everything that comes in" — is addressed before the accuracy problem is allowed to matter.

Reliability: fast is only useful if it can be used

Every number is traced to its source, computed under the company's own rules and checked before delivery. 149 quotes reviewed line by line by the estimating team; 0.64% mean system computation error; 85% within 2%.

Compounding: the next inquiry starts further along

Review findings flow back as rules, delivery checks and regression cases; customer terms set once are carried to the next order. This is not model training — the changes are visible rules and data, and they can be rolled back. Individual estimating experience becomes capability the company keeps.

Validation scope
26 real inquiries, 216 quotesProduced inside the factory's live quoting workflow, not a benchmark set. As of mid-October 2026.
Reviewed
149 quotes checked line by lineBy the estimating team, against their own costing.
Process
184 numbered build batches, about ten weeksEach build verified on live orders after installation; corrections shipped as follow-up builds.
What is next: measure review time and bring it down with mechanical checks; extend to more categories; let estimators edit terms without a developer. Client names, prices, internal rules and source code are not shown; examples are described at mechanism level. The system is in validated use inside one manufacturer and is not described here as a deployed commercial product.
09

Identity through the system

The product's visual language was written down as a specification so that the interface, the pitch material and demonstrations read as one family: white ground, black text, as few words as possible; one accent colour per area, used only in small places; the agent is the only thing that glows — a plexiglass button with a slow rainbow edge and a glass bead holding a thread of colour; cloth is the only thing with texture — real fabric photographs, tinted, with pinked edges. Mastheads in a Didone serif give the libraries an editorial feel without decoration.

The mark is a Möbius band made of six threads — a stitch that never ends. Monochrome on white; coloured only where it stands for the agent.

AI Quote Copilot mark, monochrome AI Quote Copilot mark, spectrum threads AI Quote Copilot app tile