The prompt
## Staleness Review
The following facts have reached their individual review window and may no longer
accurately reflect the user's current situation. Each entry shows a ``valid:Nd``
annotation - the number of days this fact was expected to remain valid before
re-evaluation. Use it to calibrate conservatism: a ``valid:30d`` fact was
considered volatile at creation; a ``valid:365d`` fact was considered stable.
<stale_facts>
{stale_facts}
</stale_facts>
For each fact, decide KEEP, REMOVE, or EXTEND:
- KEEP: Still likely valid - even if not mentioned in this conversation.
Stable attributes (native language, core expertise, personality traits) often
remain true indefinitely.
- REMOVE: Outdated, contradicted by recent context, or no longer relevant.
Examples: tech-stack migrations, job changes, relocated offices, abandoned projects.
- EXTEND: Keep but recalibrate the review window (see below).
Add REMOVE decisions to "staleFactsToRemove" in your output JSON.
Each entry must be {"id": "fact_id", "reason": "brief explanation"}.
The reason should cite what signal in the conversation (or absence thereof)
supports the removal.
Optionally, for facts you KEEP and wish to recalibrate, add them to
"staleFactsToExtend" with the number of days from now before the next review:
{"id": "fact_id", "extend_by_days": 365, "reason": "brief explanation"}
Use this when the current window seems miscalibrated - e.g. a core skill marked
``valid:30d`` that is clearly stable, or a goal nearing completion whose window
should shrink. Omit facts whose current window already seems appropriate.
Be conservative - when in doubt, KEEP. Removing a valid fact is worse than
keeping a slightly stale one, because the next review cycle will re-evaluate it. What it is
A prompt section from DeerFlow's memory backend for facts that have reached their review window: for each one decide KEEP, REMOVE or EXTEND, give a reason for every removal that cites a signal in the conversation, optionally set a new number of days before the next review, and keep the fact when in doubt. The repository publishes this prompt without a printed sample of its output. The prompt text comes from the deer-flow repository (MIT License, Copyright (c) 2025 Bytedance Ltd. and/or its affiliates, Copyright (c) 2025-2026 DeerFlow Authors). Licence: https://github.com/bytedance/deer-flow/blob/main/LICENSE. Original author: DeerFlow Authors, Bytedance (bytedance/deer-flow). Changes by FoxaMind: the YAML wrapper (format, version, template) and its two-space indentation removed; .format doubled braces turned back into single braces; {...} placeholders keep the source syntax.
Who it's for
- Developers maintaining long-term memory for assistants
- Teams whose stored user facts go out of date
قسم برومبت من نظام الذاكرة في DeerFlow للحقائق التي حان موعد مراجعتها: يقرر لكل حقيقة الإبقاء أو الحذف أو التمديد، ويذكر لكل حذف سبباً يستند إلى إشارة في المحادثة، ويحدد اختيارياً عدد أيام جديداً قبل المراجعة التالية، ويُبقي الحقيقة عند الشك.
Tips
- In DeerFlow this text is a section inserted into the memory update prompt ({staleness_review_section} in memory_update.chat.yaml), so "your output JSON" means that prompt's JSON reply.
- {stale_facts} lists the facts, each with a valid:Nd note: the number of days it was expected to stay valid.
- The prompt gives its own reason for caution: removing a valid fact is worse than keeping a slightly stale one, because the next review will look at it again.