Corpus updates: compare evidence and answers against a versioned manifest
Track ingestion and policy changes, publish coherent retrieval generations, and detect hidden regressions with paired answer and citation tests.
On this page
The question for today
What you’ll understand
- Define corpus-update manifests spanning source, parser, index, model, and access versions.
- Distinguish legitimate answer changes from regressions.
- Compute paired gains and losses instead of relying on net accuracy alone.
Updating the corpus can fix stale facts while changing retrieval ranks, chunk identities, summaries, permissions, and cached answers. A successful ingestion job does not establish that users receive coherent current evidence. Treat an update as a versioned pipeline change, publish it under a defined consistency contract, and compare both evidence behavior and answers on a stable, explicitly maintained evaluation set.
A manifest describes the evidence generation being served
Record source identities and versions, additions, modifications, deletions, parser configuration, chunking and tokenizer artifacts, embedding model, index configuration, hierarchy derivations, and access-policy versions. Include query rewriting, reranking, packing, prompt, generator, and decoding configuration for answer-level replay. Distinguish source publication time, ingestion time, and effective time. A document can be newly ingested but already superseded. Keep build and validation outcomes so a missing source can be traced to exclusion, parsing failure, permission, or index publication.
Build a coherent candidate generation and validate its source mappings before making it the intended serving snapshot. The actual storage and search implementation determines what atomicity or consistency is available; a single manifest file does not make several databases update together. Requests need a way to identify the generation they used or detect mixed-version reads. Parent stores, derived summaries, caches, and citation resolvers must follow compatible versions. Rollback can restore a previous compatible generation only if its retained artifacts and access rules still permit serving it.
Expected changes and unexpected failures need different labels
Create tests for changed facts, removed evidence, new relevant documents, permission-only edits, boundary changes, and unaffected control questions. A correct answer may legitimately change when the authoritative applicable source changes. Update its expected evidence and adjudication with a recorded reason rather than preserving an obsolete string. For stable questions, compare retrieval coverage, selected source versions, final context, citation support, and answer quality. Reusing old exact-output assertions can reject an improved paraphrase while missing an unsupported but familiar sentence.
Aggregate accuracy can hide individual regressions. Use paired case identities to count gains, losses, unchanged successes, and unchanged failures under a comparable criterion. Slice results by document type, language, tenant scope, multi-hop requirement, and freshness sensitivity. If labels legitimately changed, distinguish that group from stable-label comparisons. Include abstention and access checks as independent outcomes; a new model that answers more questions can still leak restricted evidence or cite deleted spans. Review the concrete failure traces before accepting a net score improvement.
Validate publication and dependency freshness end to end
Probe source fetch, retrieval, expansion, answer generation, and citation resolution using the candidate generation. Verify deletions and revocations across warm caches as well as cold paths. Confirm newly relevant documents can displace old ranked results, including cached negative answers. Record generation identifiers in evaluation traces and examine any response combining incompatible versions. Evaluate latency and cost with the same correctness and access gates, because an answer regression can be hidden by silently omitting evidence or falling back to another snapshot.
The Markov lab offers a conceptual two-state propagation model only. Reset, set p=1 and q=0, predict that one Step puts all probability in state one, then Step once. Separately Reset, set p=0.50 and q=0, predict state-one probability 0.75 after two Steps, then Step twice. State zero can be called old and state one new for this analogy. The instrument has no deployment, corpus version, or consistency checker. A probabilistic migration curve cannot prove every real response uses the required coherent snapshot.
Work it through
A net improvement can hide stable-case regressions
On 100 fixed questions whose success criteria remain unchanged, the old pipeline is correct on eighty-five and the updated pipeline on eighty-eight. Eighty-two questions are correct in both runs.
Old-only successes number 85−82=3 regressions. New-only successes number 88−82=6 gains.
Both-wrong cases number 100−82−3−6=9. Net accuracy rises by (6−3)/100=3 percentage points, from 85% to 88%.
Among the eighty-five previously correct cases, regression rate is 3/85≈3.53%. Review those three traces even though the aggregate improved; source-version and citation checks may reveal a systematic failure.
The update gains six cases and loses three. Net accuracy alone conceals the identity and nature of those regressions.
The living notebook
Explore the model
Interactive lab · markov
A migration probability does not certify coherent serving
Reset, set p=1 and q=0, predict state-one probability 1 after one Step, then Step once. Separately Reset, set p=0.50 and q=0, predict state-one probability 0.75 after two Steps, then Step twice. The exact two-state chain starts in state zero and has no corpus deployment, cache invalidation, or consistency enforcement.
- P(state 1) at step 0
- 0%
- Stationary P(state 1)
- 60%
- Chain behavior
- Monotone convergence
Exact finite-step probabilities for a two-state chain starting in state 0, not sampled trajectories. Playback advances two transitions per second. When p = q = 0 every distribution is stationary; when p = q = 1 the chain alternates forever. A single zero transition creates an absorbing state. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forVerify versioned end-to-end responses rather than treating a propagation model as publication evidence.
Pause & reason
Check your understanding
Your turn
Try it yourself
On eighty stable-label questions, the old pipeline is correct on sixty-four, the new one on sixty-two, and sixty are correct in both. Find gains, losses, both-wrong cases, and net accuracy change.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Subtract the shared-success count from each run before computing the net.
Compare with the solution
Losses are 64−60=4, gains are 62−60=2, and both-wrong cases are 80−60−4−2=14. Net accuracy change is (2−4)/80=−0.025, or minus 2.5 percentage points. The identities of the four losses matter for diagnosis, while changed-label cases would require a separate comparison.
Keep the idea
Take it with you
- Serve and evaluate an explicit compatible source/index/model/access generation.
- Maintain expected answer changes separately from stable-case regressions.
- Paired gains, losses, provenance, and warm-cache checks reveal failures hidden by totals.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.