The prompt
## Memory Consolidation
The following fact categories have accumulated many individual entries.
Review each group and identify facts that can be synthesized into a single,
richer consolidated fact that preserves all key information.
{consolidation_groups}
For each group, decide:
- CONSOLIDATE: Multiple facts can be merged into one richer fact.
Specify the source fact IDs and the consolidated content.
- SKIP: Facts are distinct enough to remain separate.
Add consolidation decisions to "factsToConsolidate" in your output JSON.
Each entry: {"sourceIds": ["fact_id_1", "fact_id_2"], "consolidated": {"content": "...", "category": "...", "confidence": 0.9, "scope": "user|thread|project", "durability": "durable|temporary", "authority": "descriptive|transactional"}}
Rules:
- The consolidated fact must preserve ALL key details from source facts
- Only consolidate facts that describe the same aspect of the user
- Classify every consolidated fact. It is eligible only when it is user-scoped, durable, descriptive, and safe to inject into unrelated future threads.
- Confidence of consolidated fact = max of source confidences
- Be conservative - when in doubt, keep facts separate
- Maximum {max_groups} consolidation groups per cycle What it is
A prompt section from DeerFlow's memory backend for fact categories that have piled up many entries: for each group decide CONSOLIDATE or SKIP, list the source fact IDs with one merged fact that keeps every key detail, classify its scope, durability and authority, and keep facts separate 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 memory stores fill up with near-duplicate facts
قسم برومبت من نظام الذاكرة في DeerFlow لفئات الحقائق التي تراكمت فيها مدخلات كثيرة: يقرر لكل مجموعة الدمج أو التخطي، ويذكر معرّفات الحقائق المصدر مع حقيقة مدموجة واحدة تحفظ كل التفاصيل المهمة، ويصنّف نطاقها ودوامها وصلاحيتها، ويُبقي الحقائق منفصلة عند الشك.
Tips
- In DeerFlow this text is a section inserted into the memory update prompt ({consolidation_section} in memory_update.chat.yaml), so "your output JSON" means that prompt's JSON reply.
- {consolidation_groups} holds the groups of facts and {max_groups} caps how many groups may be consolidated per cycle.
- The confidence of a merged fact is the highest confidence among its sources.