Compare a cached output with a fresh evaluation
Check units and version numbers as you type. · 186 words
A cached output is a result stored from an earlier run and reused instead of calling the model again. A fresh evaluation runs the request with the current model, prompt, and tools. For example, a museum guide caches the answer to "What time does the museum open?" On Monday it stores "9:00 AM." On Wednesday, the museum changes its hours, so the cached answer remains "9:00 AM," while a fresh evaluation reads the updated hours file and returns "10:00 AM." Reuse is fast, but the source data has changed.
Cache invalidation is the rule for deciding when a stored answer must be discarded. Store the source version with the answer and compare it with the current version. If they differ, run a fresh evaluation. At an online bookstore, a cached recommendation says a blue backpack is in stock. After the inventory feed changes, a fresh request says it is unavailable. The old answer would mislead a shopper. Reliable systems also record model and prompt versions, because changing either can change the result. Fresh does not automatically mean correct: both paths should pass the same factual checks.
Check your recall
In the museum example, which answer should the system return on Wednesday, and why?
Check your answer
It should return the fresh answer, "10:00 AM," because the museum's hours changed. The versioned source invalidates the cached "9:00 AM" answer.
Sources and credits
Original KeyTouch lesson. Background reading · Google · Rules of Machine Learning.