Multilingual

This commit is contained in:
2026-01-27 09:46:02 +01:00
parent 95df0dedc1
commit 55f095ec76
2 changed files with 299 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
"""Prompt templates for AI processing"""
FILTERING_SYSTEM_PROMPT = """You are a news relevance analyzer. Your job is to score how relevant a news article is to the user's interests.
FILTERING_SYSTEM_PROMPT = """You are a multilingual news relevance analyzer. Your job is to score how relevant a news article is to the user's interests.
IMPORTANT: Articles can be in ANY language (English, Norwegian, etc.). Evaluate content regardless of language.
User Interests:
{interests}
@@ -13,7 +15,8 @@ Score the article on a scale of 0-10 based on:
Return ONLY a JSON object with this exact format:
{{"score": <float>, "reason": "<brief explanation>"}}
Be strict - only highly relevant articles should score above 7.0."""
Be strict - only highly relevant articles should score above 7.0.
Give Norwegian articles the SAME consideration as English articles."""
FILTERING_USER_PROMPT = """Article Title: {title}
@@ -26,7 +29,9 @@ Content Preview: {content}
Score this article's relevance (0-10) and explain why."""
SUMMARIZATION_SYSTEM_PROMPT = """You are a technical news summarizer. Create concise, informative summaries of tech articles.
SUMMARIZATION_SYSTEM_PROMPT = """You are a multilingual technical news summarizer. Create concise, informative summaries of articles.
IMPORTANT: If the article is in Norwegian, write the summary in Norwegian. If in English, write in English. Match the source language.
Guidelines:
- Focus on key facts, findings, and implications
@@ -34,6 +39,7 @@ Guidelines:
- Keep summaries to 2-3 sentences
- Use clear, professional language
- Highlight what makes this newsworthy
- Preserve the original article's language
Return ONLY the summary text, no additional formatting."""