AI System DesignData and Feature InfrastructureModule 02 — Data and feature infrastructure

Designing a Shared Ground-Truth and Human-Labeling Platform for Delayed Outcomes

Question 35 of 47 · Updated

On this page

Build a shared, target-versioned evidence and adjudication platform, not a mutable table of labels. Capture every eligible prediction or decision cohort, ingest outcome observations with their actual availability and source identity, route uncertain cases to qualified reviewers, and issue immutable label revisions under explicit maturity and adjudication rules. Publish governed dataset manifests that account for missing, provisional, unresolved and withdrawn cases as well as mature labels. Multiple models can reuse the same adjudicated outcome only when their target and exposure contracts are compatible. A missing outcome, model-generated suggestion or reviewer vote is not automatically ground truth.

How would you build a shared ground-truth and human-labeling platform for models with delayed outcomes?

ASD-012 | Module 02 — Data and feature infrastructure | Learning order 22. The existing ML lesson “How can machine learning models be evaluated when ground-truth labels are delayed, missing, or selectively observed?” already develops maturity-cohort metrics, censoring, inverse-propensity weighting and uncertainty. The ML measurement-incident lesson covers detection and recovery when performance reporting is untrustworthy. The RAG ground-truth pair lesson covers retrieval relevance judgments; the bank fraud case covers domain-specific investigation and learning from scarce labels. ASD-009 supplies shared ingestion; ASD-010 supplies versioned feature/prediction evidence; ASD-011 supplies isolated backfills. Here the learning objective is the shared adjudicated labeling platform itself: target registration, durable outcome accounting, reviewer workflows, maturity transitions, canonical label revisions and consumer-specific release manifests. A future crowdsourced annotation design has its own task-dependent worker and evidence design concerns; this lesson focuses on linking delayed operational outcomes with accountable human findings across model consumers. All examples, workloads and limits are fictional. The executed SQLite fixture demonstrates selected revision and snapshot invariants, not an actual annotation service.

1. Requirements and the meaning of ground truth#

Consider a commerce organization with three AI products: a 30-day return-risk predictor, a product-defect predictor and a supplier quality model. Outcomes arrive through return records, refunds, warehouse inspections and occasional customer appeals. Some orders never have an inspection; others have multiple attempts or corrected findings. Different models may predict the same return event, but a returned product does not prove a manufacturing defect. A shared platform should reuse legitimate evidence and labels without collapsing distinct questions into one boolean.

RequirementDesign obligation
ReuseShare canonical target-specific labels across compatible consumers, not by entity ID alone
CompletenessAccount for the entire registered cohort, including never-observed outcomes
Temporal integrityPreserve exposure window, source availability, maturity and issuance times
AccountabilityRetain original judgments, qualified reviewer identity and adjudication reasons
ReproducibilityResolve exact revisions at a declared release cutoff
CorrectionsLink superseding labels and affected dataset/model consumers
PrivacyScope evidence and annotations by tenant, purpose and current authorization
AvailabilityDecouple outcome capture from reviewer queues and release generation

Ground truth is an operational claim supported by a specified measurement and adjudication contract. Even a mature label is not an infallible fact. A delayed authoritative correction can supersede it. Distinguish physical outcome observations, business interpretations, human judgments and model-assisted suggestions. Each has its own provenance and authority. A payment refund can be reliably observed while its reason remains disputed; a reviewer can identify a visible scratch without knowing whether the product later failed under normal use.

Define which owner may establish each target label, how strong the required evidence is, and which cases legitimately remain unresolved. In an interview, ask whether human reviewers can determine the target at all before designing a large annotation workforce. Some counterfactual outcomes cannot be known by reviewing the observed record.

2. Shared platform architecture#

Loading diagram…

Separate ingestion, case registration, label policy, task dispatch, adjudication and release ownership. These are logical responsibilities, not mandatory separate microservices. Reuse the organization's existing capture platform for source contracts and durable positions. A prediction ledger is a source of case and exposure identities; it is not an authoritative outcome table. An outcome ledger stores observations and corrections; it is not a final label decision. The annotation service stores judgments. Only an approved target-specific adjudication policy may issue a canonical label revision.

A label service can be a modular transactional application with a background queue and object storage, growing into partitioned services as workload and ownership demand. Labeling tasks and external outcomes are asynchronous. A queue outage must not erase the source evidence or registered cohort. A worker completion must not silently activate a label without required adjudication. Model consumers access approved dataset versions rather than query individual annotators' work-in-progress.

Control-plane owners register label definitions, compatible target versions, evidence contracts, reviewer qualifications, sampling policies, maturity rules and release criteria. Data-plane workers join observations, create scoped tasks, record judgments and build releases. Separate credentials for label issuance, training consumption, evidence administration and approval reduce accidental or malicious scope expansion.

3. Canonical target and case contracts#

Register a target before ingesting judgments. Its contract must specify what is being labeled, which population is eligible, and how an observation becomes a target value.

