Build When the Customer’s Data Is Poor
Decide whether poor warranty data can support a measurable improvement, then ship a data-repair pipeline with a small decision layer, phase by phase.
- Kind
- Case study
- Level
- Core
- View
- Interview prep
- Sections
- 4
- By
- Sourav Banerjee
- Last updated
- 21 Nov 2026
Interview view. The case brief, design walkthrough, technical deep dives and quick review, condensed into bullets, tables and lines to say out loud, with interactive diagrams to step through.
Want to go deep? The full casebook has the complete reasoning in prose, the original diagrams, practice questions with worked answers and the sources.
Case brief
The case in one line: measure what is wrong with the data first, then build what it can already support.
30-Second Cheat Sheet
- The prompt: the customer wants AI, but its data is incomplete, inconsistent and poorly documented, and it still wants value this quarter.
- Two tempting answers, both wrong: pick a model and hope, or refuse until someone cleans the data.
- The constraint: the data can only prove what it contains.
- Poor data changes what gets built first. It isn't a reason to refuse the work.
- Four moves: split "poor" into eight failure types, score readiness in one week, build a data-repair pipeline with a small decision layer, ship each data fix as a phase of value.
- Worked example: a pump manufacturer, about 12,000 warranty claims a month, about 11 minutes each.
- "Not yet" is right only when a measured defect blocks every route to value.
1. A Customer Wants AI This Quarter, and Its Data Is Poor
The prompt (verbatim, from the source's question bank)
"The customer wants an AI solution, but its data is incomplete, inconsistent, and poorly documented."
- In practice: missing fields, labels that disagree with each other, duplicate records and gaps in history.
- The customer still wants value this quarter.
Two tempting answers, both wrong
| Tempting answer | Why it fails |
|---|---|
| Pick a model anyway and hope it copes | A model can't be more reliable than the evidence it reads |
| Refuse until somebody cleans the data | The customer gets nothing, and the data stays as it is |
- The constraint that rules out both: the data can only prove what it contains.
- "Not yet" is the right answer only when a measured defect blocks every route to value.
The answer in four moves
- Split "poor" into eight failure types, each with its own measurement and remedy.
- Score readiness in one week.
- Build a data-repair pipeline with a small decision layer on top.
- Ship each data fix as a phase of value.
The core idea as a flow
customer data → measure eight failure types → one-week readiness score →
- Build or narrow → ingestion quality gates → small decision layer → review queue that grows labels (and feeds corrections back into the gates).
- Not yet → fix the data at its source.
How to read the flow
- Measurement comes before any design choice. The readiness score is the fork.
- Only "build or narrow" reaches a model, and even there the model is one small box between quality gates and a review queue.
- "Not yet" isn't a dead end. It becomes a data project that fixes the data at source, the same repair that stops defects arriving again next month.
The terms that carry the whole case
| Term | Meaning |
|---|---|
| Label | The recorded right answer for a record, such as the correct failure code for a warranty claim |
| SME | Subject-matter expert: the person at the customer who knows the domain well enough to say whether an answer is right |
| Quarantine | Setting a bad record aside with the reason it failed, still queryable, instead of deleting it or filling in a guess |
| Cohen's kappa (κ) | How often two people agree beyond what chance alone would produce (worked through in walkthrough step 4) |
2. Follow One Warranty Claim Through the Problem
The running example
- A manufacturer of industrial pumps, about 12,000 warranty claims a month.
- An adjuster reads each claim and decides: approve, reject or request more information. Suspected design defects go to engineering.
- Each claim takes about 11 minutes.
- Every number here is a source assumption, not a measured customer result.
One illustrative claim (built from the defects the source reports)
- Arrives in the ERP (enterprise resource planning) system of a company the manufacturer acquired.
- Failure code: "OTHER".
- Serial number field: empty.
- Invoice and photos are scans; the serial number is only visible on the scanned invoice.
- The same claim was also entered in the parent company's ERP, under a different claim number and a different failure-code list.
What a model does with it as-is
- It sees a placeholder code, no serial number and two apparently separate claims.
- It produces a fluent recommendation from broken inputs.
What this design does instead
- Quality gate flags the empty serial number as missing, rather than guessing one.
- Extraction reads the serial number from the scan, with a confidence score.
- Normalisation maps both ERPs' codes to one agreed list and links the duplicate.
- Low confidence on any field → an adjuster checks that field, and the correction is saved as a trusted label.
- Only then does the system draft a recommendation that cites the fields it used.
- In the first release, a person still makes every decision.
3. What You Need to Design
The task
- Decide whether this customer's data can support a measurable improvement in one specific decision.
- Then design the first build it can support.
- Show how you would:
- Measure the data
- Decide what to build anyway
- Evaluate when the labels themselves are suspect
- Tell the customer
- Ship the work in phases
Who it's for
- Engineers preparing for Forward Deployed, solutions or applied-AI engineering interviews.
- Especially a customer-scenario or problem-decomposition round where the data is messy, sparse or untrusted.
What it assumes
- Comfort with data pipelines, labelling and model evaluation.
- It builds on two other cases and links to them rather than repeating them:
- Scoping to Deployed Agent: delivery gates and intake refusal.
- Evaluation and Release Gating: the release gate.
By the end you should be able to
- Explain the approach end to end at interview depth, from measuring data defects to a phased build.
- Answer follow-ups on:
- Readiness scoring
- What to build anyway
- Ingestion gates
- Growing labels
- Building an eval set early
- Telling the customer their data is poor
- The cost pivot
How to use the casebook
- Before walkthrough step 3: list the ways the warranty data could be poor and how you would measure each.
- Rehearse the 45-minute plan (Practice, in the full casebook) aloud with a timer.
- The night before: the level calibration (Practice, full casebook) and the Quick review.
The source's own limits
- Its question bank gives this prompt one statement, eleven talking points and one closing line.
- Unlike most questions in the bank, it has no block of likely follow-ups. The follow-ups in Practice were written for this case.
- The original page was one mandatory Interview Guide in three parts; the full casebook spreads it across five sections.
Quick Recall: Lines to Say in the Interview
- "The data can only prove what it contains."
- "Poor data changes what gets built first. It isn't a reason to refuse the work."
- "I'll measure what's wrong with the data first, then build what it can already support."
- "Not yet is right only when a measured defect blocks every route to value."
- "The model is one small box between quality gates and a review queue."
- "The gate flags a missing serial number. It never guesses one."
- "In the first release, a person still makes every decision."
Design walkthrough
The goal: prove what the data can support before any model is chosen, then build that and phase the data fixes as value.
30-Second Cheat Sheet
- Model last. A better model mostly writes more fluent answers from the same broken records.
- Ask which decision improves. Only defects that touch it matter; the rest can stay poor for now.
- Split "poor" into eight measurable failure types. Inconsistent labels and access restriction fool teams most.
- Score readiness in one week, with day 3's two-SME relabel scored as κ as the key measurement.
- Pick a design whose weakest input the data already supplies. "Not yet" needs three conditions at once.
- Architecture = a data-repair pipeline with a small decision layer. The label store is what everything else depends on.
- Gates at ingestion quarantine, never default. Data contracts fix defects at source.
- Tell the customer with measurements, frame phase 0 as value, and exit each phase on a measured condition.
Opening line (source's sentence to land early): "I would not begin with model selection. I would first determine whether the available data can support a measurable workflow improvement."
1. Refuse to Start with the Model
What a strong answer discusses (the source's list)
- Data-quality profiling, ownership, missingness, duplicates and schema inconsistencies.
- Label quality, freshness and data contracts.
- Human-in-the-loop correction, narrowing the initial use case, and whether AI is the right solution at all.
Why model last
- Say the opening line in the first three minutes.
- A better model mostly produces more fluent answers from the same broken records.
- If the serial number is missing, a stronger model writes a more convincing recommendation without it.
- What the interviewer tests: whether that instinct arrives before the architecture does.
Two mistakes from the question bank that bite harder here
| Mistake | Why poor data makes it worse |
|---|---|
| #1: "Starting with 'I would use RAG (retrieval-augmented generation) and agents'" | Names a technique before anyone knows what the data can support |
| #5: "Discussing model accuracy without defining evaluation" | The labels that would define accuracy are themselves suspect |
Soundbite: "I would not begin with model selection. I would first determine whether the available data can support a measurable workflow improvement."
2. Ask the Questions That Decide Whether Data Matters
- Not every data problem blocks every use case.
- The questions find which defects touch the decision the customer wants improved. The rest of the data can stay poor for now.
| Question | What changes with the answer |
|---|---|
| Which decision or task should improve, and who makes it today? | Which fields matter; the rest of the data can stay poor |
| What does "poor" mean to the person saying it? Missing, wrong, or unfindable? | Whether the fix is collection, correction, or integration |
| Who owns each source, and who can fix it upstream? | Whether defects get repaired at source or patched downstream forever |
| Is there any trusted outcome record: approvals, refunds, audits? | Whether historical labels exist at all, and how far to trust them |
| How is the task done today without AI, and how long does it take? | The human baseline, the bar the system must beat |
| Which errors are tolerable, and which need a human? | Where confidence thresholds and review queues sit |
| What data may leave which boundary? | Whether scanned documents can go to a hosted model |
| Is a rules or reporting fix enough? | Whether AI is the right solution at all |
The question candidates skip: the last one
- It comes from the source's own list.
- Some "AI projects" are a missing dropdown on an entry form.
- If adjusters type free text because the form has no failure-code list, fixing the form beats building a model to guess what the dropdown would have said.
- Saying so signals judgement. It isn't a failure to sell.
The reusable opening, plus one promise
- Question bank's opening: clarify the outcome, user, workflow, constraints and success measure, then state your assumptions.
- This case adds: "and I will measure the data before I trust it."
3. Split "Poor" into Eight Failure Types You Can Measure
- "The data is bad" isn't actionable: nobody can fix "bad".
- Each type has a different week-one measurement, blocks different work and needs a different remedy. Naming the type tells you what to do next.
| Failure type | Symptom | Measure in week 1 | What it blocks | Remedy |
|---|---|---|---|---|
| Missing | Empty or placeholder fields ("N/A", "OTHER", 0) | Null and placeholder rate per field, per source | Any feature or answer that needs the field | Extract from free text or attachments; make the field required at entry |
| Wrong | Values present but false | Error rate on a 100-record sample checked by an SME | Trusting any single field without corroboration | Cross-check against a second source; flag, don't silently fix |
| Inconsistent labels | Same case, different label across teams or years | Agreement between two SMEs relabelling the same sample | Supervised training; historical labels as ground truth | Adjudicated relabel of a stratified sample; a written label guide |
| Stale | Correct once, not now | Age of last update against how fast the fact changes | Any answer about current state | Freshness per source; a staleness flag shown to users |
| Siloed or unjoinable | No shared key across systems | Join success rate on a sample | Any view spanning two systems | Entity resolution with a reviewed match table |
| Unstructured or scanned | The fact is in a PDF, photo or email | Share of records whose key fact is only in an attachment | Rules and reports; cheap retrieval | Extraction to a schema, with confidence and review |
| Biased or unrepresentative | History covers some segments, not others | Record counts by segment and period against current traffic | Any claim of accuracy outside the covered segments | Stratified sampling; explicit out-of-scope segments |
| Access-restricted | Data exists, but the project can't use it | Sources with access granted versus requested | Everything downstream of that source | Escalate by day 3; design around the gap |
Read it by row: the brief's claim carries four types
| Defect on the claim | Failure type |
|---|---|
| "OTHER" failure code | Missing in disguise (a placeholder) |
| Empty serial number | Missing |
| Scanned invoice | Unstructured |
| Claim in both ERPs | Siloed and unjoinable |
- One record can carry four failure types, and each needs its own fix.
The two rows that fool teams most (the source's author)
1. Inconsistent labels are worse than missing labels.
- A missing label is visibly missing, so nobody trains on it.
- An inconsistent one looks like ground truth. It gets trained on, and then the evaluation, using the same labels, scores the model's copied errors as correct.
The routing case (source-reported; this casebook didn't measure it):
| Stage | Number |
|---|---|
| Fine-tuned model, offline | 94% accuracy |
| Prompted baseline, offline | 81% |
| Fine-tuned model, production | about 78% |
| Honest offline after dedup, time split and adjudicated relabel | near 83%, production matched within two points |
- One of three compounding causes: labels came from a previous version of the same system's routing decisions. The model learned the old system's errors, and evaluation marked them right.
2. Access restriction is a data-quality problem in disguise.
- The Scoping to Deployed Agent framework treats data access as its own risk: "Start day 1, escalate day 3".
- Data nobody on the project can read has quality zero, whatever it contains.
Soundbite: "Inconsistent labels are worse than missing ones, because they look like ground truth."
4. Score Readiness in One Week
- The assessment turns "poor" into numbers the customer can argue with, and produces the decision memo that justifies the build.
- One week is enough if the scope is one decision (the adjuster's approve, reject or request-more-information call), not the whole data estate.
| Day | Activity | Output |
|---|---|---|
| 1 | Confirm access; inventory sources, owners and refresh schedules | Source map with an owner per source |
| 2 | Profile every field the decision needs: nulls, placeholders, distinct values, duplicates, schema drift | Profile report per source |
| 3 | Pull a stratified sample of about 200 records; two SMEs label 100 independently | Measured label agreement |
| 4 | Test joins across systems; check freshness; count records by segment and period | Join rate, staleness, coverage by segment |
| 5 | Score the card; write the decision memo | Build, narrow, or not yet |
Day 3 is the most important day
- Two SMEs relabel the same sample independently, so you measure label consistency directly instead of asking.
- People who own a dataset usually believe it is fine. Their agreement rate is evidence; their opinion isn't.
Why kappa, not raw agreement
Cohen's kappa (κ) = agreement corrected for what two random labellers would reach by chance:
κ = (observed agreement − chance agreement) ÷ (1 − chance agreement).
- Raw agreement overstates quality when one label dominates. Two people who mostly give the majority answer agree often without either being careful.
Worked example (illustrative, not from the source):
- Two adjusters each approve 90 of 100 claims and agree on 90 of them (observed 0.90).
- Chance agreement =
0.9 × 0.9 + 0.1 × 0.1 = 0.82. κ = (0.90 − 0.82) ÷ (1 − 0.82) ≈ 0.44.- Ninety per cent raw agreement is, here, a weak result.
The floor
- The source sets the agreement floor for an LLM judge at κ ≥ 0.60; its author applies the same floor to a pair of human labellers.
The scorecard (illustrative bands; score only the dimensions the target decision depends on)
| Dimension | Green | Amber | Red |
|---|---|---|---|
| Coverage of required fields | ≥ 90% populated | 60-90% | < 60% |
| Correctness on SME spot check | ≤ 5% wrong | 5-15% | > 15% |
| Label agreement (κ) | ≥ 0.75 | 0.60-0.75 | < 0.60 |
| Freshness versus rate of change | Within tolerance | Lagging, flaggable | Unknown or unbounded |
| Join rate across needed sources | ≥ 95% | 80-95% | < 80% |
| Access to needed sources | All live and verified | Requested, in progress | Refused or no owner |
| Segment coverage versus current traffic | All in-scope segments present | Gaps named and excludable | Main segment missing |
| Ownership and documentation | Named owner, known meaning | Owner known, meaning inferred | Nobody can say what a field means |
Thresholds flex; the decision rule doesn't
- The thresholds are assumptions to adjust for each domain.
- Red on a dimension the chosen design depends on → redesign or wait.
- Red on a dimension the design can route around → narrow the scope and say so in writing.
Where it plugs into Scoping to Deployed Agent
- That framework already allocates days 3 and 4 of delivery to data readiness.
- Its gate is
data_access_granted, signed by the customer's SME. - The scorecard raises the evidence behind that signature. Access being live is necessary, but access to data that scores red isn't readiness.
Soundbite: "Their agreement rate is evidence. Their opinion isn't."
5. Decide What to Build Anyway, or Say Not Yet
- Rule: pick a design whose weakest input is one the data can already supply.
| Design that tolerates poor data | Why it tolerates it | What it still needs |
|---|---|---|
| Retrieval over a curated subset | Uses only documents someone vouched for; ignores the rest | An owner who curates, and a freshness flag |
| LLM-assisted extraction and normalisation, with review | Turns scanned or free-text records into structured fields; review catches errors | A schema, confidence scores, reviewer time |
| Rules plus an LLM | Rules handle the clean, high-volume cases; the model handles the messy tail | Rules owned by the business, not the model |
| Human-in-the-loop labelling loop | Every reviewed item becomes a trusted label | Reviewers whose corrections are captured, not typed around |
| Weak supervision | Several cheap, noisy labelling rules vote; the votes become a training signal | A small trusted set to measure the rules against |
| Synthetic data | Covers rare cases the history lacks | Real data to validate against; never the only evaluation |
Weak supervision, explained
- Replaces hand-labelling every record with several cheap labelling rules (a keyword match, a lookup table, a model's guess).
- Each rule is unreliable on its own. Votes are combined, weighted by each rule's estimated accuracy, into a label usable at scale.
- Correlated rules (reading the same evidence) would be counted twice by a simple weighted vote, so the label model must account for correlations, as Snorkel's does.
- Tools such as Snorkel estimate the weights from where rules agree and disagree, without ground truth; a small trusted sample checks the result.
- Applied to warranty failure codes in the deep dive "Grow labels from the review queue".
Synthetic data carries the sharpest caveat
Source rule: "a small, real eval beats a synthetic one for customer-specific evaluation."
- It can fill coverage gaps, such as a failure mode that has never occurred.
- It can't tell anyone how the system performs on this customer's real records.
When to say "not yet": all three must line up
The target decision depends on a field that scores red.
No design can route around it.
No human process exists that could generate the missing truth.
Then the honest answer is a data project with a date, not an AI project with a hope.
Scoping to Deployed Agent's intake rule says the same about unmeasurable goals: "Refuse to start. A two-week clock against an unmeasurable goal is worse than no clock."
Soundbite: "Then it's a data project with a date, not an AI project with a hope."
6. Turn the Warranty Defects into Testable Requirements
- The scenario is invented by the source. Every number in steps 6 to 9 and in the evaluation deep dive is an assumption.
- About 12,000 claims a month at about 11 minutes each.
- The customer wants AI to: cut that time, and catch defect patterns earlier.
What week 1 found (source assumptions)
| Source | Defect found |
|---|---|
| Two ERP systems, merged after an acquisition | Different failure-code lists; no shared claim key; 14% of claims appear in both |
| Failure code field | 38% of claims coded "OTHER" |
| Serial number field | Missing on 27% of claims |
| Attachments | 55% of invoices and photos are scanned, with the key facts only there |
| Decisions | Outcome recorded; the reason for the outcome is not |
| Relabel of 100 claims by two adjusters | κ = 0.52 on failure code; κ = 0.81 on approve or reject |
The last row decides the design
| Label | κ | Band | Verdict |
|---|---|---|---|
| Approve or reject outcome | 0.81 | Green | Usable label |
| Failure code | 0.52 | Red against the 0.60 floor | Not ground truth: a field the project must repair |
- Any design that trains on historical failure codes would learn the disagreement.
Treat 0.52 as an estimate, not an exact value
- On 100 claims, with chance agreement across the code list of about 0.2, observed agreement is about 0.62.
- Sampling error is roughly ±0.12, so the true value could sit from about 0.40 to 0.64.
- The verdict holds, because the design adjudicates failure codes either way.
- But a result this close to the floor justifies relabelling more claims before quoting it to the customer as settled.
Functional requirements (each has a test, so "done" is checkable)
| ID | Requirement | Test |
|---|---|---|
| FR1 | Extract serial number, part, failure description and invoice amount from each claim and its attachments | Field-level precision and recall on the adjudicated set |
| FR2 | Normalise failure descriptions to one agreed code list, with a confidence | Agreement with adjudicated codes, reported with κ |
| FR3 | Link duplicate claims across the two ERPs | Match precision on a reviewed pair set |
| FR4 | Draft a recommendation with the evidence behind it | Adjuster agreement rate; every draft cites the fields it used |
| FR5 | Route low-confidence fields and all rejections to an adjuster | No claim auto-decided in phase 1 |
| FR6 | Capture every adjuster correction as a label | Corrections appear in the label store within one day |
Non-functional requirements (NFRs: how well it must work, with the why)
| NFR | Threshold | Why |
|---|---|---|
| Latency | Draft ready within 5 minutes of claim arrival | Adjusters work a queue, not a chat |
| Throughput | 12,000 claims a month, peaks of 1,500 a day | Month-end surges |
| Data boundary | Scanned documents stay in the customer's cloud region | Invoices carry customer names and prices |
| Auditability | Every draft stores inputs, model version, confidence and reviewer action | Warranty decisions get disputed |
| Quality floor | No field shown as fact below its confidence threshold | A confident wrong serial number is worse than a blank |
- The quality floor is the NFR most specific to poor data. A confident wrong serial number sends a claim to the wrong product history; a blank gets noticed and filled in.
Success metrics (targets to test, not promised results)
| Metric | Today | Target |
|---|---|---|
| Adjuster minutes per claim | 11 | 6 |
| "OTHER" codes on new claims | 38% | under 10% |
| Defect clusters reaching engineering's queue | about a quarter lag | within two weeks of the first claim |
7. Draw the Architecture as a Repair Pipeline with a Small Decision Layer
- Draw it that way round: repair first, decision layer on top.
- Most of the value in phase 1 comes from the repair half, not from the model.
One claim's path (the source's first diagram, top to bottom)
ERP-A + ERP-B + scans → ingest (hash, source, arrival) → validate (schema, required fields, placeholders, freshness)
- Reject → quarantine with reason.
- Clean or flagged → extract (schema + confidence) → normalise (codes, units, entities) → confidence ≥ field threshold?
- Yes → draft fields and evidence.
- No → adjuster review and correction.
- → adjuster decides → adjudicated label store → gold-set growth (time-stratified), per-field threshold tuning, defect clusters for engineering.
Trace the brief's claim
- Ingest records which ERP it came from and when, and hashes its content.
- Validation finds "OTHER" and the empty serial. The record is flagged, not rejected, because extraction may recover the serial from the scan. A record failing the schema outright would go to quarantine with its reason.
- Extraction reads the serial from the invoice scan with, say, 0.72 confidence (an illustrative value).
- Normalisation maps the description to the agreed code list and links the twin claim in the other ERP.
- Confidence check: the serial falls below its field threshold, so that one field goes to an adjuster.
- The adjuster corrects it in the tool and decides the claim. Both the correction and the decision land in the label store.
The full component view (the source's second diagram)
- Adds the evaluation gate and separates the three inputs: ERP-A claims, ERP-B claims, scanned invoices and photos.
- Gold-set growth (stratified, split by time) feeds an evaluation gate before any threshold change.
Components in dependency order
| Component | Job | What goes wrong without it |
|---|---|---|
| Ingest with content hash | Records source and arrival; skips unchanged records | Re-extraction cost on every sync; duplicates look new |
| Quality gates | Reject or flag records that fail schema, required fields or placeholder checks | "OTHER" and "N/A" flow downstream as real values |
| Quarantine with reason | Keeps rejected records queryable, with why | Bad records vanish; nobody fixes the source |
| Extraction | Pulls fields from scans and free text into a schema, with per-field confidence | Half the facts stay locked in attachments |
| Normalisation | Maps descriptions to one code list; matches claims across ERPs | Two code lists and 14% duplicates survive the merge |
| Confidence router | Sends only uncertain fields to people | Reviewers check everything, or nothing |
| Draft with evidence | Recommendation that cites the fields it used | An adjuster can't tell why the draft says reject |
| Review queue | Adjusters fix fields in the tool, not around it | Corrections happen in email and are lost |
| Label store | Every adjudicated field and decision, with reviewer and time | The system never gets better data than it started with |
| Gold set growth | Stratified, time-split sample of the label store, topped up with a random audit sample of auto-accepted fields | The eval set drifts toward whatever was easy |
| Threshold tuning | Per-field confidence thresholds set from measured precision | One global threshold, wrong for every field |
| Defect clustering | Groups normalised failures by part and period | The early-warning value never reaches engineering |
| Evaluation gate | Blocks threshold or prompt changes that regress on the gold set | A tuning change quietly lowers precision |
| Data contract with source owners | Agreed required fields and code list at entry | The same defects arrive again next month |
Notice how little of it is the model
- Only extraction and drafting use one. Everything else is plumbing, review and measurement.
- The label store is what the rest depend on: it feeds the gold set, the thresholds and the defect clusters, and it's the only way the system gets better data than it started with.
Soundbite: "It's a data-repair pipeline with a small decision layer on top, and the label store is the component everything else depends on."
8. Put Quality Gates at Ingestion, Not After the Model
| Where the defect is caught | What it costs |
|---|---|
| At ingestion | One rejected or flagged record |
| After the model | A wrong recommendation, an adjuster's time to spot and undo it, and some of the customer's trust |
- So the gates sit before extraction, not in an output guardrail at the end.
Quarantine, never default
Rule from Enterprise Knowledge Assistant's ingestion pipeline: "An unmappable document is quarantined, not defaulted to internal."
- Defaulting is how a hidden defect gets indexed and then served as fact.
- For a claim: a placeholder serial number is flagged as missing, never assigned a guessed value.
Keep the evidence queryable
- That pipeline records
last_synced_atper source and every rejected document with its reason, queryable after the job exits. - That's the quarantine box in step 7. A log line disappears; a queryable quarantine table becomes evidence.
Content hashing belongs here too
- The pipeline hashes each document's text and skips re-embedding anything unchanged.
- In the claims design, the hash stops re-extraction of unchanged scanned invoices. Extraction is the most expensive step, so it saves cost and stops exact re-sends looking like new records.
- Limit: it catches only byte-identical content. A rescan, or the same claim entered in both ERPs under different claim numbers, hashes differently. Those duplicates are cross-ERP matching's job in normalisation.
Repair at source with a data contract
- Pipeline repair treats the symptom; source repair treats the cause.
- The FDE (Forward Deployed Engineer) cross-team case: software teams wanted speed; data and AI teams needed stable, high-quality data. "Data contracts turned an ownership argument into an interface agreement."
- In this design the contract: makes serial number required at entry and fixes one failure-code list across both ERPs.
- The quarantine report is the evidence the contract is needed: it shows the source owner how many records their form produced that the pipeline couldn't use.
Soundbite: "An unmappable record is quarantined, not defaulted. A queryable quarantine table becomes evidence."
9. Tell the Customer Their Data Is Poor
- The hardest part of this case is a conversation, not a component.
- The person told is often the person responsible for the data.
Lead with measurements, not adjectives
| Say | Effect |
|---|---|
| "Your data is messy." | Invites a defence |
| "38% of claims are coded OTHER, and on the failure code your adjusters reach only about half of the agreement possible beyond chance (κ = 0.52)." | Invites a plan |
- Say it that way: κ = 0.52 doesn't mean they agree half the time.
- The scorecard exists partly to make this conversation factual.
Frame phase 0 as value, not delay
- The readiness week already produces:
- Where the claim backlog is duplicated across the two ERPs.
- A measured estimate of adjuster time spent hunting for facts in scans.
- An agreed code list the business needed anyway.
- A data contract that stops "OTHER" at entry improves every report the customer runs, with or without AI.
Offer a narrow first win alongside the repair
- Extracting serial numbers and invoice amounts from scans is useful on day one and needs no historical labels.
- It shortens every claim while the failure-code work matures.
- The customer sees progress on the same dashboard where the data problems are tracked.
Name what won't be promised (written non-goals)
- No automatic decisions in the first release.
- No defect prediction for product lines with under two quarters of history.
- Why write them down: they protect the relationship when the pressure to overpromise arrives.
Soundbite: "38% of claims are coded OTHER. That's a measurement, and it comes with a plan."
10. Phase the Work So Data Fixes Ship as Value
- Phases follow the readiness scores, not a generic timeline.
- Each exits on a measured condition (Scoping to Deployed Agent's gates), so moving forward is a check, not a calendar date.
| Phase | Weeks | Ships | Exit condition |
|---|---|---|---|
| 0 Readiness | 1 | Scorecard, decision memo, quarantine report, draft data contract | Customer signs the scope and the non-goals |
| 1 Extract | 2-5 | Field extraction from scans with confidence; review queue; label store | Field precision ≥ 95% above threshold on the seed set |
| 2 Normalise | 6-9 | Unified code list, cross-ERP matching, weak-supervision labels | κ between the system and adjudicated codes ≥ 0.70 |
| 3 Draft | 10-13 | Recommendation drafts with evidence, in shadow mode | Adjuster agreement ≥ 85%, also reported as κ and per outcome; minutes per claim measurably down |
| 4 Assist | 14+ | Drafts shown live; defect clusters to engineering | Step 6 success metrics trending to target |
Read the exit conditions as a ladder of trust
- Phase 1: extraction must be precise before anything uses its output.
- Phase 2: system codes agree with adjudicated codes at κ ≥ 0.70, where two adjusters reached only 0.52 with each other.
- Phase 3: drafts agree with adjusters before any adjuster sees one live.
The raw-agreement trap again
- If most claims are approved, a draft that always says approve clears 85%.
- So report κ and the agreement on rejections and requests for more information alongside it.
Shadow mode = the system runs on real traffic and records what it would recommend, but takes no action, while people compare its output with their own decisions. Its first real action is never also the first time nobody is watching.
The data contract runs in parallel with every phase
- Its effect shows as a falling quarantine rate and a falling "OTHER" rate on new claims.
- Both sit on the same dashboard as model quality, so an apparent model improvement can't hide a deterioration upstream.
Quick Recall: Lines to Say in the Interview
- "I would not begin with model selection. I would first determine whether the available data can support a measurable workflow improvement."
- "And I will measure the data before I trust it."
- "Some AI projects are a missing dropdown on an entry form."
- "Inconsistent labels are worse than missing ones, because they look like ground truth."
- "Day 3: two SMEs relabel the same sample, and I score it with kappa, not raw agreement."
- "Outcomes agree at 0.81, so they're a label. Failure codes agree at 0.52, so they're a field to repair."
- "Quarantine, never default. The quarantine report is the evidence for the data contract."
- "Phase 0 is value the customer keeps without AI."
- "Each phase exits on a measured condition, with shadow mode before any live draft."
Technical deep dives
What this part covers: turning review time into trusted labels, building an honest eval set before the labels are clean, naming the failure modes first, and answering the cost pivot.
30-Second Cheat Sheet
- The review queue is a label factory, but only with three rules: fix in the tool, record who and when, adjudicate disagreements.
- Routing biases the labels. Audit a random slice of high-confidence fields and keep some review blind.
- Dedup, then split by time and user, never at random. "Approved and not disputed" is a weak label, not a gold one.
- Weak supervision on failure codes (κ = 0.52): three rules vote; disagreement routes the claim to people.
- Seed the eval set from week 1's 100 adjudicated claims, and size it honestly: n ≈ 15.7 × p(1−p) ÷ δ².
- 100 claims detect only about 16-point changes; 200 detect about 11. Report per stratum, include "insufficient data" cases.
- Ten failure modes, mostly from trusting data or labels more than week 1 justifies.
- Cost driver = expert time, not tokens. Measure → route → bound → cache.
1. Grow Labels from the Review Queue
- Poor labels are a starting condition, not a permanent one.
- The review queue turns adjuster time into trusted labels, only if designed that way from day one.
Three rules that make a correction usable as a label
- In the tool, on the field, with the original value kept. A fix made directly in the ERP leaves no trace the system can learn from.
- Record who made it and when. Labels from a reviewer with low agreement can be weighted down.
- Adjudicate disagreements, not "whoever clicked last".
Adjudication = a designated expert, or a defined process, settles the conflict and records why.
Two biases that routing creates
| Bias | Cause | Fix |
|---|---|---|
| No evidence above the threshold | Only low-confidence fields reach reviewers, so the label store says little about fields accepted automatically | Send a small random sample of high-confidence fields to review too, or threshold tuning has nothing to go on |
| Anchoring | Once drafts go live in phase 4, a reviewer who sees the draft is anchored by it | Keep a slice of claims reviewed blind if those labels will feed evaluation |
General dataset hygiene, unchanged
- Deduplicate first. In the source's words, "100,000 raw traces might be a few thousand distinct problems".
- Ten copies of one easy claim make a dataset look ten times larger and easier than it is.
- Split held-out cases by time and by user, never at random, so near-identical records can't sit on both sides.
- Route low-agreement, high-impact cases to human adjudication.
The trap in automatic labels
- "User didn't complain" isn't "correct".
- For claims, "approved and not disputed" is a weak label, not a gold one: a wrongly approved claim the customer was happy with will never be disputed.
Weak supervision on the failure-code field (where κ was 0.52)
| Labelling rule | Reads |
|---|---|
| Keyword map | Description → code |
| Part history | The part's historically most common failure |
| Extraction model's guess | The failure description |
- Score each rule's votes against the adjudicated sample to estimate its accuracy.
- Discount correlated agreement: the keyword map and the extraction model both read the same failure description, so their agreement is weaker evidence than two independent rules agreeing. Weight it accordingly.
- Rules agree with high confidence → the combined label is used for training.
- Rules disagree → the claim goes to the review queue.
- The disagreement itself tells the system where people are needed, so expert time goes to the genuinely ambiguous claims.
Synthetic claims: one gap only
- Rare failure modes the history lacks, such as a new pump model with no claims yet.
- Tagged as synthetic in the label store and excluded from any headline metric.
Soundbite: "Rule disagreement is a routing signal. It sends expert time to the claims that are actually ambiguous."
2. Build the Eval Set Before the Labels Are Clean
- An eval set can't wait for clean labels, because clean labels are what the project produces.
- Build a small, trusted set first and grow it from the label store.
Three ways to seed one (the source's)
| Seed method | How |
|---|---|
| Mine existing records | Support tickets or an existing FAQ for real questions with known answers |
| Power users | "ask 3-4 of their power users for 10 questions each" |
| Combined | Sample production traffic, expert labelling, weak supervision and carefully used synthetic examples, plus measuring grader agreement and human review of difficult cases |
- For claims, the seed is already in hand: the 100 claims relabelled in week 1, adjudicated where the two adjusters disagreed.
Size the set honestly
Rule of thumb for comparing two success rates:
n ≈ 15.7 × p(1−p) ÷ δ²cases per arm, wherepis the success rate andδthe difference to detect. 15.7 comes from the usual 5% false-alarm rate and 80% chance of detecting a real difference.
| Case | Arithmetic | Result |
|---|---|---|
| Detect a 5-point gain at p = 0.8 (δ = 0.05) | 15.7 × 0.16 ÷ 0.0025 |
≈ 1,000 cases per arm |
| 200-case suite | δ ≈ √(15.7 × 0.16 ÷ 200) ≈ 0.11 |
Can't reliably detect less than about 11 points |
| 100-claim seed (this casebook's calculation, not the source's) | Same arithmetic | About 16 points |
- So a 100-claim seed gates only large changes. Say so out loud.
- Detect smaller changes through paired evaluation (both versions on the same cases, so case-to-case variation cancels) or through production metrics.
Stratify the set and report each stratum
| Source's general strata | Claims version |
|---|---|
| Intent | ERP source |
| Tenant size | Product line |
| Data recency | Attachment type |
| Difficulty | Period |
- Aggregate accuracy hides a collapse on scanned claims from the acquired ERP, exactly where the data is worst.
Include "insufficient data" at a realistic rate
- A system never shown a claim that should be returned for more information learns to always decide.
- The source makes the same point about refusal and escalation cases in general.
Watch the eval labels as closely as the system
- The enterprise RAG golden set's first war story was a label defect, not a system defect.
- A document was reported as leaked to an account manager who was in fact permitted to read it; it was merely irrelevant.
- The fix:
- Split the label into two fields: forbidden access (gates the release) and relevance (only tracked).
- Add a test that stops the labels drifting again.
- Lesson for claims: a false alarm from a bad label costs as much trust as a real failure.
Ship the set with a datasheet
- Contents: collection window, filters, deduplication method, split strategy, label source, known biases.
- By one estimate in the source, an hour of documentation saves weeks of debugging six months later.
- Why: without it, nobody can tell whether a quality change came from the model, a different sample or an altered label guide.
Soundbite: "A 100-claim seed set gates only large changes, about 16 points. Smaller ones need paired evaluation or production metrics."
3. Name the Failure Modes Before the Interviewer Does
- Most failures here come from trusting data or labels more than the week-1 numbers justify.
| Failure | How it shows up | Defence in the design |
|---|---|---|
| Training on inconsistent historical labels | High offline accuracy, lower production accuracy | Adjudicated relabel; the 94% → ~78% routing case as the warning |
| Random train and test split on repeated records | Offline numbers inflated by near-twins | Deduplicate; split by time and user |
| Defaulting a missing value | A guessed serial number presented as fact | Quarantine or flag; never default |
| Review done outside the tool | Corrections lost; labels never improve | Corrections only through the review queue |
| Automation bias in reviewers | Adjusters accept drafts they should question | Track agreement on seeded known-wrong drafts |
| Segment collapse | Good average, bad on scanned claims from one ERP | Per-stratum reporting in the gate |
| Schema drift at source | A new form version breaks extraction silently | Quality gates on schema; quarantine spikes alert |
| Synthetic data inflating metrics | Headline accuracy rises with no production change | Synthetic cases tagged and excluded from headline metrics |
| Upstream never fixed | The pipeline patches the same defects forever | Data contract with a named owner and a quarantine report |
| Scope creep into auto-decisions | Pressure to approve claims without review | Written non-goal; approval only after the phase 3 gate |
Two rows that need a note
Automation bias = reviewers accepting a machine's draft they should question, especially when it's usually right.
- Defence: seed the queue with known-wrong drafts and track how often adjusters catch them.
- A falling catch rate means review has become rubber-stamping.
Schema drift = a source changing its format, such as a new claim-form version that moves the serial number.
- Without a schema gate, it breaks extraction silently.
- With one, it shows up as a spike in quarantine.
Soundbite: "A falling catch rate on seeded wrong drafts means review has become rubber-stamping."
4. Answer the Cost Pivot
- The question: "what does all this review and relabelling cost, and how do you stop it growing?"
- The source has no playbook drill for this case, so its cost card is a self-drill.
| Card item | Answer |
|---|---|
| Dominant driver | Human time: SME relabelling and adjuster review; then extraction calls on scanned pages |
| Cheapest lever first | Route only low-confidence fields to review; hash content so unchanged scans are never re-extracted; label a stratified sample, not the backlog |
| Metric that proves it | Cost per correctly processed claim, including reviewer minutes; review rate per field; re-extraction rate |
| Do not | Label the entire history before shipping anything, or send every page to the largest model |
| 60-second line | The expensive resource here is expert time, not tokens. Spend it only where confidence is low, turn every minute of it into a reusable label, and never pay twice to extract the same page. |
The four verbs, in order (the source's cost playbook)
- Measure cost per correctly processed claim, including reviewer minutes. Token cost alone misses the dominant driver.
- Route easy fields to a cheap extractor and uncertain ones to people.
- Bound the review queue with per-field thresholds tuned from measured precision.
- Cache safely by content hash, so a re-sync never re-extracts an unchanged scan.
Will review cost fall on its own?
- The source's author expects it to, as labels accumulate and thresholds are set from measured precision rather than caution.
- Treat that as a prediction to verify on the dashboard, not a guarantee.
- It's the economic argument for building the label store in phase 1 rather than later: every reviewed field makes the next threshold better informed.
Spoken answer (60-second line): "The expensive resource here is expert time, not tokens. Spend it only where confidence is low, turn every minute of it into a reusable label, and never pay twice to extract the same page."
5. Sources and Provenance
What's assumed, reported or added
| Item | Status |
|---|---|
| Warranty scenario, scorecard thresholds, phase timings and gates | Explicit source assumptions |
| The routing case and the golden-set war story | Source-reported incidents |
| The kappa example, the illustrative extraction confidence, the 100-claim sample-size figure | Added by the casebook, labelled where they appear |
- This casebook adapts a constructed interview answer.
Related cases (cross-reference, not repetition)
| Case | What it covers |
|---|---|
| Scoping to Deployed Agent | Delivery gates, the data_access_granted gate and intake refusal |
| Evaluation and Release Gating | The release gate |
| Enterprise Knowledge Assistant | Messy enterprise documents, quarantine and permission normalisation |
| NL Over Governed Data | Governed metric definitions |
| Decomposition Classics | The bank-fraud case built on inconsistent labels |
Fact-check sources (checked by the source on 27 September 2026)
| Source | What it supports |
|---|---|
| Snorkel: Rapid Training Data Creation with Weak Supervision (Ratner et al., 2017) | Labelling functions vote, and their accuracies are estimated without ground truth |
| Cohen (1960), A Coefficient of Agreement for Nominal Scales | Kappa as agreement corrected for chance |
Quick Recall: Lines to Say in the Interview
- "A correction counts as a label only if it's made in the tool, records who and when, and disagreements are adjudicated."
- "Only low-confidence fields reach reviewers, so I audit a random slice of the confident ones too."
- "Approved and not disputed is a weak label, not a gold one."
- "Dedup first, then split by time and user, never at random."
- "n is about 15.7 times p(1−p) over delta squared: 1,000 per arm for 5 points at 80%."
- "A 200-case suite can't see anything smaller than about 11 points."
- "Aggregate accuracy hides a collapse on scanned claims from the acquired ERP."
- "The expensive resource here is expert time, not tokens."
Quick review
One sentence: measure what is wrong with the data first, build what it can already support, and turn every review minute into a trusted label.
30-Second Cheat Sheet
- Model last: first test whether the data can support a measurable improvement.
- Eight failure types, each with a week-one measurement. Inconsistent labels are the most dangerous.
- One-week readiness: day 3's two-SME relabel, scored with κ (floor 0.60, green from 0.75).
- Outcomes κ = 0.81 (usable label); failure codes κ = 0.52 (field to repair).
- Repair pipeline + small decision layer. Gates quarantine, never default.
- Review queue = label factory. Eval set small, trusted, sized honestly, reported per stratum.
- Phase gates: precision ≥ 95%, κ ≥ 0.70, agreement ≥ 85% in shadow.
- Cost = expert time, not tokens.
1. Decisions to Recall
- Start by testing whether the data can support a measurable improvement, not by picking a model.
- Clarifying questions find which data defects touch the decision being improved, and whether a rules or form fix is enough.
- "Poor" splits into eight failure types, each with its own week-one measurement and remedy.
- Inconsistent labels are the most dangerous, because they look like ground truth.
- A one-week readiness assessment produces a scorecard and a build, narrow or not-yet decision.
- Day 3's two-SME relabel, scored with kappa, is the key measurement.
- Some designs tolerate poor data. Say "not yet" only when a red field blocks every route and no human process can supply the truth.
- The worked warranty example turns measured defects into testable requirements.
- The architecture is a data-repair pipeline with a small decision layer on top.
- Quality gates at ingestion quarantine bad records instead of defaulting them, and data contracts fix defects at source.
- The review queue is a label factory, with corrections in the tool, deduplication, time splits and adjudication.
- The eval set starts small and trusted, is sized honestly and is reported per stratum.
- Tell the customer with measurements, and frame phase 0 as value.
- Phases exit on measured conditions, with shadow mode before any live decision.
- Most failure modes come from trusting data or labels more than the numbers justify.
- The forty-five minutes front-load diagnosis, and the spoken answer ends on shadow mode.
- The dominant cost is expert time, so spend it only where confidence is low and keep every correction.
2. Numbers to Recall
All warranty figures are source assumptions for the worked example.
| Item | Value |
|---|---|
| Scenario | 12,000 claims a month, peaks of 1,500 a day, 11 adjuster minutes per claim |
| Week-1 defects | 14% of claims in both ERPs, 38% coded "OTHER", 27% missing serial number, 55% of invoices and photos scanned |
| Agreement | κ = 0.81 on outcomes (usable label), κ = 0.52 on failure codes (not ground truth); floor 0.60, green from 0.75 |
| Targets | 11 to 6 minutes per claim, "OTHER" under 10% on new claims, defect clusters to engineering within two weeks instead of about a quarter |
| Gates | Field precision ≥ 95% (phase 1), system-versus-adjudicated κ ≥ 0.70 (phase 2), adjuster agreement ≥ 85% in shadow (phase 3) |
| Sample size at p = 0.8 | About 1,000 cases per arm for a 5-point gain; 200 cases detect only about 11 points |
| Routing warning | 94% offline against an 81% baseline, about 78% in production; about 83% after dedup, time split and adjudicated relabel |
Flashcard Drill
Quick Recall: Lines to Say in the Interview
- "I would not begin with model selection. I would first determine whether the available data can support a measurable workflow improvement."
- "Poor splits into eight failure types, and inconsistent labels are the worst because they look like ground truth."
- "Outcomes agree at 0.81, failure codes at 0.52, against a 0.60 floor."
- "Not yet only when a red field blocks every route and no human process can supply the truth."
- "Quarantine, never default, and fix it at source with a data contract."
- "The review queue is a label factory."
- "1,000 cases per arm for a 5-point gain; 200 cases see only about 11 points."
- "Shadow mode before any live draft, and 85% agreement isn't enough without kappa."
- "The expensive resource is expert time, not tokens."
Where next
- Revise the concepts