Google Memorystore for Redis is a fully-managed service that is powered by the Redis in-memory data store to build application caches that provide sub-millisecond data access. Extend your database application to build AI-powered experiences leveraging Memorystore for Redis’s Langchain integrations.This notebook goes over how to use Memorystore for Redis to store vector embeddings with the
MemorystoreVectorStore
class.
Learn more about the package on GitHub.
langchain-google-memorystore-redis
package, so we need to install it.
gcloud config list
.gcloud projects list
.similarity_search
method finds items in the vector store closest to the query in meaning.similarity_search_with_score
method finds items from the vector store that fall within the specified similarity threshold.max_marginal_relevance_search
method returns items that optimize the combination of relevance and diversity based on the lambda setting.as_retriever()
method converts the vector store into a format that simplifies querying.delete
method provides this functionality.