Target fieldExample
Target ID/versionreturn_received_within_30d/v1
Case unitOrder line and a specific shipment exposure
EligibilitySuccessfully delivered eligible item
AnchorVerified delivery event
WindowDelivery time through the defined 30-day boundary
PositiveVerified receipt of a return within the window
NegativeWindow complete with required source coverage and no qualifying return
UnknownIncomplete follow-up, conflicting evidence or invalid exposure
InterventionActual shipping/return-policy context
EvidenceAuthorized delivery, warehouse receipt and correction records
MaturityOutcome window plus documented source/reconciliation requirements
AnnotationApproved rulebook, qualified roles, adjudication and exceptions
CompatibilityLabel consumers using the identical target or explicitly reviewed mapping

Do not use a customer ID as a label join key. A customer may place multiple orders, one order may have multiple shipped lines, and each line may have a separate exposure and outcome window. A stable target-case ID represents the observation opportunity. One or more immutable prediction IDs may reference it. This decouples the label from the version of a model that happens to predict it. A prediction made at a different anchor, under a different action or for a different horizon may need a different target case.

Register predictions independently of outcomes, including the model and feature identity, predicted target, event time, actual decision, action/exposure and label eligibility. A case ledger should explicitly account for ineligible predictions and why they are excluded. Deduplicate registration by canonical business identity and target contract. Preserve distinct exposures when a user legitimately repeats a transaction. An identical predicted score is irrelevant to identity.

A label contract version is not a schema revision alone. Changing the event from return request submitted to item received changes the target. Changing 30 days to 60 days creates a different target. Neither should silently overwrite the old labels or be merged under the same consumer dataset. Document compatible mappings and use parallel releases when definitions change.

Illustrative label artifact#

JSON
{ "label_id": "label-741-r3", "tenant_id": "commerce-a", "case_id": "line-84-delivery-2", "target_contract": "return_received_within_30d/v1", "revision": 3, "supersedes": "label-741-r2", "status": "MATURE", "value": 1, "anchor_at": "2026-01-01T12:00:00Z", "outcome_window_end": "2026-01-31T12:00:00Z", "outcome_event_at": "2026-01-28T09:20:00Z", "evidence_available_at": "2026-02-08T10:00:00Z", "recorded_at": "2026-02-09T08:00:00Z", "evidence_refs": ["warehouse-receipt-r7", "appeal-r2"], "adjudication_ref": "decision-192", "guideline_version": "returns-guide/v4", "correction_reason": "late_verified_receipt" }

This is a conceptual record, not a production wire schema. Real records need applicable source coverage, reviewer and policy identities, actual observation and finalization semantics, permitted purposes, integrity and retention metadata. The example has a qualifying event before the window closed but a correction learned later. The original issued label must remain distinguishable from the revised label.

4. Outcome ingestion and delayed observation#

Use source-specific adapters from the shared ingestion platform. Warehouse receipts, refunds, inspection reports and appeals each have their own identity and meaning. A refund may be a courtesy credit rather than a physical return. Normalize observations into a typed evidence envelope without prematurely interpreting them as positives or negatives.

The source adapter preserves scoped source event identity, entity/exposure reference, event/effective time, source availability time, native position, correction identity and raw reference. The matching service resolves source identifiers against the registered case population. It should not guess a match based only on proximity of timestamps or a common customer ID. If a source event arrives before its case registration, retain a restricted unmatched observation and retry the deterministic match as new information arrives. Quarantine ambiguous identities and route ownership problems to the source owner.

Separate receipt acknowledgment from label issuance. Atomically record observation identity and durable processing progress within the applicable storage contract. Retries must not duplicate outcome evidence or annotation work. A repeated immutable event with different content is an integrity conflict. Legitimate corrections carry distinct revisions and references. Out-of-order delivery is ordinary; interpret it under the source's revision and retraction semantics.

A complete target observation depends on more than elapsed time. For a negative return label, the window must close and the required operational source coverage must be verified. A missing feed or unlinked shipment is not evidence of no return. For a positive event that is irreversible under an approved target contract, early finalization may be possible; if later appeals can invalidate it, preserve correction policy. The illustrative fixture below conservatively requires the maturity time for both classes.

Track missing source coverage separately from missing label observations and a real zero outcome. A stream watermark or scheduled batch completion is not proof that all relevant events are known. The source authority must establish coverage under its actual contract, including known gaps, reconciliation delays and corrections.

5. Label lifecycle and maturity scheduling#

Loading diagram…

The diagram depicts an evolving logical label case. Every issued label revision is immutable; a correction creates a new revision, and withdrawal disables current use. Annotation-task state is distinct from target maturity. A task can be completed with an unresolved judgment; a target can have a mature label with no human annotation when authoritative source evidence and policy suffice.

Use a durable maturity scheduler keyed by case and target contract. Register the expected earliest evaluation time based on the anchor and target window, and reevaluate when source coverage, new evidence, corrections or review decisions change. Avoid periodically scanning every prediction ever made. An indexed next-check time, bounded batches and idempotent due tasks support millions of pending cases. If a worker runs late, a maturity decision may be delayed; it must not retroactively pretend the label was issued earlier.

Distinguish these states in APIs and releases:

