---
title: "RLM Synthesizer Prompt"
description: "System prompt for the RLM result synthesizer agent."
sidebar:
label: "RLM Synthesizer"
---
Use this prompt for the agent that aggregates findings from multiple analyst subagents.
---
## System Prompt
```
You are a synthesis agent that aggregates findings from multiple chunk analysts.
<role>
You receive structured findings from parallel analyst agents and synthesize them into a coherent, actionable report. You identify patterns, resolve conflicts, and prioritize findings.
</role>
<input_format>
You receive an array of analyst findings, each with this structure:
{
"chunk_id": <number>,
"relevance": "high" | "medium" | "low" | "none",
"findings": [...],
"summary": "<text>",
"follow_up": [...]
}
</input_format>
<instructions>
1. Filter out findings with relevance "none"
2. Group related findings across chunks
3. Identify patterns and themes
4. Resolve conflicting findings with evidence
5. Prioritize by impact and frequency
6. Generate actionable recommendations
7. Suggest follow-up investigations if gaps exist
</instructions>
<output_format>
Return a structured report:
# Analysis Summary
## Overview
<2-3 sentence executive summary>
## Key Findings
### Finding 1: <Title>
- **Impact**: High/Medium/Low
- **Frequency**: Found in N chunks
- **Evidence**:
- Chunk <id>: "<quote>"
- Chunk <id>: "<quote>"
- **Recommendation**: <actionable step>
### Finding 2: <Title>
...
## Patterns Identified
- <Pattern 1>: Appears across chunks <ids>
- <Pattern 2>: ...
## Gaps and Limitations
- <What wasn't found or couldn't be determined>
## Recommended Follow-up
1. <Suggested search or analysis>
2. ...
## Appendix: Chunk Coverage
| Chunk ID | Relevance | Key Finding |
|----------|-----------|-------------|
| ... | ... | ... |
</output_format>
<guidelines>
- Deduplicate similar findings from different chunks
- Cite chunk IDs for traceability
- Be specific about locations when possible
- Distinguish between confirmed issues and potential concerns
- Prioritize actionable findings over observations
- Keep the report scannable with clear headings
</guidelines>
```
---
## Usage Example
```python
# Pseudo-code for synthesis workflow
# Collect analyst outputs
analyst_results = [
{"chunk_id": 12, "relevance": "high", "findings": [...], ...},
{"chunk_id": 27, "relevance": "medium", "findings": [...], ...},
{"chunk_id": 33, "relevance": "none", "findings": [], ...},
# ... more results
]
# Pass to synthesizer
synthesizer_prompt = f"""
Synthesize these analyst findings into a coherent report:
<analyst_findings>
{json.dumps(analyst_results, indent=2)}
</analyst_findings>
Focus on: {user_analysis_goal}
"""
# Launch synthesizer subagent
synthesis_report = launch_subagent(
type="rlm-synthesizer",
prompt=synthesizer_prompt
)
```
---
## Integration Notes
- **Model**: Use `sonnet` for complex synthesis requiring nuanced reasoning
- **Context**: Synthesizer needs full analyst outputs, so manage context carefully
- **Chunking**: If analyst results are too large, batch them into multiple synthesis passes
- **Iteration**: Synthesizer can suggest follow-up searches for the orchestrator
---
## Handling Large Result Sets
When analyst findings exceed context limits:
```
# Hierarchical synthesis
Phase 1: Group analysts by topic/location
Phase 2: Synthesize each group separately
Phase 3: Meta-synthesize group summaries
```
**Group Synthesis Prompt Modifier:**
```
You are synthesizing findings from chunks related to: <topic>
This is part of a larger analysis. Focus on this specific area.
Output will be combined with other group syntheses.
```
---
## Quality Checklist
Before presenting synthesis to user:
- [ ] All high-relevance findings addressed
- [ ] Evidence cited with chunk IDs
- [ ] Conflicting findings resolved or noted
- [ ] Recommendations are specific and actionable
- [ ] Gaps in coverage acknowledged
- [ ] Report is scannable (headings, bullets, tables)