nearest-neighbor-chain

Community

Partition topics by greedy similarity chaining

Authorthistleknot
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It turns a pairwise similarity matrix into an ordered set of semantic chains that expose topic boundaries, reducing the effort needed to consolidate or segment related documents.

Core Features & Use Cases

  • Greedy nearest-neighbor chain decomposition: walks above-threshold pairs sorted by descending similarity and extends chains only at their endpoints, producing ragged chains that act as semantic threads.
  • Threshold-controlled grouping: uses a cutoff τ so weak connections become singletons and prevent over-merging.
  • Topic-boundary prescriptions: supports score-range outcomes such as MERGE, migrate, or xref for downstream consolidation and cross-referencing.

Quick Start

Use nearest-neighbor-chain on your documents’ correlation matrix to generate ordered semantic chains using a chosen τ cutoff for topic segmentation and consolidation planning.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: nearest-neighbor-chain
Download link: https://github.com/thistleknot/skills/archive/main.zip#nearest-neighbor-chain

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.