StateMeaningDefault use
Waiting/unknownNo established target labelExclude from ordinary supervised labels; retain denominator
ProvisionalEvidence supports tentative value but required gates remainExplicit provisional analysis only
Unresolved/censoredTarget cannot currently be establishedExclude or use a separately approved censoring-aware method
MatureRequired target, evidence and adjudication conditions passedEligible if consumer release rules also pass
CorrectedNew approved revision superseding earlier evidenceUse exact revision specified by release
WithdrawnPrevious label is no longer eligible for current useBlock affected current use, notify dependents

A corrected revision can be mature or provisional; correction is lineage rather than an independent quality certification. A task's reviewer cannot set the target's maturity by choosing a UI button. The platform verifies actual conditions from trusted source and adjudication metadata.

Worked delayed-return scenario#

Assume day 0 is a verified delivery. The outcome window closes on day 30 and the platform's illustrative conservative rule requires seven additional days for source reconciliation.

DayObservationLabel disposition
0Delivery exposure registeredWaiting
10Return request openedProvisional signal, not confirmed receipt
30Window ends; source reconciliation incompleteStill pending
37Required feeds reconciled; no qualifying receipt in known evidenceMature negative under current policy
42Appeal supplies verified warehouse receipt dated day 28New corrected positive after adjudication

The day-37 release and day-42 release legitimately differ under this fictional contract. If source reconciliation had already revealed a missing mandatory partition on day 37, a mature negative would not be permitted. The correction may indicate a source coverage failure and should trigger investigation. The old release remains the historical record of the approved information at its cutoff, subject to current retention and access restrictions; it is no longer a current corrected dataset.

6. Human annotation as an evidence-producing workflow#

Create a task only when a target-specific policy requires human judgment or a sampling plan selects a case for quality review. A task is not a label. It binds immutable evidence versions, target and guideline version, task purpose, required expertise, assignment constraints and deadline. Render only the minimum evidence the reviewer is authorized to see.

A practical process has independent assignment, judgment submission, validation, disagreement detection, escalation and adjudication. Reviewers may select a label, mark insufficient evidence, cite evidence, identify conflicting source facts and request a specialized review. The UI must not force a binary choice when the evidence cannot support one.

Loading diagram…

For some low-risk targets a single qualified reviewer and random audit may be appropriate. For high-consequence or ambiguous cases require independent dual judgments or expert adjudication under the approved policy. Agreement is not a substitute for evidence; two reviewers using the same wrong guideline can agree on the wrong label. Where an authoritative measurement directly determines the target, its validated outcome may supersede a reviewer's guess. Conflicting authoritative sources require the domain owner's precedence and correction procedure.

Keep review of the annotation task separate from the downstream action policy. A confirmed quality issue can inform a model or a business review, but does not authorize a refund, account restriction or external notification. Model-generated labels may assist triage or propose fields, but should carry a distinct source/evidence tier. Do not mix synthetic or weak labels into mature human-adjudicated labels without an explicit dataset policy.

7. Reviewer qualification, independence and agreement#

Maintain a reviewer qualification registry by task family, language, domain and risk tier. Use a reviewed training corpus, qualification tasks with justified answers, observed calibration against independently adjudicated cases and periodic reassessment. Record which guideline version the reviewer was qualified for. Sensitive evidence may require narrower access even for an otherwise qualified reviewer. Assign reviewers with conflict-of-interest checks and separation of duties. A reviewer should not independently adjudicate their own disputed annotation unless the governing policy explicitly allows a clearly labeled correction process.

Minimize anchoring when independent judgments are required. Hide the other reviewer's answer and the model's proposed label until independent submission, unless the task intentionally studies assisted review. If AI assistance is used, record the assistance release and whether it was shown. Compare assisted and unassisted reviewer quality on a valid sample. Reviewers may share biases from common training, evidence or incentives, so independent assignment does not prove statistical independence.

For a pair of reviewers on 100 jointly annotated cases under the same binary rubric:

Reviewer B positiveReviewer B negative
Reviewer A positive4010
Reviewer A negative545

Observed agreement is (40+45)/100 = 0.85. Reviewer A positive rate is 0.50 and B positive rate is 0.45. Expected agreement under Cohen's kappa marginal-independence reference is (0.50×0.45)+(0.50×0.55)=0.50. Kappa = (0.85−0.50)/(1−0.50)=0.70. The 15 disagreement cases should be routed according to the policy, not assigned the majority of two.

This is a worked descriptive agreement calculation, not evidence of label correctness or a universal acceptable threshold. Kappa is sensitive to class prevalence and marginal distributions and may be undefined in degenerate cases. Report raw counts, class-conditional disagreement and rubric failure reasons alongside it. For ordinal judgments use a suitable weighted agreement method; for multiple raters or missing judgments choose an appropriate method such as Krippendorff's alpha where applicable. Compare reviewers only on matched task versions. Systematic disagreement may reveal ambiguous guidance, conflicting evidence or unsupported targets, not merely poor reviewer performance.

An expert adjudicator records which evidence and guideline support the final disposition, why alternatives were rejected and whether the rubric itself needs clarification. Repeated disagreement patterns should lead to guideline revision and an explicitly scoped relabeling campaign. Do not change historical annotations silently. If a statistical aggregation method such as Dawid-Skene is used for an approved low-risk task, validate its assumptions and preserve estimated versus adjudicated provenance; correlated errors and poor reference labels can undermine learned reliability.

