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

Qdrant: how to make a "group_by" search #1045

Closed
lambda-science opened this issue Sep 3, 2024 · 2 comments · Fixed by #1054
Closed

Qdrant: how to make a "group_by" search #1045

lambda-science opened this issue Sep 3, 2024 · 2 comments · Fixed by #1054
Labels
feature request Ideas to improve an integration integration:qdrant P3

Comments

@lambda-science
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In Qdrant it is possible to make a group_by search (https://qdrant.tech/documentation/concepts/search/#search-groups)
This means that instead of search a collections of documents, we can limit and say for each documents, retrieve a maximum of X chunks, which can be very usefull for more diverse retrieving in the case of RAG.
This question is more generally, about the possibility of passing a custom query kwargs to the Qdrant retriever/query API through Haystack.

Describe the solution you'd like
Maybe add a qdrant_query_kwargs to the Qdrant Retriever to pass specific parameters to the query method of Qdrant ?

Describe alternatives you've considered
Implementing a new query/run method inheriting from base HybridRetriever to change the behaviour of the component.

Additional context
@Anush008 might have insight on this

@lambda-science lambda-science added the feature request Ideas to improve an integration label Sep 3, 2024
@lambda-science
Copy link
Contributor Author

Idea: maybe it could be cool to have a way to write our own queries instead of relying on the way they are implemented in the document store (_query_by_embedding, _query_hybrid, _query_by_sparse...

I guess right now to do this you need to Inherit from documentstore, to add your custom query method and then create a new retriever that use it.

This could allow to use the powerfull Query feature of Qdrant more reasily from Haystack.

@lambda-science
Copy link
Contributor Author

It's P3 but I did a PR instead @julian-risch :) #1054

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Ideas to improve an integration integration:qdrant P3
Projects
None yet
2 participants