Best Practices and Tutorials

Introducing Couchbase as a Vector Store in Flowise

We’re excited to announce that Couchbase is now officially supported as a vector store in Flowise, providing users with a powerful, high-performance solution for managing and retrieving vector data. This new integration combines Flowise’s intuitive, no-code AI workflow capabilities with Couchbase’s scalable, flexible vector storage, making it easier than ever to build and deploy AI-driven applications.

Flowise is an open-source tool that allows users to create and manage AI workflows with a visual, no-code interface. It’s designed to simplify the integration of machine learning models and data pipelines, offering users an accessible and efficient way to incorporate AI into their applications without the need for complex coding.

In the following sections, we’ll explore some details of this integration.

Setting up Flowise with Couchbase

To get started with the Flowise and Couchbase, you’ll need to follow a few simple steps.

Installing Flowise

There are multiple ways to install Flowise:

Method 1: Install Flowise locally using NPM

  1. Install Flowise globally:
  2. Start Flowise:

Method 2: Install Flowise using Docker

There are two ways to deploy Flowise with Docker: Docker Compose or Docker Image.

Using a Docker image
    1. Clone the Flowise Repository locally:
    2. Navigate to docker folder at the root of the project:
    3. Build the Docker image with the following command:
    4. Once the image is built, run the container:
    5. To stop the running container:
Using Docker Compose
    1. Clone the Flowise Repository locally:
    2. Navigate to docker folder at the root of the project:
    3. Copy the .env.example file and rename it as .env
    4. To start the containers, use Docker Compose:
    5. To bring the containers down, use the following command:

Now you have Flowise installed, you can access it by navigating to http://localhost:3000.

Alternatively, you can also use the Flowise Cloud Version.

Upserting to Couchbase and running a query

Now that Flowise and Couchbase are integrated, you can upsert data into Couchbase and perform vector searches. In this blog, we will show you how to upsert a PDF file into Couchbase using Flowise.

1. Upsert data into Couchbase

To upsert data into Couchbase, drag and connect the following nodes on the Flowise canvas:

      • PDF File: Upload your document (e.g., Couchbase-docs.pdf)
      • Recursive Character Text Splitter: Splits text into chunks (e.g., size: 1000, overlap: 200)
      • OpenAI Embeddings: Converts text into vector embeddings (e.g.,text-embedding-3-large)
      • Couchbase: Stores documents and embeddings into the specified bucket, scope, and collection. Don’t forget to add the vector index!

Now that the data is stored, we can query it using the following Flowise setup!

2. Start Querying!

To query data from Couchbase, drag and connect the following nodes on the Flowise canvas:

      • Couchbase Retriever: Fetches relevant document chunks using vector search.
      • ChatOpenAI: Processes the retrieved context and generates responses (e.g., GPT-4o).
      • Conversational Retrieval QA Chain: Handles multi-turn interactions, ensuring accurate and contextual responses.

Now, the RAG pipeline is ready to answer queries using stored knowledge!

Conclusion

This integration enables seamless querying of stored knowledge using Couchbase’s high-performance vector storage and Flowise’s low code tool capabilities. By leveraging embeddings, retrieval, and AI-powered responses, you can build scalable, intelligent applications with ease. Whether you’re working on semantic search, rag applications, or other AI-driven use cases, this setup ensures efficiency and accuracy.

Next steps

More information is available in the Flowise AI Documentation, including an integration guide to Couchbase.

Happy coding!

Share this article
Get Couchbase blog updates in your inbox
This field is required.

Author

Posted by Prajwal Pai, Software Engineer

Leave a comment

Ready to get Started with Couchbase Capella?

Start building

Check out our developer portal to explore NoSQL, browse resources, and get started with tutorials.

Use Capella free

Get hands-on with Couchbase in just a few clicks. Capella DBaaS is the easiest and fastest way to get started.

Get in touch

Want to learn more about Couchbase offerings? Let us help.