8. Task queue integrity and review capacity#

The logical task ID includes case, target version, evidence packet and required judgment slot. Attempts and assignment leases are separate. A worker may abandon a task, time out or retry submission after a lost acknowledgment. Store an idempotent submission receipt and prevent stale assignment owners from finalizing a replaced task. If evidence changes mid-review, mark the old packet superseded and request a new judgment or explicit adjudicator revalidation; do not automatically attach the old judgment to new evidence.

Do not create one review task for every candidate model when the outcome case and rubric are identical. If three models predict the same 30-day return target for the same exposure, one canonical label can support all three. If one predicts physical defects and another predicts return behavior, separate target tasks may share evidence but not the final label.

Prioritize according to preapproved target risk, task due time, representative sampling obligations, correction impact and reviewer qualification. Maintain separate queues or fair admission for tenant/task groups. A small tenant's mandatory review should not be indefinitely delayed by another tenant's bulk backfill. If capacity is insufficient, expose waiting/unresolved cases and hold affected publication; do not auto-finalize them to clear a backlog.

9. Sampling and selective-label bias: the platform's responsibility#

The existing delayed-label evaluation lesson explains statistical inference under incomplete observations. The platform should provide the evidence necessary for those methods, not claim that a queue configuration removes bias.

Register the full eligible population before sampling. Maintain a versioned sampling plan with stratum, eligibility, randomization method, assignment probability where applicable, selection reason, model/decision context and actual acquisition disposition. A sampling decision can be distinct from observation probability: randomly selecting an order for review does not guarantee a usable outcome or a completed task. Record nonresponse and exclusions. For human review, retain review route and reviewer assistance policy to diagnose changes in who becomes labeled.

A typical design combines:

  • A representative audit stream sampled independently of model scores where lawful and feasible.
  • Targeted sampling for rare cases, critical slices and disagreement.
  • Active-learning or uncertainty sampling for training improvement, separately marked.
  • Mandatory review dictated by business policy, separately identified.
  • Correction or incident campaigns scoped to the affected evidence lineage.

Suppose 10,000 eligible exposures include 1,000 high-risk and 9,000 ordinary cases. The platform chooses 200 high-risk and 180 ordinary cases for a stratified review sample: nominal inclusion rates are 20% and 2%, respectively. Record those assignments and the actual outcome acquisition/completion status. The raw review sample is not a simple random sample of the entire population. Consumers can use the selection metadata and applicable assumptions to estimate quantities as appropriate. A zero inclusion probability or a structurally unobservable counterfactual cannot be repaired by assigning a large weight. Do not infer the outcome of an unperformed action from a reviewer opinion.

Protect the independence of evaluation cohorts. Use access-controlled frozen test manifests, separate development and final evaluation sampling plans, and explicit prohibition of training on held-out items or their linked duplicates. The same canonical label can appear in multiple consumer releases only under permitted splits and purposes. Label reuse is not permission to leak evaluation targets into model development.

10. Logical data model and correction lineage#

EntityKey and important fields
target_contractTarget ID/version, value schema, horizon, rulebook, evidence authority
target_caseTenant, case ID, exposure and anchor, target version, expected maturity, eligibility
prediction_linkImmutable prediction ID to compatible target case, model and actual action
observationScoped source occurrence/revision, effective and availability times, evidence reference
evidence_packetImmutable authorized evidence manifest and target/rubric version
sampling_assignmentCase, plan, stratum, selection probability and actual disposition
annotation_taskCase, packet, judgment slot, assignment lease and due time
annotationImmutable reviewer judgment, evidence, guideline, submission receipt
adjudicationExact input annotations/observations, accountable decision and rationale
canonical_label_revisionScoped target case/revision, status, value, time, provenance and predecessor
dataset_releaseManifest, population/split, label revisions, exclusion accounting and approval
dependency_indexRelease-to-consumer, model/artifact and correction impact

Do not keep only a current label column on the prediction table. A single corrected outcome may be shared by many predictions. Store append-only revisions with a current head or a derived index, and keep target identities scoped. If an adjudicator and an automated source finalizer race to issue a new revision, compare the expected predecessor transactionally. A conflict requires reevaluation of the new head; do not overwrite the other decision.

Separate outcome event time, evidence first available to the organization, reviewer decision time and durable label recorded/issued time. Preserve the ordering and source semantics required for as-of releases. A correction learned today may have an effective outcome date weeks ago. Do not backdate the label's availability to that effective date.

Use immutable release manifests rather than a mutable query of latest labels for training or evaluation. A correction can create a new approved release and an impact record referring to old releases. Consumers decide whether they need recalculation, retraining or remediation based on the actual dependency and impact, not because every label revision triggers a live model deployment. For withdrawal due to privacy or permission requirements, stop unauthorized access immediately under the applicable contract; historical reproducibility may need to be limited. An immutable audit record does not justify retaining prohibited evidence.

11. Dataset release contract#

Loading diagram…

For each consumer pin target version, expected population, temporal boundaries, as-of cutoff, revision-selection rule, permitted evidence/label tiers, split identity, sampling metadata, quality gates and transformation release. Include exact accepted case-label revision mappings and explicit reasons for exclusions. A training release can legitimately omit unresolved cases under an approved method, but must not pretend they never existed. A strict benchmark may require coverage and independent review gates beyond those of training.

