llama_index
llama_index copied to clipboard
Integrate VectorStore from Elasticsearch client
Description
We recently added a VectorStore abstraction to the Elasticsearch client library (https://github.com/elastic/elasticsearch-py/pull/2528, see module) in order to centralize the development and ensure all GenAI library integrations work the same.
This PR integrates the new module into LlamaIndex. The LlamaIndex class keeps its existing interface, it is just extended with the option to specify more retrieval strategies.
Type of Change
- New feature
- non-breaking change in default usage of the vector store
- breaking change when using query modes that do not match the retrieval mode specified at init time
- This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [x] Adapted existing unit and integration tests. Note that the abstract library already tests its own functionality with respect to the different retrieval strategies.
- [x] I stared at the code and made sure it makes sense
Suggested Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation (in progress)
- [ ] I have added Google Colab support for the newly added notebooks.
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I ran
make format; make lintto appease the lint gods