-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Add Support for OpenSearch Vector database #1191
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
Add Support for OpenSearch Vector database #1191
Conversation
Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
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.
some minor nits, but this looks awesome
happy to make the nits as well, we'll get it into tmrws release
docs/modules/indexes/chain_examples/vector_db_qa_with_sources.ipynb
Outdated
Show resolved
Hide resolved
Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
352ed9e
to
95c47f3
Compare
Sounds good. Thanks for reviewing it |
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.
awesome :) love this!
### Description This PR adds a wrapper which adds support for the OpenSearch vector database. Using opensearch-py client we are ingesting the embeddings of given text into opensearch cluster using Bulk API. We can perform the `similarity_search` on the index using the 3 popular searching methods of OpenSearch k-NN plugin: - `Approximate k-NN Search` use approximate nearest neighbor (ANN) algorithms from the [nmslib](https://github.com/nmslib/nmslib), [faiss](https://github.com/facebookresearch/faiss), and [Lucene](https://lucene.apache.org/) libraries to power k-NN search. - `Script Scoring` extends OpenSearch’s script scoring functionality to execute a brute force, exact k-NN search. - `Painless Scripting` adds the distance functions as painless extensions that can be used in more complex combinations. Also, supports brute force, exact k-NN search like Script Scoring. ### Issues Resolved langchain-ai#1054 --------- Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
Description
This PR adds a wrapper which adds support for the OpenSearch vector database. Using opensearch-py client we are ingesting the embeddings of given text into opensearch cluster using Bulk API. We can perform the
similarity_search
on the index using the 3 popular searching methods of OpenSearch k-NN plugin:Approximate k-NN Search
use approximate nearest neighbor (ANN) algorithms from the nmslib, faiss, and Lucene libraries to power k-NN search.Script Scoring
extends OpenSearch’s script scoring functionality to execute a brute force, exact k-NN search.Painless Scripting
adds the distance functions as painless extensions that can be used in more complex combinations. Also, supports brute force, exact k-NN search like Script Scoring.Issues Resolved
#1054