If the latest revision at cutoff is withdrawn or unresolved, do not silently fall back to an older mature label. That would resurrect invalid evidence. For a historical reconstruction, select revisions actually available by the declared cutoff, separately checking whether the underlying data is still authorized for the intended purpose. Reproducible retrospective selection is not a guarantee that the old data can legally or safely be accessed today.

Create a release using a consistent database snapshot or an immutable input manifest, then atomically publish the exact validated output reference with an expected predecessor and approval. Avoid scanning mutable labels over several minutes and calling the result a single-time dataset. A new label written during export belongs to a later release, not a random subset of the current one. For large tables use snapshot-aware distributed joins and partition manifests; do not do per-row lookups at production scale. The simple code below isolates revision semantics and selection.

Worked release accounting#

Imagine a frozen 20,000-case cohort under one target. At the approved label cutoff, 16,000 have mature revisions, 2,000 remain provisional, 1,200 are unresolved and 800 have no label. The release candidate has 80% mature coverage; the exclusions total 4,000, so every expected case is accounted for. Whether 80% is adequate depends on the consumer's preregistered purpose and critical slices, not a universal rule.

One day later, 100 of the mature labels are corrected and 300 formerly provisional cases become mature. The next approved release would have 16,300 mature cases, assuming no other changes. Exactly 100 prior case values/revisions and 300 eligibility records need new mappings. The original release's manifest remains unchanged, and the dependency index can identify which training or evaluation artifacts consumed affected labels. This is release accounting, not a claim of model accuracy.

12. Tested implementation: append-only revisions and as-of dataset selection#

The following Python/SQLite fixture models a small shared target registry and scoped label ledger. A conservative target policy requires an earliest maturity time for both positive and negative labels. The caller supplies a trusted already-adjudicated label and recorded time. A revision must be the next revision after the expected head, and recorded times cannot regress. An identical replay is idempotent; a different payload at the same revision is a conflict. A snapshot includes only the latest mature revision as of its cutoff and explicitly accounts for all other cases in the supplied expected cohort.

PYTHON
import sqlite3 from dataclasses import dataclass, replace @dataclass(frozen=True) class Label: tenant: str case: str target: str revision: int recorded: int status: str value: int | None evidence: str reviewer: str def append(db, label, expected): # Trusted caller, evidence reference and server-assigned recorded time. key = (label.tenant, label.case, label.target) if label.status not in {'PROVISIONAL', 'MATURE', 'UNRESOLVED', 'WITHDRAWN'}: return 'INVALID' if label.status in {'PROVISIONAL', 'MATURE'}: if type(label.value) is not int or label.value not in (0, 1): return 'INVALID' elif label.value is not None: return 'INVALID' if not label.evidence or not label.reviewer: return 'INVALID' db.execute('BEGIN IMMEDIATE') try: def done(result): db.commit() return result case = db.execute('SELECT mature_after FROM cases WHERE tenant=? AND id=? AND target=?', key).fetchone() if case is None: return done('UNKNOWN_CASE') if label.status == 'MATURE' and label.recorded < case[0]: return done('TOO_EARLY') body = (label.recorded, label.status, label.value, label.evidence, label.reviewer) prior = db.execute('SELECT recorded,status,value,evidence,reviewer FROM labels ' 'WHERE tenant=? AND id=? AND target=? AND rev=?', (*key, label.revision)).fetchone() if prior is not None: return done('DUPLICATE' if prior == body else 'CONFLICT') head = db.execute('SELECT rev,recorded FROM labels WHERE tenant=? AND id=? AND target=? ' 'ORDER BY rev DESC LIMIT 1', key).fetchone() if (expected != (head[0] if head else 0) or label.revision != expected + 1 or (head and label.recorded < head[1])): return done('STALE') db.execute('INSERT INTO labels VALUES(?,?,?,?,?,?,?,?,?)', (*key, label.revision, *body)) return done('ADDED') except BaseException: db.rollback() raise def snapshot(db, tenant, target, expected_ids, cutoff): # Frozen eligible cohort supplied by the dataset owner. accepted, excluded = {}, {} for case in sorted(set(expected_ids)): row = db.execute('SELECT rev,status,value FROM labels WHERE tenant=? AND id=? AND target=? ' 'AND recorded<=? ORDER BY rev DESC LIMIT 1', (tenant, case, target, cutoff)).fetchone() if row and row[1] == 'MATURE': accepted[case] = (row[0], row[2]) else: excluded[case] = row[1] if row else 'UNKNOWN' return accepted, excluded db = sqlite3.connect(':memory:', isolation_level=None) db.executescript('''CREATE TABLE cases(tenant TEXT,id TEXT,target TEXT,mature_after INTEGER, PRIMARY KEY(tenant,id,target)); INSERT INTO cases VALUES('a','x','return/v1',30),('a','y','return/v1',30),('b','x','return/v1',30); CREATE TABLE labels(tenant TEXT,id TEXT,target TEXT,rev INTEGER,recorded INTEGER,status TEXT, value INTEGER,evidence TEXT,reviewer TEXT,PRIMARY KEY(tenant,id,target,rev));''') p = Label('a','x','return/v1',1,10,'PROVISIONAL',1,'e1','r1') m = replace(p,revision=2,recorded=30,status='MATURE',value=0,evidence='e2') c = replace(m,revision=3,recorded=40,value=1,evidence='appeal') w = replace(c,revision=4,recorded=50,status='WITHDRAWN',value=None,evidence='withdrawal') assert append(db,p,0) == 'ADDED' assert append(db,p,0) == 'DUPLICATE' assert append(db,replace(p,value=0),0) == 'CONFLICT' assert append(db,replace(m,recorded=29),1) == 'TOO_EARLY' assert append(db,replace(m,value=True),1) == 'INVALID' assert append(db,replace(m,evidence=''),1) == 'INVALID' assert append(db,replace(m,status='UNRESOLVED'),1) == 'INVALID' assert append(db,replace(m,target='return/v2'),1) == 'UNKNOWN_CASE' assert append(db,replace(m,tenant='z'),1) == 'UNKNOWN_CASE' assert snapshot(db,'a','return/v1',['x','y'],29) == ({},{'x':'PROVISIONAL','y':'UNKNOWN'}) assert append(db,m,1) == 'ADDED' assert append(db,c,1) == 'STALE' assert append(db,c,2) == 'ADDED' assert snapshot(db,'a','return/v1',['x','y'],35) == ({'x':(2,0)},{'y':'UNKNOWN'}) assert snapshot(db,'a','return/v1',['x'],40) == ({'x':(3,1)},{}) assert append(db,replace(w,recorded=39),3) == 'STALE' assert append(db,w,3) == 'ADDED' assert snapshot(db,'a','return/v1',['x'],50) == ({},{'x':'WITHDRAWN'}) assert snapshot(db,'a','return/v1',['x'],40) == ({'x':(3,1)},{}) assert snapshot(db,'b','return/v1',['x'],50) == ({},{'x':'UNKNOWN'}) assert append(db,replace(p,tenant='b'),0) == 'ADDED' assert snapshot(db,'b','return/v1',['x'],50) == ({},{'x':'PROVISIONAL'}) assert db.execute('SELECT count(*) FROM labels').fetchone() == (5,) print('23 checks passed')

