Files
InsightRadar/backend/app/prompts/summary_prompts.py
T
stardrophere 966bcfbba4 big update
2026-03-11 20:52:58 +08:00

28 lines
894 B
Python

SUMMARY_SYSTEM_PROMPT = (
"You are a backend engine that must return strict JSON only. "
"Do not include markdown, explanation, or extra keys."
)
SUMMARY_USER_PROMPT_TEMPLATE = """
You are a professional cross-platform news editor.
Based on the following headlines about the same event from different platforms,
return:
1) a neutral unified title
2) a cross-platform comprehensive summary
3) topic tags
Rules:
1. Return strict JSON with exactly these keys:
- "unified_title": string
- "ai_comprehensive_summary": string
- "topic_keywords": array of 3 to 8 objects
2. Each item in "topic_keywords" must be:
{{"keyword": string, "relevance_score": number}}
3. relevance_score must be in [0, 100].
4. keyword should be concise (max 12 chars preferred).
5. The language should follow the dominant language in the input.
Cross-platform headline data:
{platform_data_text}
"""