Practical thinking about AI tools and everyday work.

An AI context cache needs the same source version as the task

A document reviewer compares two versions of a file at a laptop.
AI-generated photographic illustration; not documentary photography.

A team asks an AI system several questions about the same long document. Reusing cached input can reduce repeated processing. But if the document changes, an answer based on the earlier cached content may still describe the earlier version perfectly.

The problem is not necessarily a hallucination. The system may have been given the wrong evidence for the current task.

Google’s Gemini caching API reference describes cached content and marks the content of an explicit cache resource as immutable, while allowing its expiration to be updated. Availability depends on the model and API. The operational lesson is to distinguish extending a cache’s lifetime from replacing the material it contains.

Give the source a version identity

For a fictional supplier handbook workflow, record the document identifier, revision date and a content hash or other reliable version reference alongside the cached resource. Include any preprocessing version if pages were extracted or transformed before use.

When the handbook is revised, decide explicitly whether the next question concerns the old edition or the new one. A filename such as “handbook-final.pdf” is weak evidence because someone may overwrite it without changing the name.

The application should select the matching context, create a replacement where required and handle an expired or missing cache without silently substituting unrelated material. A cache hit is a processing event, not a statement that the source is current.

Test a small, harmless revision before relying on the workflow. For example, change an invented delivery-window sentence in a test document and ask a question whose answer depends on it. Confirm which source version the request used and inspect the answer against that version.

Keep this test separate from checking factual accuracy. Correct source selection does not guarantee that the model will interpret the document correctly; normal review still applies.

Also apply the service’s data-handling and access requirements to cached material. Reuse should stay within the permissions for the original document.

A useful result record identifies both the answer and the source version behind it. That makes a later correction understandable: the team can distinguish an outdated context from a faulty extraction or an unsupported conclusion.