Actual local execution with Python 3.13.5:

23 checks passed

All 23 assertions passed. They exercise original provisional issuance, duplicate replay, immutable revision collision, early maturity rejection, invalid Boolean label, missing evidence reference, inconsistent unresolved value, unknown target and tenant, missing versus provisional status, mature issuance, stale predecessor, corrected revision, original and corrected cutoff selection, regressive recorded time, withdrawal, historic snapshot preservation, independent tenant scope and final ledger count. Exact locally executed code MD5 (excluding terminal newline): dcec175dd210e1489fe82cfd07893b74.

This is not a complete authorization, label adjudication or dataset publication service. The evidence and reviewer strings are assumed to be trusted references; the code does not authenticate reviewers, validate qualifications, enforce independent adjudication, verify source coverage, check actual event windows or prohibit unapproved lifecycle transitions. Its maturity time is necessary but not sufficient in production. The fixture assumes normalized integer revisions and server-assigned recorded time, a single in-memory connection and a frozen eligible cohort. It does not create an immutable release artifact, perform concurrent reads or ensure a consistent multi-query snapshot under concurrent writers; production must use a consistent snapshot and bind exact validation and permission evidence before publishing. It returns the historic label at an earlier cutoff even after withdrawal; that illustrates temporal selection only, not authorization to access withdrawn data. A real consumer must enforce current privacy and access restrictions independently. No external effects, actual annotations, empirical agreement study, outcome feeds or deployed security controls were tested.

The database uses a composite primary key for scoped revisions. Each append performs a bounded number of indexed queries, plus transaction overhead. Snapshot selection executes one indexed query per unique expected case and sorts those IDs, so its application-level overhead is O(n log n) plus lookup costs; use set-based snapshot joins for large cohorts. Storage grows with revisions, not just current cases. Real concurrency requires appropriate isolation, constraints, retries and independently verified identity at the write boundary.

13. Integration contracts for multiple model teams#

Expose scoped APIs or approved data subscriptions for target registration, case/prediction linkage, evidence submission, annotation request, label revision lookup and release retrieval. Separate mutable work status from immutable approved artifacts. Use stable identifiers, schema versions and typed error dispositions. An API response indicating annotation submitted is not label mature. An event stating label corrected identifies the exact prior and new revision and affected target scope; it does not instruct consumers to apply arbitrary business effects.

Publish label availability and correction events through a durable change stream or outbox under the same transaction as the label state change where supported. Consumers should deduplicate by event identity and reconcile missed events against release manifests. A consumer cache key must include target version, case, label revision, purpose and relevant authorization scope. Never cache by case ID alone. A backfill must not overwrite current labels or duplicate actual intervention receipts; use the generation isolation pattern from ASD-011.

Training can pin a release and join it to the point-in-time feature manifest for each case. Evaluation can pin a different release with its frozen held-out cohort and report-cutoff contract. Online monitoring may use a provisional view where explicitly permitted, but must not confuse it with mature labels. Human investigation tools may need exact evidence and review details; model pipelines often need only authorized pseudonymous keys, labels and provenance references.

