Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Jan 19, 2026

Summary

  • Fix alert deduplication to check external_url across all perspectives
  • Tighten mentions_agentic detection to require advertising context
  • Add composite index on industry_alerts(channel_id, perspective_id) for query performance

Problem

  1. Spam from duplicates: The same Adweek article was being posted 5+ times because it appeared in multiple RSS feeds. Each feed created a duplicate perspective before the cross-feed deduplication fix.

  2. Irrelevant content: Articles about general AI (ChatGPT updates, OpenAI agents) were being flagged as relevant because they mentioned "AI agent" even without any advertising context.

Solution

Alert deduplication

Changed the NOT EXISTS subquery from checking perspective_id to checking if ANY perspective with the same external_url has been alerted to that channel.

Content relevance

Tightened checkMentionsAgentic() to require BOTH:

  • Agentic terms: agentic, ai agent, autonomous agent, etc.
  • Advertising context: advertising, programmatic, media buy, dsp, campaign, etc.

Before: Article about "OpenAI's new AI agent" → mentions_agentic = true
After: Same article → mentions_agentic = false (no advertising context)

Test plan

  • TypeScript compiles
  • All tests pass
  • Verified app loads via Vibium browser testing
  • Admin feeds page displays correctly

🤖 Generated with Claude Code

bokelley and others added 2 commits January 19, 2026 10:11
The previous fix (1760aed) prevented new duplicate perspectives from
being created, but existing duplicates still matched the alert query.
This caused the same article to be posted multiple times.

Now the alert query checks if ANY perspective with the same external_url
has been alerted to a channel, not just the specific perspective_id.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ring

1. Alert deduplication: Check external_url across ALL perspectives, not just
   the specific perspective_id. Prevents spam from cross-feed duplicates.

2. Content relevance: Tighten mentions_agentic detection to require BOTH
   agentic AI terms AND advertising context. Prevents general AI news
   (ChatGPT updates, etc.) from being flagged as relevant.

3. Performance: Add composite index on industry_alerts(channel_id, perspective_id)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit ccdbe18 into main Jan 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant