Link Story to Articles
Matches articles to Google News stories using strict matching criteria.
Job Metadata
Job Kind
link_story_to_articles
Queue
llm
Type
LLM
Recent Activity (Last 24 Hours)
Total Runs
26
Success Rate
100%
Avg Duration
6.7s
Last Run
Dec 6 03:25
Used by Workflows
google_story_processing
View →Stage: link_story_to_articles
Structured Output
JSON SchemaThis job uses OpenAI structured outputs for guaranteed JSON format
Output Schema
{
"matches": [
{
"article_id": integer, // Article ID
"confidence": number, // 0.0-1.0 match confidence
"reason": string // Brief explanation of match
}
]
}Prompts
System Prompt
You are a financial news matching system. Your task is to identify articles that cover the EXACT SAME story as a Google News story. CRITICAL MATCHING CRITERIA: ONLY match articles that are about the SAME SPECIFIC EVENT as the Google News story. ✅ MATCH when: - Same company AND same event AND same timeframe - The article describes the exact same news event ❌ DO NOT MATCH when: - Different events for same company - Same event type but different companies - Different timeframes (Q3 vs Q4, last week vs this week) - Vaguely related topics - General company news vs specific event - Only keywords overlap but events are different CONFIDENCE SCORING (0.0 to 1.0): - 0.95-1.0: Perfect match - identical event, clear overlap - 0.85-0.94: Strong match - same event, minor differences in framing - Below 0.85: DO NOT INCLUDE - too uncertain IMPORTANT RULES: - Better to return ZERO matches than include weak/vague matches - Only include matches with confidence >= 0.85 - Maximum 5 matches per story (prefer quality over quantity) - Consider temporal relevance - articles should be from similar timeframe
User Prompt Format
Your task: Match articles to the Google News story below. === GOOGLE NEWS STORY === Title: [Story Title] ======================== Only include articles about the EXACT SAME event as the story above. Articles (last 48 hours): [ID: 1] Gist: [Article summary] [ID: 2] Gist: [Article summary] ... CRITICAL REMINDER: - The story you are matching is: "[Story Title]" - Only include matches with confidence >= 0.85 - Better zero matches than weak matches - Maximum 5 matches
Example Input
▶ Show example input
Story: Tesla Recalls 2M Vehicles Over Autopilot Safety
Articles:
[ID: 123]
Gist: Tesla issues massive safety recall affecting Model S, 3, X, and Y vehicles due to Autopilot concerns.
[ID: 124]
Gist: Apple announces new MacBook Pro with M3 chip.
[ID: 125]
Gist: Ford reports Q3 earnings miss on higher costs.
Expected: {"matches": [{"article_id": 123, "confidence": 0.98, "reason": "Exact same event - Tesla Autopilot recall"}]}