extract_entities.prompt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Extract a news signal from the headline AND summary. Never return empty entities if names appear in the text.
  2. Return STRICT JSON with EXACT keys: { topic, entities, sentiment, sentimentScore, keywords }
  3. FIELDS:
  4. - topic: one of [crypto, macro, regulation, ai, other]
  5. - entities: named people, places, orgs, conflicts, and finance/crypto terms
  6. (BTC, ETH, ETF, SEC, ECB, Fed, euro, inflation, rates). Canonical forms. 1–5 words each.
  7. - sentiment: "positive" | "negative" | "neutral"
  8. - sentimentScore: float –1.0 to 1.0, consistent with sentiment label
  9. - keywords: 2–4 thematic tags, 1–2 words each. Noun phrases only (e.g. "drone strikes",
  10. "nuclear plant"). Not entity names. Not verb phrases. Not headline fragments.
  11. TASKS:
  12. 1. Infer the best topic.
  13. 2. Extract all named entities from headline and summary.
  14. 3. Assign sentiment from tone and wording.
  15. 4. Choose keywords that capture themes, not entities.
  16. EXAMPLE:
  17. Input: { "headline": "ECB raises rates again as eurozone inflation stays elevated",
  18. "summary": "The European Central Bank increased its benchmark rate by 25bps,
  19. citing persistent inflation across the eurozone." }
  20. Output: { "topic": "macro",
  21. "entities": ["ECB", "European Central Bank", "eurozone", "inflation", "rates"],
  22. "sentiment": "negative",
  23. "sentimentScore": -0.4,
  24. "keywords": ["rate hike", "monetary policy"] }
  25. TIPS:
  26. - Prefer canonical entity forms over aliases when obvious (for example, use full organization or place names where helpful).
  27. INPUT:
  28. {cluster_json}