인공지능

MindsDB에서 벡터 스토어로 Couchbase 소개하기

4 분 읽기

We’re thrilled to announce that 카우치베이스 is now supported as a vector store in MindsDB, bringing together the best of both worlds: MindsDB’s cutting-edge machine learning capabilities and Couchbase’s high-performance vector storage. With this new integration, users can seamlessly combine data and AI, unlocking powerful new possibilities for their applications.

MindsDB is an open-source tool that integrates various artificial intelligence (AI) models with databases or other data management systems, enabling easy creation and deployment of new AI-based solutions. With its intuitive interface and broad compatibility with popular data sources, MindsDB facilitates the implementation of advanced machine learning models without requiring deep technical knowledge

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

Setting up MindsDB with Couchbase

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

Installing MindsDB

Run the MindsDB Docker container. Execute the following command to create a Docker container for MindsDB:

docker run --name mindsdb_container -p 47334:47334 -p 47335:47335 mindsdb/mindsdb

Once the container is up and running, you can access the MindsDB editor by navigating to https://127.0.0.1:47334 in your web browser.

Alternative: Use MindsDB’s Docker Desktop extension to manage the container directly within Docker Desktop.

Installing Couchbase inside MindsDB

There are two ways to install the dependencies needed for Couchbase integration:

Method 1: Install via MindsDB Editor

  1. Open the MindsDB editor.
  2. Go to Settings and then Manage Integrations.
  3. Select the CouchbaseVector integration.
  4. 클릭 설치.

Method 2: Install via Command Line

  1. Start the MindsDB Docker container:
    docker start mindsdb_container
  2. Start an interactive shell in the container:
    docker exec -it mindsdb_container sh
  3. Install the Couchbase dependencies:
    pip install .[couchbasevector]
  4. Exit the interactive shell:
    exit
  5. Restart the container:
    docker restart mindsdb_container

Now you will have Couchbase installed as a dependency in your MindsDB editor!

Before performing vector searches in Couchbase, ensure that you have a Full-Text Search (FTS) index configured for your vector embeddings. This is required to perform vector search.

Connecting to Couchbase and performing vector search

Now that MindsDB and Couchbase are integrated, you can connect Couchbase as a vector store and perform vector searches. Here’s how:

1. Establish a database connection

Use the following SQL-like syntax to create a connection to your Couchbase instance. The example below connects to the 여행 샘플 bucket (you can enable this bucket from the Couchbase UI).

2. Create a table in Couchbase

You can create a collection (or table) in Couchbase and populate it with data from another MindsDB data source. For instance, to store vector embeddings from a MySQL database:

In this example, mysql_datasource refers to another MindsDB data source connected to a MySQL database. The test_embeddings table contains the embeddings you wish to store in Couchbase.

3. Performing  vector search

To perform a vector search, use a query like the one below.

결론

This integration allows you to easily combine Couchbase’s high-performance vector storage with MindsDB’s machine learning capabilities, enabling the development of intelligent, scalable applications with minimal effort. Whether you’re building recommendation systems, semantic search, or other AI-driven solutions, this powerful combination provides the tools needed to succeed.

다음 단계

More information is available in the MindsDB documentation, including an integration guide to 카우치베이스.

즐거운 코딩하세요!



이 기사 공유하기

작가

댓글 남기기

데이터베이스의 확장성을 과거의 일로 남겨두세요

각 스택 추가마다 추가 비용이 발생하고 관리해야 할 항목도 더 많아집니다. 2분 안에 절약할 수 있는 금액을 추산해 보세요.