Skip to main content
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.

Installation and Setup

We have to install the langchain-couchbase package.

Vector Store

See a usage example.
API Reference: CouchbaseSearchVectorStore

Document loader

See a usage example.

LLM Caches

CouchbaseCache

Use Couchbase as a cache for prompts and responses. See a usage example. To import this cache:
To use this cache with your LLMs:
API Reference: CouchbaseCache

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. See a usage example. To import this cache:
To use this cache with your LLMs:
API Reference: CouchbaseSemanticCache

Chat Message History

Use Couchbase as the storage for your chat messages. See a usage example. To use the chat message history in your applications:
API Reference: CouchbaseChatMessageHistory