Repository navigation
Optimize vector retrieval and refresh README with animated SVGs - #17
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default cosine search sorted every stored vector to return only K results. This change uses stable bounded selection, retaining O(K) candidates and preserving scores and insertion order for ties.
Adds two animated SVGs with reduced motion support, a practical walkthrough, application examples, descriptive headings and npm search keywords. Corrects README claims about durable persistence, native HNSW, embedding fallback and quantization memory savings. SVGs are included in npm packaging.
Validation: 180 tests across 30 suites pass; TypeScript build passes; lint has zero errors and 147 warnings. SVG XML parsed and static renders visually inspected; npm pack dry run includes both assets. Remote tree SHA matches the tested local tree exactly.
Reproducible cosine scan plus selection benchmark: 10k vectors at 16 dimensions improves 3.603 to 0.651 ms (5.54x); 10k at 384 dimensions improves 11.183 to 8.423 ms (1.33x); 50k at 16 dimensions improves 22.491 to 4.791 ms (4.69x). K=10, seeded data, 31 interleaved samples; results identical. These are kernel timings, not end to end LLM gains. Raw results and reproduction instructions are committed.
Existing release concerns: ruOS npm ci reports 60 dependency audit findings including three critical findings, requiring separate triage. Local npm 11 rejects the existing optional MLflow lock entry; npm install with scripts disabled and lock writes disabled succeeded, while ruOS npm ci completed. No dependency versions or lockfile changed. SVG motion still needs visual confirmation through GitHub's image proxy.
Acceptance: npm run build; npm test -- --runInBand; node tests/benchmarks/vector-top-k.cjs. Review README rendering and animations on this branch.