-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 vector store #771
Comments
Opensearch merged in #792 |
Not sure if this related, but MongoDB Atlas search is also hit the 1024 dimensions restriction when using knn vector field, which means the OpenAi embedding is not compatible with mongo vector store neither. |
@zhengyuan-ehps IIRC you can set max dimensions on the embeddings model, I'm not sure how much impact this would have on the quality though. |
is this happening? some of us are stuck on es7 >_< |
@peterkarman1 you'll not be able to use the Overall, the adapter should be very similar to the existing OpenSearch one, with very minor tweaks, I'm sure PRs are welcome. |
Closed in #1810. |
Please consider porting the vector store support for ES / OS:
https://github.com/hwchase17/langchain/blob/master/langchain/vectorstores/elastic_vector_search.py
Sidenote
I was playing with using current Opensearch adapter with ES to prototype this, it seems there's a bit more work than expected. Namely, ES v7 doesn't support the
knn
query type OS supports, it only allowscosineSimilarity()
like implemented in the Python version linked above.ES v8 does support
knn
(which they call "Approximate kNN") which is supposedly better performing with a large number of documents in ES, but comes with a caveat the vector dimensions are only up to 1024 (withindex: true
setting whichknn
query type requires) , while OpenAI embeddings bytext-embedding-ada-002
are by default 1536.TLDR:
Update: with ES 8.8, it now supports 2048 dimensions for vectors, meaning ADA embeddings should fit into dense vectors on which ES knows how to do kNN queries.
The text was updated successfully, but these errors were encountered: