Why Simple Slug and Exact-Title Checks Fail at Scale
Early AI blogging scripts checked only whether an exact headline or URL slug already existed in posts.json or wp_posts. That catches trivial repeats, yet completely misses semantic twins: one agent writes 'Best Open-Source RAG Stacks in 2026' on Tuesday while another writes 'Top GitHub Repositories for Agent Retrieval' on Friday.
When two or three URLs satisfy identical search intent on the same domain, Google Search Console splits impressions, backlinks, and click-through signals across competing pages. Neither page breaks into the top three spots, and high-volume publishing rapidly crosses into thin, repetitive scaled content.
We pair every new editorial slot with the guardrails explained in /blog/automate-wordpress-content-safely-without-scaled-content-penalty/—starting with vector similarity screening over your entire archive before allocating a single generation token.
- Embed existing titles, H2s, and primary tags once into a lightweight local vector index.
- Score every proposed topic briefing against existing live URLs AND active GSC top-query clusters.
- Reject or redirect overlapping topics into canonical content refreshes rather than spinning new URLs.
Three-Zone Cosine Similarity Threshold Matrix
Embedding similarity gives editorial pipelines a clean, deterministic traffic-light gate. Instead of binary pass/fail logic, separating scores into three distinct operational bands keeps archive growth both broad and tightly interlinked.
Calibrate thresholds on a sample of 20 historical pairs from your own niche; multi-topic B2B sites generally find 0.86 separates true intent duplicates from legitimate sibling subtopics.
| Cosine Similarity | Editorial Status | Automated Agent Action |
|---|---|---|
| >= 0.86 | Direct Cannibalization Risk | Block new slug; convert brief into canonical update patch |
| 0.72 – 0.85 | Adjacent Sibling Intent | Inject differentiation constraint + link parent URL in outline |
| < 0.72 | Clean Topical Gap | Approve draft generation & register embedding on publish |
Always store the target canonical URL inside your deduplication response object so an 'update-canonical' job can refresh stale numbers on the winning page automatically.
Implementing a Fast Pre-Draft Deduplication Check
Even a compact repository of 50 to 5,000 WordPress articles evaluates in milliseconds in memory using normalized dot products—zero external vector database infrastructure required for single-publisher networks.
Integrate this pre-flight gate ahead of LLM outlining so duplicate ideas cost zero generation tokens.
import math
def cosine_sim(a: list[float], b: list[float]) -> float:
dot = sum(x * y for x, y in zip(a, b))
na = math.sqrt(sum(x * x for x in a)) or 1.0
nb = math.sqrt(sum(y * y for y in b)) or 1.0
return dot / (na * nb)
def deduplication_gate(cand_vec: list[float], archive: list[dict]) -> dict:
best_score, best_post = 0.0, None
for post in archive:
score = cosine_sim(cand_vec, post['embedding'])
if score > best_score:
best_score, best_post = score, post
if best_score >= 0.86:
return {'decision': 'refresh_existing', 'target': best_post['slug'], 'score': round(best_score, 3)}
if best_score >= 0.72:
return {'decision': 'differentiate_and_link', 'sibling': best_post['slug'], 'score': round(best_score, 3)}
return {'decision': 'publish_new', 'score': round(best_score, 3)}
Connecting GSC Query Overlap to Consolidation Workflows
Vector similarity prevents future collisions, yet mature WordPress sites often inherit older overlapping articles published before guardrails existed. Combining Google Search Console query-to-URL exports with your embedding index exposes legacy cannibalization instantly whenever two slugs trade rank week to week for the exact same query.
When an audit surfaces two competing posts—say one 600-word news recap and one 1,500-word implementation guide—keep the stronger historical performer, fold any unique diagrams, FAQs, or benchmarks into it, update schema modified timestamps, and redirect the thinner page cleanly with an HTTP 301.
- Export Search Analytics query rows grouped by query + page to flag any keyword splitting >20% impressions across two URLs.
- Maintain an explicit entity lock map so recurring weekly series (such as Model Benchmarks vs Cost Tutorials) never reuse identical head terms.
- Resubmit updated canonical URLs via sitemap.xml and IndexNow immediately after merging competing articles.