Skip to content

Conversation

@Dev79844
Copy link
Contributor

@Dev79844 Dev79844 commented Oct 13, 2025

Fixes: #760

  • Added support for LSH using random projections approach
  • Modified vector store methods for configuring index strategy

@Dev79844 Dev79844 marked this pull request as ready for review October 19, 2025 08:24
@joshua-mo-143
Copy link
Collaborator

Hi @Dev79844, great work on this! I'll be reviewing sometime during the week.

Copy link
Collaborator

@joshua-mo-143 joshua-mo-143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some general comments:

  • Overall, pretty good work.
  • I think we need a builder for InMemoryVectorStore and provide IndexStrategy::BruteForce as the default (which will prevent breaking changes from needing to adjust the current from methods).
  • I am not hugely sold on the enum because it causes strange implementation behaviour (like having to fall back to brute forcing in vector_search_lsh when there's no LSH index), but as it's mostly internal implementation we can figure this out later on. InMemoryVectorStore is not really supposed to be used for huge production stuff anyway.

@Dev79844
Copy link
Contributor Author

Hey @joshua-mo-143!
After adding builder, should index_strategy argument be removed from the from methods?

@joshua-mo-143
Copy link
Collaborator

Hey @joshua-mo-143! After adding builder, should index_strategy argument be removed from the from methods?

Yeah index strategy should be removed.

The idea is that we provide good defaults for users to fall back to, and then when they want to use the higher-power options they can switch to it (so in this case we'd default to IndexStrategy::BruteForce to prevent breaking changes in behaviour).

Copy link
Collaborator

@joshua-mo-143 joshua-mo-143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor stuff to be fixed, mostly just comment reworking/removal and some clarification for users who find the LSH stuff and have no idea how to use it

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.

feat: rework in-memory vector store to use Approx. Nearest Neighbour (ANN)

2 participants