
When Should AI Treat Two Customer Records as One?
A practical guide to matching customer records with explicit evidence, review thresholds, cluster checks, and reversible links instead of destructive merges.
Read MoreZharfAI Team

A packaging team receives 1,089 AI alerts in a day. Reviewers confirm only 90 defects. Yet the detector meets its advertised test condition: it catches 90% of defective packages and incorrectly flags just 1% of good ones. Nobody needs to have falsified the metrics for this to happen. Defects are rare, while good packages are numerous.
These are constructed numbers, not a customer incident or a ZharfAI model benchmark. They expose a decision that operations owners and machine-learning teams must make before activating a queue: does this threshold find enough relevant cases without creating more review work than the process can handle? A low error percentage cannot answer that question without its denominator.
This guide uses cosmetic packaging defects, not safety-critical inspection. Decisions about medical treatment, financial access or dangerous equipment require domain-specific safeguards beyond the arithmetic here.
An alert is a proposed positive classification. A true positive is an alerted item that really has the target condition; a false positive is an alerted item that does not. False negatives are missed cases. True negatives are correctly unflagged items. Google's classification guide distinguishes the corresponding metrics and explains why accuracy can mislead on imbalanced data. Google's metric definitions.
Keep three questions separate:
The complement of precision is the fraction of alerts that are false. It is not the false-positive rate. “Only 1% false positives” is therefore an incomplete operational claim until the speaker identifies which denominator they mean.
Also fix the counting unit. One package photographed five times is not automatically five independent inspection opportunities. Decide whether the evaluation counts packages, images or defect episodes, then measure queue demand using the units reviewers actually receive. Duplicate suppression changes that demand and belongs inside the evaluated workflow.
Suppose the eligible daily population is 100,000 packages and 100 have the target cosmetic defect: prevalence is 0.1%. At 90% recall, the model finds 90 and misses 10. At a 1% false-positive rate, it incorrectly flags 999 of the 99,900 good packages.
That produces 1,089 alerts, of which 90 are correct. Precision is about 8.3%; roughly 91.7% of alerts are false. Overall accuracy is still 98.991%, because 98,901 good packages were correctly left alone. A detector that always said “good” would achieve 99.9% accuracy here while finding no defects. Neither headline settles usefulness.
For prevalence p, recall r and false-positive rate f, the expected precision at that operating point is:
precision = (p × r) / [(p × r) + ((1 − p) × f)]
alerts = population × [(p × r) + ((1 − p) × f)]
Now change only the assumed prevalence to 1%. With the same conditional rates, there are 900 true alerts and 990 false alerts: precision rises to about 47.6%, and total alerts rise to 1,890. A higher share of useful alerts does not necessarily mean a smaller queue.
Holding the rates constant is a sensitivity calculation, not a prediction that a deployed model will behave identically in a different population. New suppliers, cameras or defect types can change recall and false-positive rate as well as prevalence.
Consider a second, stricter threshold on the original 100,000-package population. Assume it produces 70 true alerts and 100 false alerts, missing 30 defects. These counts are hypothetical, not measured evidence that any particular model offers this tradeoff.
| Daily result | Initial threshold | Stricter threshold |
|---|---|---|
| Defects found | 90 | 70 |
| Defects missed | 10 | 30 |
| Good packages incorrectly flagged | 999 | 100 |
| Total alerts | 1,089 | 170 |
| Share of alerts that are correct | 8.3% | 41.2% |
| Review time at four minutes per alert | 72.6 hours | 11.3 hours |
If the available review capacity is 200 packages per day, only the second threshold fits. But if the owner also permits at most 20 missed defects in this population, neither option satisfies both conditions. The right answer is not to select the quieter queue and hide the additional misses.
Options include improving the detector, changing the inspection process, adding justified capacity, or restricting eligibility to a population for which both constraints can be demonstrated. Report what the restricted system excludes; a successful narrow evaluation does not establish coverage of the original workload.
The four-minute assumption excludes interruptions, difficult cases and escalation. Measure those separately before turning reviewer-hours into staffing commitments. A review queue is not a costless fallback; our guide to AI abstention and risk–coverage tradeoffs addresses that broader decision.
Teams often collect extra positive examples because defects are difficult to find. That can be useful for learning their appearance. It does not make a fifty-fifty evaluation set representative of a line where one package in a thousand is defective.
Google discusses downsampling and weighting as training techniques for imbalanced datasets. Training design and the population used to estimate operational performance are separate choices. Google's imbalanced-data guidance.
In the artificial fifty-fifty population, the same 90% recall and 1% false-positive rate imply approximately 98.9% precision. Reporting that figure as the expected production alert yield would substitute the evaluation's base rate for the factory's. The calculation is correct for the constructed population and misleading for the deployment claim.
Retain a representative evaluation sample, or use a documented sampling design with appropriate population weights. Keep an enriched set for difficult-case testing if useful, but label it as such. A stress test can reveal a failure mode without estimating how frequently the failure occurs in normal traffic.
Saito and Rehmsmeier's 2015 study explains why precision–recall plots can be more informative for imbalanced classification than a receiver operating characteristic, or ROC, plot alone. Its examples concern evaluation methodology, not today's packaging models. Original PLOS ONE paper.
A ROC curve compares recall with false-positive rate. A precision–recall curve makes the positive yield of the alert set visible, and depends on the class mixture. ROC analysis is not invalid; an impressive overall ROC area simply does not specify the volume and usefulness of alerts at your chosen threshold.
For procurement or launch review, request the confusion counts at candidate operating points, the evaluation population and the score distribution—not just one aggregate curve area. Compare systems on the same eligible cases and outcome definition. A gain obtained by testing on an easier population is not evidence of a better detector.
Precision alone is also easy to improve by issuing almost no alerts. Always read it beside recall, missed-case counts and coverage of the intended population. A silent system can have a tidy queue and fail its purpose.
Reviewing every alert can reveal alert precision once outcomes are reliable. It does not reveal recall, because missed defects live among the unflagged packages. Treating every unreviewed item as good would manufacture reassuring labels.
ZharfAI's proposed evaluation record has a stable item identifier, eligibility reason, model and threshold versions, score, alert decision, review outcome, outcome date and sampling probability where applicable. Preserve an explicit “unknown” outcome until evidence arrives. Do not convert an unfinished review into a negative example.
Sample non-alerts using a declared method, including score ranges below the threshold and relevant production groups. Oversampling suspicious cases can improve diagnostic efficiency, but estimates of population totals must account for that sampling. Otherwise the enriched sample creates another base-rate distortion.
Agree on the defect definition before labeling. Review a subset independently to expose disagreement, and record genuinely ambiguous cases. If reviewers know the model score, note that influence; where practical, obtain initial labels without displaying it. These are proposed controls, not a claim that ZharfAI has run such an inspection study.
Ninety detections out of one hundred known defects gives a recall estimate of 90%. Under an independent binomial-sampling model, a 95% Wilson interval is approximately 82.6% to 94.5%. That range is much more informative than treating “90%” as an exact property of the deployed system. NIST describes Wilson and exact methods for confidence intervals on proportions. NIST/SEMATECH handbook.
The example interval is an arithmetic illustration, not a production guarantee. Repeated photographs of one defect, correlated batches and a hand-picked challenge set do not automatically satisfy the sampling assumptions. Plan uncertainty analysis around the actual sampling unit and use appropriate statistical expertise for grouped or weighted data.
Report denominators with intervals. Zero observed false positives in a small negative sample does not establish a zero false-positive rate. And an overall acceptable estimate can conceal a weak camera, supplier or shift. Inspect important groups without pretending that a handful of observations supports precise group-level conclusions.
Calibration asks whether predicted probabilities agree with observed frequencies in the relevant data. It is different from ranking cases well. Scikit-learn's calibration documentation describes reliability diagrams and the care needed when fitting a calibrator. Probability calibration documentation.
For this workflow, a score labeled 0.8 should not be read as an 80% defect probability without calibration evidence for the eligible population. A language model's verbal confidence is not such evidence either. Even a calibrated probability does not decide whether the expected benefit of review justifies its cost or whether the queue has capacity.
Scikit-learn separately documents threshold tuning and warns against training the classifier and tuning its threshold on the same data. Changing a threshold changes the decision rule, not the underlying ranking. Decision-threshold documentation.
Choose candidate thresholds using suitable validation data and a declared objective, then assess the selected rule on untouched evaluation data. Repeatedly adjusting the threshold after seeing the final test results turns that test into tuning data. Our benchmark exposure-control guide explains the wider problem of reusing evidence after decisions have adapted to it.
The release record should identify the target condition, eligible population, counting unit, expected daily volume, prevalence estimate, candidate thresholds and outcome-labeling method. Attach confusion counts, uncertainty, review-time measurements and the owner-approved tolerance for misses. Include what happens to overflow and to cases whose outcomes remain unknown.
Use that record to make one explicit decision:
A fixed top-200 review limit is a different policy from a fixed score threshold. Its effective cutoff changes with each day's score distribution, and relevant cases below the daily cutoff still count as misses. Evaluate that policy directly rather than describing overflow as if the detector never produced it.
Monitor eligible volume, alerts, completed reviews, backlog age, confirmed precision after outcomes mature, and recall estimated through the non-alert sampling program. Preserve the delay between an alert and its reliable outcome so recent incomplete cohorts do not look artificially good or bad.
When alert yield changes, separate a change in prevalence from a change in conditional error rates, eligibility or labeling practice. Those possibilities imply different remedies. Our post-deployment monitoring guide develops that change-attribution problem.
Reassess after changes to suppliers, cameras, product mix, review policy or model version. Do not automatically raise the threshold whenever the queue grows: that can conceal a real increase in defects. The accountable owner needs the missed-case tradeoff as well as the workload reduction.
The useful launch question is therefore not “is the false-positive rate low?” It is “in this population, at this threshold, how many useful alerts, false alerts and missed cases should we expect—and can we act on them?” The denominator connects model evaluation to the work people actually have to do.
The packaging scenarios, calculations and operating recommendations are ZharfAI analysis. No detector, customer dataset or production review team was benchmarked for this article.

A practical guide to matching customer records with explicit evidence, review thresholds, cluster checks, and reversible links instead of destructive merges.
Read More
A field guide for tracing who or what saw an AI test, separating practice from decision evidence, and accepting, qualifying, rerunning, or retiring a score.
Read More
Turn agent loops, graph orchestration, scoped retries, evidence gates, and human approval into one testable production architecture.
Read MoreIf this note maps to a real system in your organisation, start with the services page or a shipped case study.