Skip to content

Conversation

srini-abhiram
Copy link

Replaces manual similarity calculation and query-based retrieval in FindSimilar with Milvus's Search API for more efficient and accurate similarity search. Updates index creation to use the new HNSW index API. Improves cache hit/miss logic and error handling.

What type of PR is this?
refactor(FindSimilar): Migrate to Milvus for similarity search

What this PR does / why we need it:
This PR refactors the FindSimilar functionality to use the Milvus vector database for similarity search, replacing the previous manual calculation and query-based retrieval logic.

Key changes include:
Adopting Milvus Search API: All similarity search operations now leverage Milvus's native Search API, which is highly optimized for performance and accuracy.

HNSW Indexing: The index creation process has been updated to use the new HNSW (Hierarchical Navigable Small World) index API, which provides faster and more accurate search results for large-scale vector data.

Code Improvements: The caching logic has been streamlined, and error handling for interactions with the Milvus service has been made more robust.

This migration was necessary to improve the efficiency, scalability, and accuracy of our similarity search feature, reducing the maintenance overhead of the custom-built solution using Go.

Which issue(s) this PR fixes:
Fixes #150

Release Notes: No

Replaces manual similarity calculation and query-based retrieval in FindSimilar with Milvus's Search API for more efficient and accurate similarity search. Updates index creation to use the new HNSW index API. Improves cache hit/miss logic and error handling.
Copy link

netlify bot commented Oct 6, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit dbe4332
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/68e34c2c748d520008eed958
😎 Deploy Preview https://deploy-preview-352--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@srini-abhiram
Copy link
Author

If the code changes are fine, I can add a integration test for milvus cache. Please advice if my code is incorrect, Im open to criticism.

@rootfs
Copy link
Collaborator

rootfs commented Oct 6, 2025

@srini-abhiram this is cool! can you sign the DCO

In your local branch, run: git rebase HEAD~1 --signoff
Force push your changes to overwrite the branch: git push --force-with-lease origin issue-150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Efficient use of Milvus for caching
2 participants