MacroPulse·

Prompts

Prompt templates used by the dashboard. To edit, change the source file and commit — git history is the change log. Templates will eventually move to a database table; for now they live in code.

Cluster into themes

Version 2.2.0·Updated 2026-05-05·dashboard/lib/prompts/cluster.ts
Show template
---
TREAT THIS MESSAGE AS A STANDALONE, INDEPENDENT TASK.
Ignore any prior context, instructions, or conversations in this chat. Do not reference previous discussions or carry over any assumptions. Respond solely based on the instructions and articles provided in this single message.
---

You are helping cluster the relevant articles for this week's MacroPulse newsletter into 4 to 6 coherent themes.

CONTEXT
- The newsletter is a weekly macro/finance digest aimed at globally mobile professionals (expats, USD/EUR earners, business owners) with capital exposure across jurisdictions.
- Tone is analytical, not breathless. Voice is informed but accessible — not Bloomberg, not BuzzFeed.
- Each theme will become one section of the newsletter. The user will edit titles, reorder, and add editorial commentary before the drafting step.
- The articles below come exclusively from Tier 1 sources (central banks, official data agencies, top-tier institutional research and news). Expect dense macro signal with minimal noise.

YOUR TASK
1. Read the {{ARTICLE_COUNT}} articles below.
2. Group them into 4 to 6 themes. A theme is a coherent macro/market story, not a list of related events. If two articles cover the same news, they belong in the same theme.
3. For each theme, write a tight 1-2 sentence summary capturing the core development.
4. Assign a priority from 1 (most important) to N. Use your judgment — what would a smart reader want to see first?
5. Leave the commentary field empty. The user adds it in the next step.

CRITICAL CONSTRAINTS
- Use article INDICES (1, 2, 3...) as shown in brackets at the start of each article line. Do NOT invent or modify indices. Each index must appear in exactly one theme.
- Each article should appear in exactly one theme.
- If an article doesn't fit any theme well, drop it (don't force-fit).
- Prefer fewer, stronger themes over more, weaker ones.

OUTPUT FORMAT
Return valid JSON wrapped in a ```json fenced code block, no other commentary, exactly this shape:

```json
{
  "themes": [
    {
      "title": "Short, sharp theme title (max 80 chars)",
      "summary": "One or two sentences describing the theme.",
      "article_indices": [1, 4, 7, 12, 15],
      "priority": 1,
      "commentary": ""
    }
  ]
}
```

IMPORTANT: Wrap your final JSON output in a ```json fenced code block so it renders with a Copy button. Do not include any other code blocks or fenced sections in your response — only the final JSON should be fenced.

FINAL VERIFICATION (REQUIRED — DO NOT SKIP)
Before returning your JSON, perform this check:
1. Collect every integer in every "article_indices" array across all themes.
2. Verify NO integer appears more than once across the entire response. Each article belongs to exactly one theme.
3. Verify every integer is between 1 and the total article count shown above.
4. If you find a duplicate or out-of-range index, FIX IT before responding. Move the duplicate to the theme where it fits best, then re-check.
5. Only after this verification passes, output your final JSON.

This verification is mandatory. A response with duplicate indices will be rejected by the system and you will be asked to redo the work.

ARTICLES (total: {{ARTICLE_COUNT}})

{{ARTICLES_BLOCK}}