RAG and Knowledge Engineering

RAG and Knowledge Engineering

Knowledge Freshness

58 of 81 in this book · 4 min read

What it is

Treating the age of what a retrieval system knows as a measured, bounded property rather than an assumption: a stated maximum interval between a change in a source and that change being retrievable, instrumentation that reports the realised interval per source, and defined behaviour for answers drawn from material that has exceeded it.

Why it is not incremental indexing

Updating an index without rebuilding it is a mechanism; this is the target, the measurement and the response to missing it. The two come apart in both directions. A pipeline with excellent incremental update applied to a connector that polls weekly has a week of lag, and the mechanism is blameless. A small corpus rebuilt in full every night meets a twelve-hour commitment with no incremental capability at all. What belongs here is knowing the number, proving it, and deciding what the product does when it is exceeded.

Why it matters

A stale answer is more damaging than no answer, because it is indistinguishable from a current one. A support agent quoting a withdrawn policy, a sales answer citing last quarter's pricing, an engineer following a runbook that was corrected after the outage — none of these look like failures to anyone in the conversation. Retrieval systems are also unusually good at hiding staleness: the superseded document is often longer, better written and more thoroughly indexed than its replacement, so it outranks it. And the most dangerous case is silence. A connector that stopped three weeks ago produces exactly the same observable behaviour as a source where nothing has happened, unless something is deliberately watching for the difference.

Key decisions

  • What is measured. The only honest metric is the interval from a change at the source to that change being retrievable, observed end to end; job success rates and processing durations are proxies that stay green through the failures that matter.
  • Whether targets are per source. A policy library and a ticket queue have different change rates and different consequences for staleness, and one global number serves neither.
  • What the product does with material past its target: serve it unchanged, serve it with its age disclosed, suppress it, or fall back to a live lookup against the source.
  • Whether an age is carried on every retrieved unit and exposed to the answer layer, since a model cannot hedge about recency it was never told.
  • How a source that has stopped changing is distinguished from a source that has stopped being read — which requires a positive liveness signal rather than an absence of errors.
  • Whether superseded material remains retrievable at all, and if so how it is marked so it does not compete with its replacement.
  • Whether freshness and availability are traded deliberately during a rebuild, rather than by accident.

Failure modes

  • Lag is inferred from pipeline run duration, so a connector returning zero changes because its credential expired reports perfect freshness indefinitely.
  • Canary documents are planted in one source only, and the sources without them are the ones that silently stop.
  • The average lag is comfortable and the tail is weeks, because large or expensive documents are repeatedly deferred to the back of the queue and nobody reports the maximum.
  • No age is stored on retrieved units, so an answer cites a policy superseded in 2022 with the same confidence as one updated last week.
  • A superseded version outranks its replacement because it is longer and matches more query terms, and both remain in the corpus with nothing marking the relationship.
  • A freshness commitment is made to customers in a contract, and nothing in the system measures whether it is met.
  • A full rebuild removes documents from the serving index for the hours it runs, so the corpus is simultaneously at its freshest and least available.
  • The lag is measured for ingestion but not for permission changes, so entitlement is far staler than content and nobody is tracking it.

Related capabilities


Applies: Production readiness · Design questions