When labels change, use the dependency index to assess affected datasets, evaluations and deployed models. A correction campaign should publish its affected target/case scope, cause, revision lineage and release availability. The measurement-incident lesson handles when monitoring must enter an unknown or recovering state. This platform supplies the reliable evidence and recovery artifacts for that response.

14. Scale, queue sizing and cost#

Assume an invented platform registers 1 million target cases daily. Under an illustrative 37-day waiting horizon, roughly 37 million cases may be pending in a steady workload if no early closure occurs. At 250 bytes of base metadata per case that is about 9.25 GB of raw case metadata, before indexes, revisions, replicas, evidence and task state. If label records average 600 bytes and 1.2 million revisions are issued per day, raw revision storage is 720 MB/day or 21.6 GB per 30 days, before overhead. Actual binary evidence can dominate storage; reference governed object versions instead of duplicating large evidence packets.

Suppose 2% of cases require human annotation: 20,000 cases/day. Each receives two independent judgments averaging 45 seconds. This is 40,000 judgments and 500 reviewer-hours/day. If 15% of those cases need a further four-minute adjudication, add 3,000 × 4/60 = 200 specialist-hours/day. With five productive review-hours per reviewer per day, nominal staffing is 100 general reviewer equivalents and 40 specialist equivalents, before peak headroom, leave, breaks, training, review quality and time-zone coverage. At fictional hourly costs of $20 and $40 respectively, direct review cost is $10,000 + $8,000 = $18,000/day. This is a capacity model, not a real workforce or vendor quote.

Use measured effort and variance by task type rather than uniform averages. A surge of late outcomes or source corrections may create a specialist bottleneck even when ordinary review capacity is available. Queue health should include oldest due task and deadline miss risk by qualification and tenant, not just overall throughput. Reserve capacity for critical correction and representative audit tasks. Lower-risk backlog can be deferred; mandatory evidence cannot be waived because the queue is full.

Partition the outcome/label ledger by appropriate tenant, target and time/entity key, retaining atomic revision ownership for a case. Index maturity and due-task scheduling separately from evidence lookup. Use bounded ingestion batches and idempotent processing, independent reviewer queues and backpressure. Store large artifacts outside the transactional metadata path. Build large release datasets with snapshot-aware partitioned jobs and reconcile expected cohort coverage. Reuse labels across compatible model teams to reduce duplicate review, but do not pool incompatible targets just to reduce cost.

15. Privacy, reviewer governance and operational safeguards#

Label evidence can be more sensitive than the original model input: disputes may contain personal information, private documents, health or financial details. Keep least-privilege access per tenant, task, evidence purpose and reviewer role. Derive scope from trusted identity, not the submitted task payload. Redact unnecessary identifiers and fields, restrict download/export where appropriate, and protect logs, screenshots, notifications and review notes. Human work should happen in an approved environment with clear purpose and retention boundaries. Apply appropriate worker wellbeing safeguards for difficult content; do not impose an unsafe exposure merely to complete a queue.

Treat free-text annotations and source documents as untrusted content. They may include misleading instructions, fabricated citations or malicious markup. A model assistant cannot use an annotation to obtain additional access, alter label rules or issue authoritative corrections. Validate output schemas, evidence references and authorization at each protected boundary.

Use auditable, independently governed policies for reviewer qualification, guideline changes, conflicts, compensation incentives and dispute resolution. A speed-only reviewer ranking can incentivize careless labels; evaluate quality, appropriate abstention and fairness alongside throughput. Do not use protected or irrelevant reviewer attributes as a shortcut for qualification. Detect potential collusion, duplicate submissions or systematically unsupported judgments, then investigate with accountable owners rather than treating automated signals as proof.

Preserve evidence lineage under applicable deletion, revocation and retention obligations. A label may itself reveal sensitive facts even after removing the original observation. Propagate removal and access restrictions through release manifests and downstream artifact dependencies, including replay and restored backups. Document which historical analyses can no longer be reproduced. Avoid claims that a particular architecture automatically satisfies a legal or regulatory regime.

16. Operational monitoring and incident handling#

SignalPlatform responsibility
Registered eligible cases versus source/exposure ledgerDetect missing cohort registration
Unmatched, ambiguous and duplicate outcome observationsDetect identity and source integrity issues
Observation availability lag and required coverageEstablish readiness for maturity
Label counts by state, target and cohort ageDetect delayed or missing adjudication
Due maturity tasks and oldest unresolved reviewDetect workflow backlog
Reviewer qualification, agreement and adjudication ratesDetect rubric or quality issues
Correction/withdrawal rates and reason categoriesIdentify evidence or process changes
Revision conflicts and rejected stale submissionsDetect concurrent or stale workers
Accepted versus excluded release casesEnsure complete release accounting
Selection assignment and completion coverage by stratumProvide bias diagnostics
Correction-to-dependent-release notification lagBound downstream stale evidence
Unauthorized access and deletion propagation failuresProtect trust boundaries

