Link Article to Stories

Matches an article to active Google News stories using strict matching criteria.

Job Metadata

Job Kind
link_article_to_stories
Queue
llm
Type
LLM

Recent Activity (Last 24 Hours)

Total Runs
16
Success Rate
100%
Avg Duration
185ms
Last Run
Dec 6 02:54

Used by Workflows

benzinga_article_processing
Stage: link_article_to_stories
View →

Structured Output

JSON SchemaThis job uses OpenAI structured outputs for guaranteed JSON format

Output Schema

{
  "matches": [
    {
      "article_id": integer,   // Story ID (field named article_id for compatibility)
      "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 Google News stories that cover the EXACT SAME event as an article.

CRITICAL MATCHING CRITERIA:

ONLY match stories that are about the SAME SPECIFIC EVENT as the article.

✅ MATCH when:
  - Same company AND same event AND same timeframe
  - The story 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 article (prefer quality over quantity)
- Consider temporal relevance - stories should be from similar timeframe

User Prompt Format

Your task: Match the article gist below to active Google News stories.

=== ARTICLE GIST ===
[Article gist summary]
====================

Only include stories about the EXACT SAME event as the article above.

Google News Stories (currently active):

[ID: 1]
   Title: [Story Title]

[ID: 2]
   Title: [Story Title]
...

CRITICAL REMINDER:
- The article gist you are matching is shown above
- Only include matches with confidence >= 0.85
- Better zero matches than weak matches
- Maximum 5 matches

Example Input

▶ Show example input
Article Gist: Tesla issues massive safety recall affecting Model S, 3, X, and Y vehicles due to Autopilot concerns.

Stories:

[ID: 456]
   Title: Tesla Recalls 2M Vehicles Over Autopilot Safety

[ID: 457]
   Title: Apple Announces New MacBook Pro with M3 Chip

[ID: 458]
   Title: Ford Reports Q3 Earnings Miss

Expected: {"matches": [{"article_id": 456, "confidence": 0.98, "reason": "Exact same event - Tesla Autopilot recall"}]}