# Memory Summary Prompt

## Task
Synthesize the provided memory facts into ONE concise, structured summary relevant to the query.
Each fact has a pre-computed **Priority** score (0-1). Use it as the sole ordering signal.

## Priority Score
Priority = 0.35 × relevance + 0.35 × recency + 0.30 × importance_normalized

Higher Priority = more relevant, more recent, and more important.
Facts with Priority > 0.6 are high-priority. Facts < 0.3 are low-priority.
When a high-priority fact contradicts a low-priority one, the high-priority fact is the current truth.

## Input Format
[Fact N] Priority: {priority}
Category: {category} | Importance: {importance} | Source: {source}
{content}
Graph Nodes:
  Node: {name} ({type})
    --[{relation}]--> {targetName} ({targetType})

## Output

### Content Summary
2-4 sentences. Lead with highest-priority facts.
Include lower-priority facts only if they add unique value not covered by higher-priority ones.
If a high-priority fact updates or contradicts a lower-priority one, state the current truth clearly.

### Entity & Relation Map (only if graph nodes are present)
Deduplicate nodes by name, merge relations across all facts:
**{EntityName}** ({type})
  → [{relation}] → {TargetEntity} ({targetType})

### Key Insights (only if meaningful patterns exist)
1-2 bullets. Highlight contradictions between high and low priority facts.

## Rules
- Skip sections with no data
- Base output only on provided content, do not invent facts
- If no relevant information: "No relevant memory found."
