-
Notifications
You must be signed in to change notification settings - Fork 128
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
Elasticsearch: support dense, sparse, hybrid with inference in Elasticsearch #699
Comments
@anakin87 @silvanocerza Would be great to get your input here. |
I don't see why not to be fair, I'm not against this at all. |
Are you going to handle the implementation of this? 👀 |
thank you for your interest!
|
I agree that breaking changes should be avoided. We can attempt to integrate this into the existing document store. If it proves too hard without breakage we can add a new class (and deprecate the old one). What do you think? Regarding naming, here are some proposals (I'm completely open to other names):
|
I'm going to work on the LangChain integration. It will become the reference implementation for this kind of integration with the package mentioned above. |
The mentioned LangChain reference implementation can be found here: |
Summary and motivation
Elasticsearch offers multiple retrieval features including
Other libraries such as LangChain already have all these options integrated. It would be great to also have them available in Haystack. Elastic is currently working on a Python package that will make the integration of these features easier. Here we want to discuss how to best make them available.
Questions
Detailed design
Concrete proposal:
ElasticsearchDocumentStore
takes an argumentretrieval_strategy
similarly to how it is down in LangChain. Calls towrite_documents
make use of the retrieval strategy to know how to index the data.ElasticsearchDenseVectorRetriever
,ElasticsearchSparseVectorRetriever
,ElasticsearchHybridRetriever
, ...) that get initialized with anElasticsearchDocumentStore
. The retrieval strategy has to match the expectation of the individual retrievers. We check that the expectation is met upon initialization. For retrieving documents, the retrievers call a search method on the document store as this is the established pattern.Checklist
If the request is accepted, ensure the following checklist is complete before closing this issue.
Tasks
The text was updated successfully, but these errors were encountered: