-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 embeddings vector to be used for mmr searching (#2620) #2625
Conversation
💚 CLA has been signed |
A documentation preview will be available soon. Request a new doc build by commenting
If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here. |
I have signed the document, I don't get it why its complaining |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Can you please add to the test a call with query_embedding passed as a parameter?
@@ -344,8 +344,8 @@ async def _create_index_if_not_exists(self) -> None: | |||
async def max_marginal_relevance_search( | |||
self, | |||
*, | |||
embedding_service: AsyncEmbeddingService, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I did not realize this was not useful. Unfortunately, you can't remove it as the LangChain integration passes this parameter: https://github.com/langchain-ai/langchain-elastic/blob/9915f1e16d20e992896a651f7a3ec94db56a76f0/libs/elasticsearch/langchain_elasticsearch/vectorstores.py#L816-L825
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I will add it as an optional param, my plan is to create another PR in the langchain repo.
Hey, the CLA is complaining because your patch is authored from "Rishabh Gupta [email protected]". You need to setup an user email and name in git, then |
Thanks @pquentin ! |
Signed-off-by: rishabh208gupta <[email protected]>
buildkite test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
buildkite test this please |
* allow embeddings vector to be used for mmr searching (#2620) Signed-off-by: rishabh208gupta <[email protected]> * Use embedding service if provided --------- Signed-off-by: rishabh208gupta <[email protected]> Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit 3b1bce7)
…2639) * allow embeddings vector to be used for mmr searching (#2620) Signed-off-by: rishabh208gupta <[email protected]> * Use embedding service if provided --------- Signed-off-by: rishabh208gupta <[email protected]> Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit 3b1bce7) Co-authored-by: Rishabh Gupta <[email protected]>
Closes #2620
Provide an option to pass vector embeddings to search for in the max_marginal_relevance_search
This gives us the flexibility to perform mmr search with either a text query or an embeddings vector