chunk-match

A NodeJS library that semantically chunks text and matches it against a user query using cosine similarity for precise and relevant text retrieval.

Exposes a matchChunks(documents, query, options) function that returns chunks sorted by relevance with similarity scores. Chunking thresholds, max token size, and ONNX embedding model are configurable; it is built on top of semantic-chunking. Supports dynamic similarity thresholds and optional chunk recombination.