skip to content

Why should a RAG assistant tell users when a cited source is behind, and what must its ingestion pipeline record to do that?

level: juniorimportance: should knowfreq 35%

answer

  1. stale reads as fluently as fresh
  2. per-source time, not per-job time
  3. every change confirmed up to when
  4. chunk keeps its source's modified time

basics

~20 s

A stale answer reads as fluent and well cited as a fresh one, so users rarely spot it. The pipeline must record, per source, the time up to which changes are confirmed indexed, and per chunk its source's modified time.

solid answer

~40 s

Similarity search cannot tell a current chunk from one whose source page changed an hour ago: both score well and both get cited, so a stale answer looks exactly like a right one. The fix is to make the lag visible. Keep a per-source **synced-through time**, the moment up to which every source change is confirmed retrievable, not the time the last job started, plus each chunk's `source_modified_at` and `indexed_at`. Show the synced-through time beside each cited source, and when a source is past its lag target, say so plainly: "the incident queue is 40 minutes behind; recent updates may be missing". The same notice matters when nothing is found, because a ticket opened ten minutes ago may simply not be indexed yet.

code

json · 9 lines
json
{
  "_note": "illustrative per-source sync status; field names are invented",
  "source": "incident-queue",
  "synced_through": "2026-03-02T09:10:00Z",
  "oldest_unapplied_change_at": "2026-03-02T09:10:04Z",
  "lag_target": "PT5M",
  "checked_at": "2026-03-02T09:50:00Z",
  "status": "behind"
}

go deeper

for a junior

Recall that a stale chunk retrieves and cites as well as a fresh one, so the system, not the user, has to show how current each source is.

for a middle

Explain the difference between a synced-through time and a last-run time, and which fields each chunk and each source must carry for the notice to work.

for a senior

Show how a stuck change holds the synced-through time back, when a visible notice is raised, and why an empty result needs the same honesty about lag.

for a principal

Weigh notice fatigue against silent staleness, and tie the visible warning to each source's own lag target rather than to one rule for the whole assistant.

## What source-to-index freshness lag is **Freshness lag** is the time between a change in a source system and the moment the changed text is **retrievable** as chunks in an assistant's retrieval index. The change might be a page edited in a team wiki, a ticket updated in an incident queue or a file merged into a code repository. Every ingestion pipeline has some lag: it has to notice the change, fetch and parse the document, embed the new chunks and write them to a vector store. Until all of that finishes, the index still holds the old text, and every answer built on it reflects the old version of the source. ## Why a stale answer looks right Similarity search cannot tell old text from new. A chunk is retrieved because its vector is close to the query's vector, and the similarity score knows nothing about whether the source page has changed since the chunk was written. So a stale chunk: - scores just as well as it did yesterday; - gets cited with the same source title and link; - produces an answer that is fluent, specific and confident. Nothing in the answer signals the problem. A user would have to open the source and compare it line by line, which few people do for an answer that reads well. That is why freshness has to be made **visible by the system** rather than left for users to notice, and why interviewers ask about it: a pipeline that silently lags produces answers that look correct and are not. ## What the pipeline must record | Record | Kept per | Meaning | |---|---|---| | `synced_through` | source | every change in the source up to this time is confirmed retrievable | | `source_modified_at` | chunk | when the source document this chunk came from last changed | | `indexed_at` | chunk | when this chunk was written to the index | | `lag_target` | source | how far behind this source is allowed to fall | The per-chunk fields let an answer say "this paragraph reflects the handbook as of 09:10". The per-source field answers the harder question: which changes might the index **not have yet**? Both are needed. A chunk's own timestamps can be recent while other changes from the same source are still waiting in a queue. ## Synced-through time is not the last run time The most common mistake is to show the time the last sync job ran. That value says the pipeline tried, not that it caught up: 1. A job can start, fail halfway and leave half the changes unindexed. 2. A job can finish detecting changes while their chunks still wait in the embedding queue. 3. A job can succeed on most documents and skip a few it could not parse. `synced_through` should advance only when every change the pipeline observed up to that time has been written and is searchable. If one change is stuck, the time stays at the moment before that change, and the source correctly shows as behind. Comparing `now - synced_through` with the source's `lag_target` gives the flag the user sees. ## What to show the user - **Quietly, always:** next to each cited source, its synced-through time ("HR handbook, synced 2 hours ago"). - **Visibly, when it matters:** a short notice when a cited or in-scope source is past its lag target ("the incident queue is 40 minutes behind; recent updates may be missing"). - **On empty results:** when nothing is found, say how recent the index is before implying the thing does not exist; a ticket opened five minutes ago may simply not be indexed yet. - **Not on every line:** a warning on every answer trains users to ignore it, so reserve the visible notice for sources that are actually past their target. Per-source rather than global times matter because sources fall behind independently: the code repository may be current while the polled handbook is hours old. One "index updated at" time for the whole assistant hides exactly the source that is late. ## Where this stops How citations are formatted and attached to spans of an answer is covered with grounding and attribution. Ranking newer chunks higher at query time is covered with retrieval filtering. Alerting on lag through a formal service-level objective is covered with search-index builds. This topic keeps knowing how far behind each source is and telling the user so.

  • Why is the time the last sync job ran a misleading last-synced value?
    A run time says the pipeline tried, not that it caught up. The job may have failed partway, skipped documents it could not parse, or detected changes whose chunks still wait in the embedding queue. A synced-through time advances only when every change observed up to it has been written and is searchable, so one stuck change correctly holds the source back.
  • Should every answer carry a visible staleness warning?
    No. A warning on every answer trains users to ignore it. Show each cited source's synced-through time quietly in its details, and raise a visible notice only when a cited or in-scope source is past its lag target, or when an empty result could just mean the newest content is not indexed yet.

  • High retrieval scores mean the retrieved chunk is current.
  • The last time the sync job ran is the last-synced time.
  • Users will notice stale answers because they look wrong.
  • One global index-updated time is enough for every source.
  • An empty result proves the asked-about item does not exist.