Couchbase is an award-winning distributed NoSQL cloud database that delivers unmatched versatility, performance, scalability, and financial value for all of your cloud, mobile, AI, and edge computing applications.If you want to see a detailed usage example, see Couchbase Vector Store.
Installation and setup
Install thelangchain-couchbase package along with embedding dependencies:
Vector store
Couchbase provides two different vector store implementations for LangChain:| Vector Store | Index Type | Minimum Version | Best For |
|---|---|---|---|
CouchbaseSearchVectorStore | Search Vector Index | Couchbase Server 7.6+ | Hybrid searches combining vector similarity with Full-Text Search (FTS) and geospatial searches |
CouchbaseQueryVectorStore | Hyperscale Vector Index or Composite Vector Index | Couchbase Server 8.0+ | Large-scale pure vector searches or searches combining vector similarity with scalar filters |
CouchbaseSearchVectorStore
CouchbaseQueryVectorStore
Document loader
See a usage example.LLM caches
CouchbaseCache
Use Couchbase as a cache for prompts and responses. To import this cache:CouchbaseSemanticCache
Semantic caching allows users to retrieve cached prompts based on the semantic similarity between the user input and previously cached inputs. Under the hood it uses Couchbase as both a cache and a vectorstore. The CouchbaseSemanticCache needs a Search Index defined to work. Please look at the usage example on how to set up the index. To import this cache:Connect these docs to Claude, VSCode, and more via MCP for real-time answers.