Rachis

How to fix stale answers after a document update

28 November 2026

After you update or delete a document, your application can keep answering from the old version. If the change never reached the index, the structure your application searches, search still finds the old passages and they go into the request built for the model. Check the index first, before changing how the model answers.

Synchronization (sync) is the step that brings source changes into the index. The fixes are to compare source and index after every sync, give each document a stable identifier and update and delete by it, and filter by version where several versions must stay searchable.

Check what search still returns

Search for wording that appears only in the old version, and check which document and version each returned passage comes from. Then ask a question the change affects. Record which passages reached the request, along with the answer and its citations; the answer alone cannot show which stage failed.

Test deletion separately. A RAGFlow user reported that passages from deleted files, especially PDFs, remained retrievable after repeated deletion and re-uploading. A reply says this is a known issue when files are deleted while being parsed, and the page lists a merged fix.

Removal can also lag. In OpenAI's vector stores, which hold numerical representations of text for search by meaning, search can return content from a removed file for a short period. Search again later before treating removal as complete.

Compare the searchable documents with the source

After each sync, compare source and index by count and by stable document identifier, a value that identifies the same source document even when its contents change.

Check additions first. One RAGFlow user reported Google Drive sync runs that logged success with 0 new docs while new files never appeared in the dataset; the page lists a merged fix.

Then check updates. Another RAGFlow user reported that automatic WebDAV sync applied deletions but did not add new files or update modified ones. A reply said a Python connector fix was coming, and the page lists it as merged. The same failure in RAGFlow's Go syncer, reported separately, was still open on 28 November 2026.

Check for duplicates too. In a RAGFlow report on Confluence sync, a page attachment could sync as two files, one under the original attachment name and one under the complete file path. The merged fix makes RAGFlow always use the full hierarchical path in Confluence attachment and page identifiers, so one file keeps one identifier.

Avoid importing during a reindex, a rebuild of the index, if your system documents that risk. On Hacker News, one person reported some data loss while importing into Hister, a private search index, because a reindex was running concurrently. They pointed to a to-do note in Hister's code about storing new documents in both indexes during a reindex.

Match each update to the existing document

Use the stable identifier for updates and deletions. LlamaIndex lets you update a document already in an index by giving it the same identifier. Deleting by identifier removes all of the document's passages from most index structures; the tree index currently does not support it.

LlamaIndex's ingestion pipeline replaces a changed document only when a document store and a vector store are both attached. The document store keeps each document's identifier with a hash, a short value computed from its content that changes when the content does.

A known identifier with a changed hash is then reprocessed and inserted or replaced. Without a vector store, the pipeline can only detect and remove duplicate inputs.

Limit which old documents get removed

LangChain's index() indexes documents by their hashes and does not let you set a document's identifier. Its cleanup mode decides which stored documents a run removes; the default, None, deletes nothing. Source IDs come from source_id_key, an optional key that helps identify a document's original source.

incremental and scoped_full remove documents not updated during the run, but only for source IDs seen in that run. incremental cleans up continuously, which reduces visible duplicates; scoped_full suits loaders unable to return the entire dataset at once.

full removes every document not supplied during the run. Use it only with the entire dataset: partial input can delete documents you meant to keep. Cleanup follows indexing, so duplicates can be visible during the run.

Choose the version that applies to the question

A question about a past date can need an older version, so that version must stay searchable. Metadata is information stored with a document's text, such as its version. The document preparation guide covers fields to preserve with each passage.

Then filter by version. A filter restricts search to documents whose metadata meets set conditions. OpenAI's retrieval API lets you select files by their attributes before searching by meaning. Store versions and applicable dates as attributes, and search only those that apply on the date the question is about.

Azure AI Search applies filters only to fields marked filterable; an existing field cannot be made filterable, so you add a field or rebuild the index.

These studies test date filtering and model behavior with outdated documents in the request. Neither tests whether updates or deletions reach the index.

A 2026 study of synthetic, expert-validated German statute questions tested retrieval that filters statute versions by the date of each question's facts. On a subset of questions, removing that filter caused a substantial drop in accuracy; the paper gives no figure.

In a 2026 benchmark, an outdated document in the request overturned 30% of Llama's and 37% of Qwen's otherwise correct answers, without instructions to trust it.

In a separate test on law and medicine questions, a re-ranker, a step that reorders search results, chose among one current and two outdated documents by relevance and recency. For Qwen-7B and GPT-4o, it reduced overturned answers when dates were accurate; the benefit became small when dates were absent and could reverse when they were wrong.

Repeat the update and deletion test

Update one document, delete another, and run the checks above after each sync: compare source and index, search for wording only the old version contains, and rerun the questions whose answers changed.

Keep these questions with checked answers and source passages in your document-answer test set. Repeat them after changes to synchronization, indexing or version filters.

Where Rachis fits

Keeping answers aligned with changing documents means managing updates across the pipeline. Connect your app to the Rachis API. Rachis handles document processing, retrieval and answer generation as one pipeline and returns the results. You build your application, not the plumbing underneath it.

Join the waitlist: one email when there is something to try.

Read the pain map: Retrieval and citations.