IBM Cloud Docs
Milvus search integration setup

Milvus search integration setup

Milvus is a high-performance, distributed vector database that is designed to manage large-scale datasets. It supports real-time search and handles multiple concurrent users efficiently, making it ideal for AI-powered applications.

You can configure only one search integration per environment in IBM® watsonx™ Assistant. If you switch to another integration type, such as IBM Watson® Discovery, Elasticsearch, or a custom service, the existing configuration is overwritten.

Prerequisites for connecting Milvus to an assistant

Before you connect Milvus to your assistant, you must complete the following steps:

1. Create required accounts

To begin using IBM watsonx services for Milvus integration, you must create accounts for both watsonx.data and watsonx.ai platforms:


2. Set up Milvus in watsonx.data

To enable vector search capabilities within your assistant, you must deploy and configure Milvus in your watsonx.data environment.


3. Configure Milvus in watsonx.ai

After you set up Milvus in watsonx.data, you must configure its integration within watsonx.ai to enable vector-based retrieval and enhance your assistant’s capabilities.


Procedure to connect Milvus to an assistant

This procedure explains how to integrate Milvus as a search provider in watsonx Assistant. The integration involves three IBM platforms:

  1. IBM® watsonx™ Assistant – Configure and manage the search integration.
  2. watsonx.data – Provision and manage the Milvus vector database instance.
  3. IBM watsonx.ai – Create and manage collections (data sources) for vector search.

Setting Up Milvus in watsonx.data

After you select Milvus as the search integration, you can connect your assistant to your Milvus instance in watsonx.data.

To learn how to create a Milvus instance, see the Prerequisites for Milvus integration.

Use the Connect Milvus option to link your assistant to the Milvus service in watsonx.data.

Required Connection Details

Connect Milvus data

In the Connect your search provider section, enter the following details:

  • GRPC host and GRPC port - Retrieve these values from your Milvus instance. For instructions, see Connection details.

Authentication options

Choose one of the following authentication methods:

  • Basic Authentication
    Provide your username and password.

  • watsonx.data API Key
    Enter your API key.

  • None
    No authentication details are required.

For more information about credentials, see Getting credentials.

Updating your Milvus authentication credentials

IBM watsonx.data version 2.3 introduces changes to Milvus authentication. To avoid service disruptions, update your Milvus connection settings by 10 December 2025.

Step 1: Locate your new Milvus username

Your new Milvus username follows this format:

ibmlhapikey_<your watsonx.data username>

Examples

watsonx.data username Milvus username
abc@ibm.com ibmlhapikey_abc@ibm.com
serviceid-abcdef-123456 ibmlhapikey_serviceid-abcdef-123456

If you do not know your watsonx.data username:

  1. Go to Infrastructure manager in the watsonx.data console.
  2. Select your Milvus service to view the Details page.
  3. Click the Access control tab.
  4. Locate your watsonx.data username in the first column of the table.

Step 2: Update your Milvus connection in watsonx Assistant

Update your Milvus credentials for each assistant that uses a Milvus as a source:

  1. Go to Home > Integrations.

  2. In the Extensions section, click Open on the Search tile.

  3. If prompted, choose the environment to update. Repeat for each environment (For example, Draft and Live).

  4. Select Milvus.

  5. Record your current connection settings for reference.

  6. Go to the Instance tab and click Update.

  7. Enter the following connection information:

    • GRPC Host and GRPC Port.
    • Username: Use your new Milvus username from Step 1.
    • Password: Use your existing password or API key.
      • If you are using a watsonx.data API key, enter it as the password.
  8. Click Next.

  9. Click Save and then click Close.

  10. Return to the search tile and click Open.

  11. Select the same environment that you chose in Step 2.

  12. Click Milvus.

  13. Go to the Conversational Search section.

  14. Reenter the settings that you recorded in step 5.

  15. Click Save, then Close.

  16. Use the assistant chat window to confirm Milvus search results are working correctly.

Ingesting data into the Milvus through watsonx.ai

To use Milvus with your assistant, first collect your data in watsonx.data, then ingest it into the Milvus vector database.

In the Milvus setup window of your assistant, click Next to proceed to the Select data source step. Provide the following details:

  • In Database, select your preferred database.
  • In Choose collection, select the collection that you want to use. For more information, see Prerequisites for Milvus integration.
  • In Choose index, select the index that is associated with your collection.
  • In Choose embedding_model_id, select the embedding model that matches the one used to create your index.

Learn more about embedding models.

The selected model must match the model that is used during index creation. {: note}

Configuring the result content

After you connect Milvus by selecting the data source, you can configure how the search response displays in the Milvus window of your assistant.

In the Configure result content section of Select data source, map the following fields from your Milvus collection:

  • Title: Use a title, name, or similar field. It appears as the search result title. If not set, search results are not displayed in Facebook or Slack integrations.

  • Body: Use an abstract, summary, or highlight field. It appears as the search result description. If not set, search results are not displayed in Facebook or Slack integrations.

  • URL: Add any footer content to display at the end of the search result.


Enabling conversational search in Milvus

After you configure the result content, click Next to access the Conversational Search section (optional).

Conversational search is available only in the Plus and Enterprise plans of watsonx Assistant.

To activate conversational search, toggle Conversational Search to On.

Defining filter expression

To filter Milvus search results, expand the Advanced Milvus settings section and define a Filter string.


Filtering expression examples

Use the following examples to define filter expressions:

Contains

title like "%action%"

Returns results where the title contains action.

Doesn't contain

not (title like "%action%")

Excludes results where the title contains action.

Equal

"Understand your most and least successful actions"

Returns results with an exact title match.

Doesn't Equal

"Understand your most and least successful actions"

Excludes results with the exact title.

Nested filter expression

(title like "%action%") and (url in ["www.url1.com", "www.url2.com"])

Returns results where the title contains "action" and the URL matches one of the specified values.

Configuring your assistant to use Milvus

After you set up Milvus, configure your assistant to use it when no action matches.

Testing Milvus integration

You can test Milvus search integration by using:

  • Actions preview
  • Preview page
  • Preview link

Conversational search must be turned On to see proper results.

Example

User query: What is an action?

If conversational search is enabled, the assistant returns a text-based reply from the best results in your knowledge base.

ConversationalSearchToggleOn