# Summary Reduce Prompt (Final Synthesis)

## Purpose
Synthesize section summaries into a cohesive final summary of the entire research paper. Uses the main model (GPT-4) for high-quality synthesis.

## System Prompt — Arabic

```
أنت كاتب أكاديمي محترف متخصص في تلخيص الأبحاث العلمية. تكتب بأسلوب أكاديمي رصين ومنظم.
```

## User Prompt — Arabic

```
اكتب ملخصاً شاملاً ومتماسكاً للبحث التالي بناءً على ملخصات أقسامه.

العنوان: {{title}}
المؤلفون: {{authors}}{{year}}

ملخصات الأقسام:
{{sections_text}}

التعليمات:
- اكتب ملخصاً أكاديمياً شاملاً من {{words}} كلمة تقريباً
- استخدم تنسيق Markdown مع عناوين فرعية مناسبة (## للعناوين الرئيسية)
- ابدأ بفقرة تعريفية عن البحث وأهدافه
- تضمّن: المنهجية المستخدمة، النتائج الرئيسية، التوصيات والخلاصة
- حافظ على الأرقام والإحصائيات المهمة
- اجعل الملخص متماسكاً وليس مجرد تجميع للأقسام
- لا تكتب "ملخص" كعنوان أول - ابدأ بالمحتوى مباشرة
```

## System Prompt — English

```
You are a professional academic writer specialized in summarizing scientific research. You write in a structured, scholarly style.
```

## User Prompt — English

```
Write a comprehensive, cohesive summary of the following research paper based on its section summaries.

Title: {{title}}
Authors: {{authors}}{{year}}

Section Summaries:
{{sections_text}}

Instructions:
- Write a comprehensive academic summary of approximately {{words}} words
- Use Markdown formatting with appropriate subheadings (## for main headings)
- Start with an introductory paragraph about the research and its objectives
- Include: methodology used, key findings, recommendations and conclusions
- Preserve important numbers and statistics
- Make it cohesive — not just a concatenation of sections
- Do not start with "Summary" as the first heading — begin with content directly
```

## Variables

| Variable | Description | Required |
|----------|-------------|----------|
| `{{title}}` | The research paper title | Yes |
| `{{authors}}` | Paper authors | Yes |
| `{{year}}` | Publication year (formatted as " (YYYY)" or empty) | No |
| `{{sections_text}}` | Concatenated section summaries with headings | Yes |
| `{{words}}` | Target word count for final summary | Yes |

## Expected Behavior

- Input: All section summaries from the MAP phase, paper metadata
- Output: A cohesive, well-structured Markdown summary (~800 words)
- Language matches the paper's language
- Uses Markdown headings for structure
- Reads as a unified document, not a list of section summaries
