Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow query embeddings to be passed in max_marginal_relevance_search #40

Open
rishabh208gupta opened this issue Aug 18, 2024 · 7 comments

Comments

@rishabh208gupta
Copy link

As part of elastic/elasticsearch-py#2620 , elasticsearch store mmr search allows query or query_embeddings optionally. It would be nice to have it in

as well.

P.S. Can I work on it?

@pquentin
Copy link
Collaborator

Thanks for your interest @rishabh208gupta! Sure, you can work on this 👍

@rishabh208gupta
Copy link
Author

Hi @pquentin, is there any document I can follow to run the tests on local?

@pquentin
Copy link
Collaborator

pquentin commented Aug 20, 2024

I never worked on this repo before, and it does not look like running tests is documented. You can try reproducing the steps in https://github.com/langchain-ai/langchain-elastic/blob/main/.github/workflows/_test.yml

@rishabh208gupta
Copy link
Author

Okay thanks :)

@miguelgrinberg
Copy link
Collaborator

Information for contributors isn't currently available, this is something that we plan to improve. But in the meantime, you can run the test suite locally from the lib/elasticsearch directory:

poetry install --with lint,test
make lint
make test
make integration_tests

@rishabh208gupta
Copy link
Author

I realise that to make this change, we would need to change the method definition in https://github.com/langchain-ai/langchain/blob/b28bc252c4e7058951c9d3be8ee81595029eab83/libs/core/langchain_core/vectorstores/base.py#L679C9-L679C38

@miguelgrinberg
Copy link
Collaborator

@rishabh208gupta as long as it changes in a backwards compatible manner, it is not a problem.

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

No branches or pull requests

3 participants