Vector Search introduction and langchain integration guide.
JSON
HNSW
(ANN) or FLAT
(KNN))Redis-py
is a python client that can be used to connect to MemoryDB
redis://
- Connection to Redis cluster, unencryptedrediss://
- Connection to Redis cluster, with TLS encryptionInMemoryVectorStore.__init__
- Initialize directlyInMemoryVectorStore.from_documents
- Initialize from a list of Langchain.docstore.Document
objectsInMemoryVectorStore.from_texts
- Initialize from a list of texts (optionally with metadata)InMemoryVectorStore.from_existing_index
- Initialize from an existing MemoryDB indexInMemoryVectorStore
implementation based on what use case you have:
similarity_search
: Find the most similar vectors to a given vector.similarity_search_with_score
: Find the most similar vectors to a given vector and return the vector distancesimilarity_search_limit_score
: Find the most similar vectors to a given vector and limit the number of results to the score_threshold
similarity_search_with_relevance_scores
: Find the most similar vectors to a given vector and return the vector similaritiesmax_marginal_relevance_search
: Find the most similar vectors to a given vector while also optimizing for diversitysimilarity_distance_threshold
retriever which allows the user to specify the vector distance
similarity_score_threshold
allows the user to define the minimum score for similar documents