Prompt LibraryEngineering

Context Staleness Detector Prompt

Detect when cached context is stale and must be refreshed.

The prompt

Given the cached context below and the current task, detect staleness:
- Is any timestamp older than the freshness requirement for its source type?
- Does any chunk reference a state that may have changed (a price, a status, a count)?
- Is the current task asking about something time-sensitive the cache doesn't cover?
For each stale item, state the refresh action (re-fetch, re-embed, or invalidate).

Current task: {{task}}
Cached context:
{{context}}

Replace the {{fields}} with your own context and tighten the rules to match your domain.

Share this prompt