AI System DesignData and Feature InfrastructureModule 12 — Advanced data architecture
Reconciling Conflicting Numerical Source Data Before AI Prediction
Question 41 of 47 · Updated
On this page
- 1. Begin with the quantity and the decision, not the source name
- 2. Architecture: a separate reconciliation data product
- 3. Define a numerical fact contract
- 4. Normalize units and semantics without losing evidence
- 5. Temporal alignment and correction eligibility
- 6. Deterministic authority and tolerance policies
- 7. Statistical reconciliation when the quantity is genuinely uncertain
- 8. Reconcile numerical hierarchies and conservation constraints
- 9. Adjudication and immutable publication
- 10. Tested implementation: deterministic numerical reconciliation
- 11. Downstream prediction eligibility and sensitivity
- 12. Scaling and reliability
- 13. Evaluation, observability and recovery
- 14. Production test matrix
- 15. Interview-ready answer
- References and research transparency
Reconcile what a number means before deciding what value to use. Represent each observation as a typed, versioned claim with an entity, measurement definition, unit, scope, time, source authority and uncertainty. Align comparable claims, select exact authoritative facts using explicit precedence, and fuse noisy measurements only when a validated statistical model permits it. Check domain invariants and preserve conflicts as first-class results. Publish an immutable reconciled evidence bundle and admit it to a prediction only if the model's input contract and the intended decision's evidence requirements are satisfied. Never average incompatible authoritative numbers merely to make an input available.
How would you reconcile conflicting numerical data from multiple authoritative sources before making AI predictions?
ASD-092 | Module 12 — Advanced data architecture | Learning order 28. ASD-091 establishes identity across CRM, catalog and transaction systems; here identity is assumed resolved and the challenge is conflicting numerical facts associated with that identity. ASD-010 reconciles predictions generated from different feature snapshots, ASD-084 combines temporally valid estimates in a decision dashboard, and ASD-087 arbitrates competing model outputs. The existing RAG lessons on conflicting documents and financial reporting periods cover source applicability and typed temporal operands for generated answers. The multi-agent conflict lesson covers conflicting agent claims. This lesson concerns the pre-inference numerical data product: measurement semantics and uncertainty, authoritative reconciliation, constraint-based estimation, correction lineage and admission of an exact reconciled input to a model. All quantities, companies, policies and performance assumptions below are illustrative. The Python fixture was genuinely executed locally; no measured production or model performance is claimed.
1. Begin with the quantity and the decision, not the source name#
Imagine a demand-prediction system for a warehouse. The warehouse management system reports 100 kg of stock in bin 7, its analytics replica reports 100,500 g, and the enterprise system reports 105 kg. All three are legitimate organizational systems. But the enterprise amount includes stock in transit, the replica is derived from the same source ledger, and the warehouse amount is the approved operational physical-stock definition at a particular instant. The disagreement does not imply that one database is globally wrong.
Ask what the predicted outcome requires. A depletion forecast might consume physical on-hand inventory and expected inbound receipts as separate features. An accounting model may require booked inventory under a specified valuation policy. A stock-transfer action needs current authoritative state and independent capacity and authorization checks. A useful numerical estimate does not authorize the action.
| Claim | Meaning | Disposition |
|---|---|---|
| 100 kg physical stock | On-hand mass at defined instant | Eligible for physical mass reconciliation |
| 100,500 g physical stock | Same bin, same instant, same definition | Convert to 100.5 kg and compare |
| 105 kg including in-transit goods | Different inventory concept | Retain as distinct feature; do not average |
| 99 kg physical stock yesterday | Different effective instant | Historical fact; not a contemporaneous conflict |
| 100 kg after later correction | Same target, different knowledge cutoff | New revision; preserve earlier as-known value |
Distinguish five common situations: incompatible claims, legitimately different views, authoritative corrections, noisy estimates of one latent quantity, and genuine unresolved conflicts. For incompatible claims fix the definition or join; for corrections select the permitted revision; for noisy measurements apply an approved measurement model; for unresolved facts escalate or abstain.
A system of record is authoritative for particular facts under particular conditions, not for every field it contains. A financial ledger may be authoritative for posted amounts but not physical shelf counts. A calibrated instrument may be authoritative for a measured quantity but not for the commercial ownership of the material. Record this in the authority registry rather than ranking entire databases by reputation.
2. Architecture: a separate reconciliation data product#
Source adapters preserve native occurrences and definitions under ASD-009's ingestion architecture. The reconciliation layer is responsible for claim compatibility and the resolution method; the source owner remains authoritative for the original fact. The authority/policy owner governs field-level precedence and permissible tolerances. The measurement specialist approves uncertainty and fusion models. The model owner determines eligible evidence states for training and inference. A separate domain owner governs consequential decisions.
Use a durable raw/typed fact ledger rather than mutable last-value columns. A canonical reconciliation record references all relevant selected and rejected claim identities and policy versions. Materialize a fast current projection for hot prediction paths. Heavy multivariate estimation or manual review can happen off the critical path; strict model consumers must hold or use an independently validated degraded profile until an eligible input exists. This is a logical architecture; it may initially be implemented with a transactional database, batch workers and a feature assembly service.
3. Define a numerical fact contract#
A fact key identifies a specific quantity of a specific entity under a specific definition. It is more than a metric name.
| Contract dimension | Necessary information |
|---|---|
| Identity | Trusted tenant, entity type, resolved entity ID and mapping revision |
| Quantity | Metric ID, definition version, physical dimension or accounting meaning |
| Scope | Location, product variant, segment, inclusion/exclusion basis, aggregation granularity |
| Time | Instant or interval, endpoint convention, effective time, observation/availability/recorded times |
| Representation | Unit, scale, currency, precision, decimal/float encoding, missingness |
| Source | Source identity, native occurrence and revision, authority scope, status |
| Measurement | Method, calibration release, resolution, uncertainty and dependence group when known |
| Provenance | Original artifact, normalization and derivation releases, approval and correction chain |
| Eligibility | Validity, coverage, access/purpose and withdrawal status |
Illustrative source fact:
JSON{ "fact_id": "wh-bin7-r3", "scope": "tenant-a/bin-7", "metric": "physical_mass_on_hand/v1", "period_type": "instant", "effective_at": "2026-01-15T10:00:00Z", "available_at": "2026-01-15T10:00:04Z", "source": "warehouse", "source_revision": 3, "value": "100.000", "unit": "kg", "coverage_ref": "bin7-verified-inventory-cut", "measurement_method": "approved-warehouse-measurement", "authority_policy": "inventory-authority/v4", "derivation_group": "warehouse-ledger-7", "raw_ref": "restricted-source-artifact", "status": "approved" }
The same entity can have multiple valid quantities. Preserve dimensions and basis separately from their human-friendly names. A quantity with an absent unit, unspecified time window or unknown scope is not ready for generic reconciliation. Do not infer units from value magnitude alone; 100 might be dollars, cents, kilograms or units.
4. Normalize units and semantics without losing evidence#
Convert to a canonical unit only after verifying dimensional compatibility and source definition. Mass in grams and kilograms is a scale conversion. Temperature in Celsius and Fahrenheit is an affine conversion; converting uncertainty or a temperature difference is not the same as converting the absolute temperature. A currency conversion requires the approved rate source, rate date, quotation direction, currency and rounding convention. Converting a gross monetary amount to net requires the relevant components and accounting definitions, not a scalar unit conversion.
Use a quantity registry with exact approved mappings, conversion functions, precision and domain constraints. Preserve original value/unit alongside normalized value and conversion provenance. For monetary and exact accounting facts use appropriately bounded decimal or integer-minor-unit arithmetic and explicitly specified rounding. For physical measurements and scientific numerical work floating-point may be suitable under an approved tolerance and precision policy. Decimal arithmetic itself is not infinite precision; context, scale and input bounds must be defined.
Examples of dangerous mismatches:
| Numbers that look comparable | Why they are different |
|---|---|
| 100 gross units and 100 available units | Reservation/cancellation semantics may differ |
| Daily orders and month-to-date orders | Different aggregation windows |
| 2.5% and 0.025 | Different numeric representation of a proportion |
| Revenue in two currencies | Requires rate and accounting policy |
| Warehouse average and plant-wide average | Different population and weighting |
| Instantaneous energy demand and accumulated energy | Different physical quantity |
Some conversions require data that cannot be reconstructed. If only net units are recorded, gross units cannot be recovered without an eligible adjustment history. An unknown unit or semantic difference should cause an incompatibility disposition, not an approximate number disguised as an authoritative one.
5. Temporal alignment and correction eligibility#
Resolve the quantity's actual instant or time interval, then the information set for the use. The event time of a measurement, the time the source knew it, the time it became available to the inference path, and the time the system recorded an approved correction are distinct.
For an as-known prediction at 10:00, a fact first available at 10:08 is ineligible even if its observation is dated 09:55. For corrected retrospective analysis, the same fact may be eligible under a later knowledge boundary. Do not backdate its availability or replace the original prediction. An independently changing source snapshot is admissible only if it contains the required versions under the intended cutoff.
A daily count and an instantaneous balance are not the same time type. Do not sum overlapping windows, subtract cumulative values without verifying common reset/baseline, or compare a partial-day feed with a finalized daily ledger as if both were complete. Align interval endpoints, fiscal/calendar rules, time zones and coverage. The existing financial RAG temporal-consistency lesson covers typed financial joins; the numerical resolver applies the same principles upstream of model input construction.
For sensor alignment, a bounded time tolerance may be valid if the process dynamics and measurement protocol support it. Interpolation or extrapolation produces a derived estimate, not an original observation. For rapidly varying quantities, a difference of seconds can create a large apparent disagreement. Do not increase the temporal tolerance simply to obtain agreement.
Maintain source incarnation and revision identity. Source-specific revision precedence, not global numerical comparison of unrelated revision counters, determines the latest eligible observation. A correction, retraction or withdrawal should create an immutable new record linked to its predecessor. If the latest eligible fact is withdrawn, do not silently fall back to its previous value. Preserve an explicit withdrawal or missing state. A conflicting payload claiming the same immutable source revision is an integrity incident.
6. Deterministic authority and tolerance policies#
Use precedence where the business quantity is defined by an accountable source, such as an approved ledger or signed inventory reconciliation. The most recent timestamp, most frequent value or highest model confidence is not automatically authoritative. Define the conditions under which a secondary source may substitute or corroborate. A replica may have the same upstream origin, so agreement is not independent verification.
An authority policy can distinguish:
- A required source whose eligible value is used for the operational quantity.
- An approved independent measurement used to challenge or supplement it.
- A derived mirror that can detect transformation/replication differences, but not upstream error.
- A designated fallback source with separately verified compatibility and downstream permissions.
- An untrusted or noncomparable claim excluded from the resolution.
Apply hard eligibility checks before numeric tolerances: scope, semantics, revision, time, permission, coverage, finite value and invariants. Then compare applicable quantities. For nonnegative values in the toy mass policy, use a symmetric threshold
tolerance(a,b) = max(absolute_floor, relative_fraction * max(|a|,|b|))
agree iff |a-b| <= tolerance(a,b)With floor 0.5 kg, relative fraction 1%, and 100 versus 100.5 kg, tolerance is 1.005 kg and the discrepancy of 0.5 kg passes. For 100 versus 102 kg, tolerance is 1.02 kg and discrepancy 2 kg fails. Near zero, the absolute floor prevents division by zero or meaningless relative error. This is an illustrative operational acceptance band, not a confidence interval or a metrological recommendation. In some applications a maximum absolute discrepancy is needed as an additional cap; a large relative threshold must not authorize unacceptable absolute errors. Other quantities require asymmetric, risk-sensitive or exact equality rules.
The acceptable tolerance depends on instrument uncertainty, rounding, process variation and business consequence. Set it with owners, evaluate false acceptance and false rejection, version the rule, and avoid retuning it on individual conflicting cases. At a safety or capacity boundary, two values may be within tolerance yet imply different actions. Reconcile the evidence and separately enforce a conservative decision policy. Do not use tolerance to override a hard invariant.
In the warehouse example, a 100 kg approved primary and 100.5 kg mirror produce 100 kg under deterministic precedence, with a within-tolerance status and explicit mirror dependence. They do not produce 100.25 kg. When the mirror reports 102 kg, the policy holds the input for reconciliation rather than manufacturing a middle number. If the mirror is absent, an approved consumer may use a single-source result; a strict consumer requiring corroboration cannot.
7. Statistical reconciliation when the quantity is genuinely uncertain#
Sometimes no single source has definitional authority over the exact value. Two calibrated instruments may independently estimate the same physical mass. In that case distinguish the measurement model from the observation and from the downstream prediction model.
Suppose = x + + , where x is a common latent quantity, is systematic bias, and is random error. A weighted average can be appropriate after calibration/bias adjustment, when the readings describe the same quantity and time and the uncertainty assumptions are justified. An authoritative ledger correction is not another independent random sample; do not apply this formula to it.
For independent unbiased estimates with known variances sigma_i squared, the inverse-variance weighted estimator is
w_i = (1 / variance_i) / sum_j(1 / variance_j)
x_hat = sum_i(w_i * y_i)
Var(x_hat) = 1 / sum_i(1 / variance_i)Worked synthetic example: sensors measure 100 and 104 kg with standard uncertainties 2 and 4 kg. Inverse variances are 1/4 and 1/16; normalized weights are 0.8 and 0.2. The estimate is 100.8 kg, variance 3.2 kg squared and standard uncertainty approximately 1.789 kg. Under appropriate normal-error assumptions a roughly 95% interval is estimate ±1.96 times the standard uncertainty, approximately [97.29,104.31] kg. This does not cover unknown bias or out-of-model disturbances. Do not report it as a guaranteed error bound. The example is mathematical, not an actual calibrated instrument result.
With correlated errors, use the covariance matrix Sigma. For the common-mean linear unbiased estimation model with invertible positive definite covariance,
x_hat = (1^T Sigma^-1 y) / (1^T Sigma^-1 1)
Var(x_hat) = 1 / (1^T Sigma^-1 1)
Var(y_1 - y_2) = variance_1 + variance_2 - 2 covariance_12Use a stable linear solver instead of explicitly inverting a large matrix. Check covariance estimation, conditioning and positive semidefiniteness. Negative generalized least-squares weights can occur; evaluate whether their extrapolation behavior is acceptable. Do not use a singular covariance matrix with an ordinary inverse or silently regularize it without validating the changed estimator.
Shared source lineage matters. Two sensors each with standard uncertainty 2 kg, equal weights and correlation 0.8 have average variance (4+4+2×3.2)/4 = 3.6 and standard uncertainty about 1.897 kg. Assuming independence would give variance 2 and standard uncertainty 1.414 kg, incorrectly narrowing the uncertainty. At perfect correlation, identical errors provide no reduction. A dashboard and its source ledger may be effectively duplicate information. The number of distinct API responses is not the number of independent observations.
A normalized residual may help detect incompatible measurements: under the unbiased common-quantity error model, |y_1−y_2| divided by the standard deviation of the difference measures discrepancy relative to uncertainty. A threshold requires a specified false-alarm policy and distributional assumptions, including multiple testing where relevant. Unknown covariance or common bias can make such a test misleading. Even consistent readings can all be wrong. Use periodic independent calibration, reference samples and domain invariants. Robust estimators such as median or Huber loss may reduce sensitivity to outliers when their assumptions are justified, but they cannot establish which business definition is correct or override a designated source.
8. Reconcile numerical hierarchies and conservation constraints#
Many enterprise facts are not merely replicated scalars; they participate in accounting or physical relationships. Examples include opening stock + receipts − shipments ± adjustments = closing stock, regional totals summing to an approved enterprise total, or a numerator that cannot exceed its corresponding denominator. Use exact scoped, nonoverlapping quantities before checking invariants.
Suppose three estimated component inventories are 42, 38 and 25 units, whose sum is 105. An independently verified exact total is 100. If the components are adjustable estimates, the categories exhaustive/disjoint and variances proportional to 4, 4 and 1, solve a constrained weighted least-squares problem: minimize sum((x_i−y_i)^2 / variance_i) subject to sum()=100. The required correction is −5. Distribute it proportional to variance: −20/9, −20/9, −5/9. The adjusted continuous estimates are approximately 39.778, 35.778 and 24.444, summing to 100. These fractional results are not automatically valid unit counts. If integer quantities are mandatory, solve the corresponding constrained integer problem or use an approved allocation/rounding method preserving the exact sum. If the authoritative total is also uncertain, it belongs in the estimation model, not as an exact constraint.
For a general observation vector y, positive definite weight covariance W, and consistent exact constraints A x = b, the unconstrained-in-other-respects solution to the weighted least-squares projection is
minimize (x-y)^T W^-1 (x-y), subject to A x=b
x* = y - W A^T (A W A^T)^-1 (A y-b)The formula assumes independent constraint rows (or an appropriate generalized solver) and no additional inequalities. Add nonnegativity, capacity, integrality, bounds or robust loss through a suitable optimization procedure. When constraints are infeasible, report conflict. Do not clamp a value independently if doing so violates another constraint. Forecast reconciliation research uses related linear-algebraic ideas to make estimated hierarchies coherent; applying those ideas to observed business inputs still requires a domain-approved measurement and authority model. Do not edit posted authoritative transactions merely to balance an equation. Reconcile the missing or incorrect source events through their owners, or publish explicitly labeled derived estimates.
9. Adjudication and immutable publication#
When deterministic gates or a validated statistical method cannot resolve the discrepancy, create a scoped issue containing original facts, normalized values, units, time and coverage, source revision lineage, current policy, numerical residuals, violated invariants and affected predictions. Route it to a qualified owner: an instrument specialist for calibration, an inventory owner for unrecorded movements, or an accounting owner for reporting-basis discrepancies. An LLM may summarize the evidence but must not create authoritative numeric evidence or approve its own exception.
A review proposal binds exact source facts, expected reconciliation revision, target quantity, intended use and reviewer authority. Require reason codes and new evidence or a formally authorized exception. If source revisions change mid-review, reevaluate before publication. Preserve competing values, decision, evidence and approval. Mandatory invariants cannot be waived by an ordinary reviewer. ASD-090 defines the separate business-policy exception lifecycle.
The committed artifact contains a resolution ID, logical quantity key, source revision set, policy and conversion versions, effective and knowledge cutoffs, resolved value/unit if any, uncertainty interpretation, validity and coverage, method, discrepancy and reason codes, excluded facts and adjudication reference. A status such as WITHIN_TOLERANCE is distinct from INDEPENDENTLY_VERIFIED. An authoritative chosen value can have a material unresolved challenge and may be ineligible for strict consumers. A fused estimate is not relabeled as an exact source fact.
Use a transactional or conditional expected-predecessor update on the current resolution pointer and an outbox event bound to the immutable artifact. Do not use last-writer-wins based on job completion. A correction may change the value, status, uncertainty, scope or source authority without changing a raw number. All can invalidate derived features. Event consumers deduplicate exact resolution identities, reconcile gaps, and publish compatible feature generations. Current eligibility must account for withdrawals and revocations independently of cached resolution data.
10. Tested implementation: deterministic numerical reconciliation#
The following local Python fixture isolates a strict authority and tolerance policy for one instantaneous physical-mass quantity. The warehouse source is required and a mirror is approved for corroboration only. It converts kilograms and grams using Decimal, rejects invalid values and capacity violations, selects eligible source revisions at a knowledge cutoff, refuses immutable revision collisions, and explicitly distinguishes single-source and within-tolerance results from hold/conflict. A later revision is not eligible for an earlier cutoff. A withdrawn head cannot silently resurrect an older source value.
PYTHONfrom dataclasses import dataclass, replace from decimal import Decimal as D @dataclass(frozen=True) class Fact: scope: str metric: str instant: int source: str revision: int recorded: int unit: str value: str withdrawn: bool = False def reconcile(facts, scope, instant, cutoff, capacity): # Policy: warehouse is required; approved mirror may corroborate. # All eligible facts describe the same instantaneous physical mass. selected, seen = {}, {} for f in facts: if (f.scope, f.metric, f.instant) != (scope, 'mass/v1', instant): continue if f.source not in ('warehouse', 'mirror') or not instant <= f.recorded <= cutoff: continue key = (f.source, f.revision) if key in seen and seen[key] != f: return 'CONFLICT', None seen[key] = f old = selected.get(f.source) if old is None or f.revision > old.revision: selected[f.source] = f values = {} for source, f in selected.items(): if f.withdrawn: continue factor = {'kg': D('1'), 'g': D('.001')}.get(f.unit) try: x = D(f.value) if factor is None or not x.is_finite(): return 'INVALID', None x *= factor if not D('0') <= x <= capacity: return 'INVALID', None except ArithmeticError: return 'INVALID', None values[source] = x if 'warehouse' not in values: return 'HOLD', None if 'mirror' not in values: return 'SINGLE_SOURCE', values['warehouse'] a, b = values['warehouse'], values['mirror'] tolerance = max(D('.5'), D('.01') * max(abs(a), abs(b))) if abs(a - b) > tolerance: return 'CONFLICT', None return 'CORROBORATED', a a = Fact('t1/bin7', 'mass/v1', 100, 'warehouse', 1, 101, 'kg', '100') b = Fact('t1/bin7', 'mass/v1', 100, 'mirror', 1, 102, 'g', '100500') c = replace(a, revision=2, recorded=120, value='104') w = replace(c, revision=3, recorded=130, withdrawn=True) def run(rows=(a, b), cutoff=110, capacity=D('150')): return reconcile(rows, 't1/bin7', 100, cutoff, capacity) assert run() == ('CORROBORATED', D('100')) assert run((b, a)) == run() assert run((a, a, b)) == run() assert run((a, replace(b, value='102000')))[0] == 'CONFLICT' assert run((a, replace(b, value='101000')))[0] == 'CORROBORATED' assert run((a, replace(b, metric='gross/v1')))[0] == 'SINGLE_SOURCE' assert run((a, replace(b, instant=99)))[0] == 'SINGLE_SOURCE' assert run((a, replace(b, scope='t2/bin7')))[0] == 'SINGLE_SOURCE' assert run((a, replace(b, source='unknown')))[0] == 'SINGLE_SOURCE' assert run((a, replace(b, recorded=111)))[0] == 'SINGLE_SOURCE' assert run((b,))[0] == 'HOLD' assert run((a, b, c)) == run() assert run((a, b, c), 120)[0] == 'CONFLICT' assert run((a, c), 120) == ('SINGLE_SOURCE', D('104')) assert run((a, c, w), 130)[0] == 'HOLD' assert run((a, b, replace(a, value='99')))[0] == 'CONFLICT' assert run((replace(a, value='NaN'),))[0] == 'INVALID' assert run((replace(a, value='-1'),))[0] == 'INVALID' assert run((replace(a, value='151'),))[0] == 'INVALID' assert run((replace(a, unit='lb'),))[0] == 'INVALID' assert run((replace(a, value='bad'),))[0] == 'INVALID' assert run((replace(a, value='0'), replace(b, value='500')))[0] == 'CORROBORATED' assert run((replace(a, value='0'), replace(b, value='501')))[0] == 'CONFLICT' assert run((a, b), capacity=D('99'))[0] == 'INVALID' assert run((c, a, replace(a, value='99')), 120)[0] == 'CONFLICT' assert run((replace(a, value='99'), a, c), 120)[0] == 'CONFLICT' print('26 checks passed')
Actual local execution on Python 3.13.5:
26 checks passedAll 26 assertions passed. The checks cover gram/kilogram conversion, deterministic source selection, identical duplicate delivery, absolute/relative tolerance boundaries, incompatible definition, time and scope, unknown source, late observation exclusion, required authority, corrected revision selection, withdrawal, same-revision collisions including superseded revisions presented in different arrival orders, NaN, negative value, capacity violation, unknown unit, malformed decimal and near-zero comparison. Exact local file content excluding the terminal newline was 3,656 bytes with MD5 607fee3a7bee6097db7d577b3fe72bc6.
The fixture is intentionally narrow. It assumes trusted, normalized dataclass inputs, valid integer revisions and recorded times, fixed source identity and same instantaneous quantity; source revision order is assumed authoritative. It does not authenticate records, establish actual source coverage, validate source incarnation, observe physical mass, enforce access or model authorization, implement a real temporal join, or produce a full provenance manifest. It checks the latest selected revision's numerical value and all eligible same-revision payload collisions. The Decimal context and allowed numeric magnitude are not fully specified as they must be for a production numerical service. A mirror withdrawal is treated as absence under the toy policy; a real withdrawal may require invalidating the entire derived result if it challenges the primary. CORROBORATED here only means that a permitted mirror agrees within the toy tolerance, not independent measurement verification. A strict model may require a different status and must enforce it separately. No statistical fusion is executed by this code; the statistical worked examples above are analytical illustrations. It performs no persistence, concurrency, secure ingestion, actual model inference or business effect. The seen map uses O(n) space and the pass uses O(n) expected-time dictionary operations for n eligible facts, ignoring decimal parsing costs. A production implementation would bound input sizes, index source revisions and return reason-coded evidence references rather than only a value.
11. Downstream prediction eligibility and sensitivity#
The reconciled number is a feature candidate, not proof that any model may use it. Pin the resolved quantity definition, method, resolution revision, evidence age and uncertainty to the exact model-release contract. A model trained on authoritative ledger values may behave differently if fed fused sensor estimates. Train and evaluate the actual allowed input modes with availability and uncertainty features where appropriate. If uncertainty is outside the approved range or a mandatory input remains unresolved, abstain or choose an independently approved degraded predictor. A missing value is not zero.
For a hypothetical depletion model consuming current mass and projected daily demand, suppose eligible evidence says 100 kg with a separately justified feasible range 96–104 kg, and daily demand is assumed fixed at 20 kg/day. The simplistic depletion estimate is 5 days and the input-range sensitivity is 4.8–5.2 days. This is not a statistical prediction interval; it ignores uncertain demand and future receipts. If the decision boundary is five days, the evidence permits outcomes on either side. The model and action policy must explicitly handle that uncertainty rather than select a convenient point. For nonlinear models, consider sensitivity analysis, a validated distributional input model or bounded evaluation over admissible inputs; arbitrary perturbation is not a calibrated uncertainty guarantee.
Use as-known reconciliation revisions for historical simulation and corrected revisions for labeled hindsight analysis. ASD-013 covers immutable dataset releases and leakage prevention. A model trained on later corrected numerical facts may see cleaner evidence than actual serving, causing training-serving skew. Track model outcome quality by actual source mix, reconciliation method, discrepancy and uncertainty range. Preserve selection coverage and abstentions; high conditional accuracy on resolved examples can hide systematic exclusion of difficult cases.
12. Scaling and reliability#
A numerical reconciliation key is commonly tenant, entity, metric definition, scope, time or window, and intended information-set policy. Partition by stable entity/quantity groups and route related invariant components together where required. Hot keys and hierarchy-wide constraints may require specialized handling. Maintain incremental candidate state and dirty dependency indexes; recompute only affected quantities/windows with pinned inputs. A single corrected transaction can invalidate a daily amount, monthly total, rolling feature and multiple predictions. Propagate through the dependency graph rather than rebuild unrelated data blindly.
Illustrative capacity: 2 million entities with three source readings per hour yield 6 million observations/hour, about 1,667/s. At 500 bytes of metadata and value per observation, uncompressed logical volume is 3 GB/hour or 72 GB/day, about 2.16 TB over 30 days before indexes, replication and raw artifacts. If each reconciliation inspects three facts and emits one output per entity/hour, average output rate is about 556/s. Actual work may be much greater due to changes, corrections, retries and constraints. Benchmark source burst, sparse and heavy-key distributions and latency. Batch fusion and invariant solving off the online request path where possible; serve a cached immutable current result with a validity and withdrawal contract. If fresh facts are required, enforce a bounded request deadline and abstain rather than block indefinitely on adjudication.
Suppose 1% of the 2 million hourly reconciliations generate a review issue: 20,000/hour. At two minutes of human effort per issue, that would require about 666.7 simultaneous productive reviewer equivalents just to match arrival rate. This is a design warning, not a staffing recommendation. Group repeated conflicts by actual source incident and scope without hiding individual affected cases; automate validated deterministic corrections, prioritize high-risk evidence and use representative sampling for audits. Never relax mandatory gates solely to reduce queue length. Expose affected data products as held where necessary.
13. Evaluation, observability and recovery#
Use independent reference evidence, such as controlled remeasurement, source-owner adjudicated records and known invariant examples. Compare authoritative selection, fusion and abstention policies on representative frozen workloads. Measure actual error, uncertainty coverage under the declared assumptions and conflict escape rate, not merely agreement. Two dependent sources agreeing with one another does not establish correctness. Holdout splits must account for shared upstream sources, time and repeated measurements; do not fit weights on evaluation references.
| Metric | Why it matters |
|---|---|
| Comparable claim coverage and exclusion reasons | Distinguish incompatible data from numerical disagreement |
| Required-source availability and validity | Detect ineligible full-model inputs |
| Same-revision collision, late correction and withdrawal rate | Source integrity and lifecycle |
| Signed and absolute residual by quantity and source pair | Bias, drift and calibration |
| Violated invariants and unexplained hierarchy residual | Domain correctness |
| Authority overrides, fusion and hold rates | Actual resolution method mix |
| Reference error and uncertainty coverage | Validate reliability, not majority vote |
| Independent versus common-source agreement | Prevent false corroboration |
| Adjudication backlog, age and repeated incident clusters | Operational capacity |
| Correction-to-feature invalidation and rebuild delay | Exposure to stale evidence |
| Valid on-time prediction coverage and quality by input mode | Downstream effect |
| Unauthorized lookup and lineage access failures | Security boundary integrity |
A realistic source failure may create widespread scale mismatch: a vendor begins emitting grams while retaining kg metadata. Detect abnormal residuals, invariant violations and distribution shift. Stop affected normalization release from generating eligible features, preserve original evidence, establish the actual source contract with the owner, issue a new conversion version and rebuild impacted facts/features on pinned inputs. Identify predictions and decisions that used the faulty values. Correct or remediate actual effects through approved workflows, not by changing old prediction records. Verify corrected results against independent reference measurements and monitor the source after recovery. If the cause cannot be established, keep the status unknown.
Privacy and tenant isolation are mandatory throughout: scope all candidates, evidence, caches, review interfaces and replay by trusted identity and purpose. Do not use data from another tenant to resolve a discrepancy without a separately authorized design. Apply access independently to provenance references. Avoid logging raw customer-level values and sensitive source payloads in general telemetry. Deletion and withdrawal may invalidate prior facts, derived statistics and feature generations; maintain permitted minimal audit lineage and explicitly report limitations on historical reconstruction.
14. Production test matrix#
| Test | Required outcome |
|---|---|
| Different quantity definition, unit, entity or window | No invalid comparison |
| Exact and boundary unit conversion | Defined rounding and precision preserved |
| Future/late observation and later correction | Correct as-known versus corrected eligibility |
| Same revision, conflicting payload | Quarantine or hold independent of arrival order |
| Source withdrawal and revocation | No resurrection of prior evidence |
| Required authority unavailable | Explicit hold or approved distinct fallback |
| Near-zero, large values, NaN, overflow | Defined numeric safety and tolerance |
| Shared lineage and correlated errors | No falsely independent uncertainty calculation |
| Constraint infeasibility or integer rounding | No fabricated coherent result |
| Source update during adjudication | Recheck revision and approval |
| Concurrent publication and stale correction | Conditional activation and current validity |
| Consumer uses old mapping or resolution | Reject incompatible bundle or recover |
| Source incident at scale | Bounded work; explicit affected coverage |
| Cross-tenant or prohibited purpose | Deny resolution and evidence access |
Run actual source adapters, independent calibrated reference tests and temporal/currency/unit fixtures; evaluate statistical estimators against measured error and covariance and stress assumptions. Test transactional revisions, concurrent approvals, actual outbox replay and cache invalidation. Exercise model performance under missing and conflicting evidence, actual prediction deadlines and high-impact decision gates. Verify security and permission revocation end to end. The local tests demonstrate only the narrow deterministic policy.
15. Interview-ready answer#
I would define a typed numerical fact contract and the model's required quantity first. Each source claim would carry exact scope, identity, unit, effective period, availability, source revision, authority, uncertainty and provenance. I would normalize only equivalent quantities, align time and knowledge boundaries, resolve approved source revisions and reject invalid values or hard invariant violations. For definitional business facts I would apply accountable field-level authority and explicit tolerance policies; for multiple noisy estimates of one latent quantity I would use a separately validated uncertainty/covariance-aware estimator, with domain constraints where appropriate. I would never average conflicting meanings or treat correlated mirrors as independent evidence.
I would preserve conflicts and route unresolved cases to source owners or measurement specialists, binding review to exact evidence and policy. I would publish an immutable resolution artifact with a conditional current pointer and correction lineage, and make downstream model admission depend on exact definition, evidence state, uncertainty and freshness. I would keep original as-served predictions separate from corrected analysis, invalidate affected derived features and monitor source residuals, reference quality, conflict coverage, reviewer capacity and actual prediction outcomes. When no approved evidence profile is available, I would abstain rather than fabricate a number.
The decisive principle is that numerical agreement, source authority and measurement accuracy are three different properties. A reliable AI system must establish the appropriate one for its intended quantity before inference.
References and research transparency#
The authorized offline research exception applies. References identify established metrology, statistical estimation, forecast reconciliation, provenance and engineering documentation. Their live contents, URL availability and the Supabase changelog were not verified. Three standard triple-backtick Mermaid diagrams received structural review; Mermaid parser and frontend rendering were not executed. The exact Python block was genuinely run locally on Python 3.13.5 with 26 assertions passing. No live source integration, measurement study, trained model, distributed transaction, statistical calibration, security assessment or production load test was performed. All scenarios and numerical assumptions are illustrative.
- JCGM 100:2008 — Evaluation of Measurement Data: Guide to the Expression of Uncertainty in Measurement (GUM)
- JCGM 200 — International Vocabulary of Metrology (VIM)
- BIPM — The International System of Units (SI Brochure)
- NIST/SEMATECH e-Handbook of Statistical Methods
- Hyndman et al. — Optimal Combination Forecasts for Hierarchical Time Series
- Wickramasuriya, Athanasopoulos and Hyndman — Optimal Forecast Reconciliation for Hierarchical and Grouped Time Series Through Trace Minimization
- W3C — PROV Data Model
- XBRL International — Dates in XBRL
- OpenLineage — Specification
- Python — decimal: Decimal fixed-point and floating-point arithmetic
- NIST AI Risk Management Framework 1.0
- PostgreSQL — Transaction Isolation
References
- 1.
- 2.
- 3.NIST/SEMATECH e-Handbook of Statistical Methodsitl.nist.gov
- 4.
- 5.
- 6.W3C — PROV Data Modelw3.org
- 7.
- 8.OpenLineage — Specificationopenlineage.io
- 9.
- 10.
- 11.PostgreSQL — Transaction Isolationpostgresql.org
Related questions
Explore other topics:Forward Deployed EngineeringMachine LearningMLOpsPython