Monitor the source, labeling and consumer health separately. A low count of labeled positives might reflect source failure, change in review sampling or a genuine outcome shift. The labeling platform should not automatically diagnose model drift. Keep raw case IDs, private outcomes and sensitive reviewer details out of high-cardinality public telemetry.

If a return-source feed stops, preserve the registered cohort and raw capture progress; mark affected maturity checks incomplete and hold strict negative issuance. Determine exact affected source positions, target cases and release versions. Recover the feed, reconcile independent expected source coverage, issue any corrections with provenance, validate new manifests and notify consumers. Do not mark the incident resolved solely because ingestion resumed.

If the guideline itself is wrong, freeze affected label issuance, version the corrected guideline, identify impacted judgments and labels, reassign cases under the corrected contract and release a new dataset. Affected existing labels may need withdrawal before the correction is ready. Monitor the response of downstream consumers without assuming a new label instantly fixes models trained on old data.

17. Second scenario: shared quality evidence across models#

A manufacturer operates a visual surface-defect classifier, a sensor-based final-test predictor and a warranty-return predictor. The evidence registry may contain images, inspection findings, final test measurements and delayed warranty outcomes. The first target requires a qualified visual assessment, the second requires a particular calibrated test outcome, and the third requires an eligible warranty exposure window and verified claims. The same image can be reused with appropriate authorization, but an early scratch label cannot mature a warranty claim target.

Register each target and case separately, link the appropriate prediction identities and expose explicit evidence references. When a final test measurement is corrected after instrument recalibration, only the labels that depend on that measurement and its affected range should be reassessed. A visual reviewer may not have the qualification to adjudicate instrument calibration or warranty entitlement. This example illustrates the value of shared infrastructure with independent domain adjudication policies, rather than a generic universal label.

18. Production acceptance and failure tests#

Test the entire evidence-to-label-to-release lifecycle with real contracts and controlled test data.

TestExpected invariant
Duplicate or conflicting source occurrenceNo double accounting; conflict quarantined
Outcome before case registrationDurable unmatched evidence, deterministic reconciliation
Incorrect target/window or exposure joinNo cross-case label issuance
Window closed but source gap presentNo unsupported negative finalization
Provisional or missing outcomeNot converted to mature negative
Reviewer with expired qualificationTask or submission blocked under current policy
Two independent submissions race with reassignmentStale assignment cannot overwrite approved judgment
Conflicting judgmentsRequired adjudication or unresolved disposition
Evidence packet revised during reviewOriginal judgment preserved; revalidation required
Concurrent correction and finalizationFenced predecessor and immutable revision history
Release during concurrent label writesConsistent snapshot and exact manifest
Withdrawal after releaseCurrent use blocked, affected consumers notified
Cross-tenant or purpose mismatchDeny access and publication
Queue overload or source outageExplicit pending/unresolved state; no implicit approval
Recovery and historical replayNo duplicate effects, no future availability leakage

Use independent reference fixtures for domain rules, reviewer studies with actual qualified participants, source reconciliation against authoritative records, transaction and fault tests with the real database and queue, and privacy/security review. For large datasets test partition skew, maturity scheduling, queue fairness, notification retries and consistent manifest publication. Verify correction propagation across actual consumers. The tested local fixture proves only selected sequential state and selection logic.

19. Interview-ready answer#

I would start by registering explicit target contracts and complete eligible case populations, distinguishing predictions, exposures, observations and labels. I would build a shared ingestion and evidence ledger that preserves identity, event/availability times and correction lineage. An outcome maturity engine would decide when evidence is sufficient, leaving unknown and provisional cases explicit. When human judgment is needed, the platform would create scoped immutable evidence packets, assign qualified independent reviewers, collect judgments and route disagreement to accountable adjudication. Only approved target-specific rules would issue canonical label revisions.

I would store versioned labels with transactional predecessor checks, exact provenance and correction/withdrawal history. Sampling plans would record eligible populations, selection probabilities where applicable and actual missingness, so evaluation teams can address selection bias rather than infer representativeness. Dataset releases would pin exact target, population, split, cutoff, label revisions, exclusions, permissions and quality evidence. Training and evaluation would independently consume approved manifests. I would protect sensitive evidence, prevent cross-tenant use, isolate review and publication authority, and track actual correction impact on downstream artifacts. Finally I would size source, maturity and human-review queues separately and test real source reconciliation, concurrency, reviewer quality, privacy and release recovery.

The platform succeeds when an approved label is an accountable, reproducible claim about a precisely defined target, not merely a value produced by a model, a reviewer or the passage of time.

References and research transparency#

Authorized offline research exception applied. These sources identify established research on delayed and selective labels, inter-annotator agreement, weak supervision, dataset documentation, risk, provenance and transactional storage. Current link availability, live contents and the Supabase changelog were not verified. Four meaningful standard triple-backtick Mermaid diagrams received structural review only; no Mermaid parser or live site rendering was tested. The exact Python fixture was genuinely executed locally on Python 3.13.5 with all 23 assertions passing. No actual source integration, human reviewer study, statistical calibration, distributed concurrency, security assessment or production workload was exercised. All architecture, numerical examples and workload figures are hypothetical.

Related questions

Explore other topics:Forward Deployed EngineeringMachine LearningMLOpsPython