feat: fuzzy clustering with local embeddings #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/fuzzy-clustering"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes BUG-6
Stacked on #3. Part of ECO-EP1.
What
HttpEmbedderfor a local sentence-embedding service (BREADBUG_EMBED_URL), restricted to loopback/private addresses so report text never leaves the host.reembed_allrebuilds centroids from member reports when the model changes.tests/fixtures/fuzzy_eval.json, 8 problems x 3 differently worded descriptions) with a test that enforces precision >= 0.95 and recall >= 0.65. Measured: precision 1.00, recall 0.71 at the 0.30 default threshold (highest cross-problem similarity is 0.27).Honest limits
The built-in embedder only matches descriptions that share vocabulary. About 29% of same-problem pairs in the set fall below the threshold, so some duplicates will sit in separate clusters until a human merges them (BUG-7). That is the safe direction: a wrong merge hides a bug, a missed merge costs a click.
docs/embedding-eval.mdexplains how to plug in a real embedding model and retune. I did not stand up an ML service as part of this PR.Tests
7 embed unit tests (tokens, determinism, similarity ordering, centroid/bytes, local-only URL rule, HTTP reply parsing against a mock), the quality test, and 5 HTTP integration tests (paraphrases cluster and unrelated reports do not; never crosses apps or kinds; too little text stays unclustered; threshold configurable; model change does not mix vector spaces and reembed fixes it). clippy
-D warningsclean.5cbb322e1fa6daaf43e8