RAG and Knowledge Engineering
Knowledge Versioning
What it is
Giving the corpus identifiable states and being able to say which one an answer came from. A state is more than the documents: it is the document revisions, the segmentation rule, the encoder and its revision, the index build, and the mapping between them, bound together under one identifier that a query can be pinned to and an answer can carry. Where measuring age asks how far behind the corpus is, and applying differences is how it catches up, this asks which of its many possible states was in effect — and whether that state can be examined again.
Why it matters
Answers outlive the corpus that produced them. A customer disputes a response from March, an auditor asks what the system was told when it approved something, a regression is traced to a week in which quality fell — and in each case the question is what the corpus said at that time, not what it says now. Without identifiable states the honest answer is that nobody knows. The same identity is what makes comparison valid: an evaluation run and a production query that both say "latest" are comparing different things, and two services pinned to different states will contradict each other in ways nobody can reproduce.
Key decisions
- What is versioned. Versioning documents alone is cheap and does not explain a quality change caused by a new segmentation rule; versioning the whole pipeline configuration explains everything and is a much larger commitment.
- Whether the goal is explanation or reproduction. Retaining enough metadata to say what a citation pointed at is modest; retaining enough to re-run a query against March's index means keeping March's vectors.
- Whether queries can pin a state, or only the current one is servable. Point-in-time retrieval is what makes audit and controlled comparison possible, and it is a significant demand on the store.
- Where document revision history lives. Most source systems already keep it, and duplicating it is both expensive and a second thing that can disagree.
- How a configuration change is recorded as a new state, given that re-segmenting or re-encoding changes every unit without changing a single document.
- How long states are retained, and how that interacts with erasure obligations — because a retained prior state is a copy of content that a deletion must also reach.
- Whether the state identifier is carried onto the answer, since the record is useless if it cannot be joined to the thing it explains.
Failure modes
- An answer from six months ago cited a passage that has since been rewritten, and nothing recorded what the passage said, so the dispute cannot be resolved either way.
- The encoder was upgraded with no index-level record of when, so a quality regression cannot be dated and the investigation has nothing to correlate against.
- An evaluation suite and the production path both read "the index", the corpus changed between them, and a configuration comparison silently measured content drift.
- Prior states are retained for audit, a deletion request is executed against the live corpus only, and the removed content remains in every retained state.
- Two services pin different states after a partial rollout, and the same question receives contradictory answers with no mechanism to detect it.
- Retained index generations accumulate because nobody owns their expiry, and storage cost grows until the retention policy is set by a budget alarm.
- The state identifier exists on the index but never reaches the answer record, so the join that would explain an old response cannot be made.
- A pinned state is kept alive for an audit far longer than planned, and it is still running an encoder and a schema the rest of the system has moved past.
Related capabilities
- Knowledge Freshness — how far behind the current state is, rather than which state it is
- Incremental Indexing — produces the generations this capability identifies and retains
- Citation and Grounding — a citation only resolves if the state it pointed into is recoverable
- Data Deletion Propagation — must reach retained states, not only the live one
- Retrieval Evaluation — comparisons are only valid against a known, fixed state
Applies: Production readiness · Design questions