find_similar_sections
Detect near-duplicate documentation sections by fusing embeddings with lexical Jaccard over titles and body bytes, then cluster and rank canonical sections with dedup verdicts.
Instructions
Multi-signal section dedup detection. Fuses embedding cosine (when available) with lexical Jaccard over the section title and its ACTUAL body bytes, clusters via union-find, ranks each cluster's canonical by backlink_count + size. Verdict tiers: near_duplicate, overlapping_topic, parallel_tutorial. Each cluster and variant carries signal=body|title_only; a title_only comparison had no body evidence and is never near_duplicate. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| min_score | No | Pairwise score floor for clustering. Default 0.7. | |
| max_clusters | No | ||
| max_sections | No | Hard cap on sections examined. Default 1000. | |
| exclude_same_doc | No | Skip pairs in the same doc. Useful for long pages with repeated structure. | |
| near_duplicate_threshold | No | Score at/above which a cluster is flagged near_duplicate. |