When I started building TechPluse's dedup step, the obvious first pass was string comparison on headlines. It lasted about a day before it was obviously wrong.
The same story shows up across sources with completely different phrasing. "OpenAI ships new reasoning model" and "New o-series model launches from OpenAI" are the same event described by two editors with two different habits. A string match - even a fuzzy one - misses that pair every time, and a pipeline that can't dedup those two headlines will happily publish both as if they were independent news.
1.What actually works
Semantic comparison, not just lexical - but layered, cheapest check first. An exact URL match catches reposts for free. A fuzzy title match (RapidFuzz, above 85%) catches light rewording. Only what survives both gets embedded - title plus description, with text-embedding-3-small - and compared against a rolling window of recently stored items by cosine similarity. Above 0.90 it's a duplicate, even if not a single word overlaps between the two headlines.
The threshold itself is the part worth tuning carefully. Set it too low and you start merging genuinely distinct stories that happen to share a topic - two different papers about "efficient attention," say. Set it too high and near-duplicates slip through again. So there isn't one threshold: between 0.85 and 0.90 is an ambiguous band, and only there does the pipeline spend an LLM call asking whether the two items cover the exact same event. A single signal is too easy to fool in either direction; an LLM on every pair is too expensive.
Upstream of all that, articles are clustered by embedding similarity before anything is summarized, so five outlets covering one launch become one event - and one rewrite call - instead of five.
2.The window matters as much as the metric
Comparing against every historical item you've ever stored doesn't scale, and it's also unnecessary - a duplicate detector's job is to catch things published within the same news cycle, not to notice that a story rhymes with something from six months ago. A rolling window (recent items only) keeps the comparison set small and keeps the semantics of "duplicate" tied to what it should mean: the same event, reported close together in time.
3.What I'd still change
At real volume, comparing every new item against every item in the window is the part that doesn't scale - it's an O(n) scan for every incoming article. The honest fix is a proper approximate-nearest-neighbor index instead of a linear scan, so dedup checks stay fast as the window grows. I haven't needed it yet, but I know exactly where the ceiling is.
