IBM watsonx Orchestrate helps you build, deploy and manage powerful
AI assistants and agents that automate workflows and processes with generative AI.This article provides a hands-on, step-by-step walkthrough that uses IBM watsonx Orchestrate to
build a simple AI chat app. This chat app relies on data that is stored in an Astra DB or Milvus vector database. This data
is generated by Unstructured and is based on your organization’s source documents and semi-structured data.
To use this example, you will need the following:If you want to connect Unstructured to Astra DB for providing the source data to IBM watsonx Orchestrate, you will need the following:
Create a custom workflow that contains the Astra DB destination connector in your Unstructured account.The workflow must generate embeddings. The workflow’s Embedder node’s selected embedding model provider must be IBM. The
node’s selected embedding model must match the embedding model that you will specify later in Step 2.Be sure to run the workflow to have Unstructured generate the data and store it in your Astra DB database.
After you meet the preceding requirements, skip ahead to Step 1.If, however, you want to connect Unstructured to Milvus on IBM watsonx.data for providing the source data to IBM watsonx Orchestrate, you will need the following:
Within your IBM Cloud account, an IBM watsonx.data subscription that contains a Milvus service instance.
Create a Milvus service instance within your IBM watsonx.data subscription plan. This instance
must contain a database, a collection, and an index to store and manage the data that is generated by Unstructured.To complete this example, you will need the following settings for the Milvus service instance:
The instance’s GRPC host value.
The instance’s GRPC port value.
The name of the target database on the instance.
The name of the target collection in the database.
Create a custom workflow that contains the Milvus destination connector in your Unstructured account.The workflow must generate embeddings. The workflow’s Embedder node’s selected embedding model provider must be IBM. The
node’s selected embedding model must match the embedding model that you will specify later in Step 2.Be sure to run the workflow to have Unstructured generate the data and store it in your Milvus instance’s database.
Step 2: Create the chat app in IBM watsonx Orchestrate
In this step, you use IBM watsonx Orchestrate to create a chat app. This chat app allows you to ask questions about
your organization’s documents and semi-structured data. This data is stored in your Astra DB or Milvus vector database and was
generated by Unstructured in a format that is well-suited for your chat app.
Open your IBM watsonx Orchestrate subscription, if it is not already open. To do this:a. Log in to your IBM Cloud account.
b. On the sidebar, click the Resource list icon. If the sidebar is not visible, click the Navigation Menu icon to the far left of the
top navigation bar.
c. In the list of resources, expand AI / Machine Learning, and then click the target watsonx Orchestrate subscription.
d. Click Launch watsonx Orchestrate.
If the Chat page is not already open, click the Open the main menu icon to the far left of the
top navigation bar, and then click Chat.
Toward the bottom of the sidebar, click Create new agent.
On the Create an agent page, with Create from scratch already selected, enter some Name and Description for the agent, and then click Create.
Under Knowledge source, in the Start by adding knowledge tile, click Choose knowledge.
If you are using Astra DB for providing the source data to IBM watsonx Orchestrate, then do the following:
On the Select source page, click Astra DB, and then click Next.
On the Connect Astra DB page, specify the following settings:a. For URL, enter the API endpoint for the Astra DB database.
b. Leave Astra DB port blank.
c. For API key, enter the application token for your Astra DB database.
d. Click Next.
On the Settings details page, specify the following settings:a. For Keyspace, select the name of the target keyspace in the Astra DB database.
b. For Data type, select Collection.
c. For Collection, select the name of the target collection in the database.
d. For Embedding mode, select Client.
e. For Embedding model, select the name of the embedding model that matches the one that you specified earlier in your Unstructured workflow.
f. For Search mode, select Vector.
g. For Title, enter record_id.
h. For Body, enter content.
i. Leave URL and Advanced settings blank.
j. Click Next.
On the Description page, enter some description for the agent, and then click Save.
In the list of pages, click Behavior.
At the bottom of the Behavior section, turn on Chat with documents.
In the upper-right corner of the page, click Deploy.
On the Pre-deployment summary page, click Deploy.
Skip ahead to Step 3.If, however, you are using Milvus on IBM watsonx.data for providing the source data to IBM watsonx Orchestrate, then do the following:
On the Select source page, click Milvus, and then click Next.
On the Connect Milvus page, specify the following settings:a. For GRPC host, enter the GRPC host value for the Milvus service instance within your IBM watsonx.data subscription.
b. For GRPC port, enter the GRPC port value for the instance.
c. For Choose an authentication type, select Basic authentication.
d. For Username, enter ibmlhapikey.
e. For Password, enter the API key for your IBM Cloud account.
f. Click Next.
On the Select index page, specify the following settings:a. For Database, select the name of the target database on the Milvus service instance within your IBM watsonx.data subscription.
b. For Use Collection or Alias, select Collection.
c. For Collection, select the name of the target collection in the database.
d. For Index, select the name of the target index in the collection.
e. For Embedding model, select the name of the embedding model that matches the one that you specified earlier in your Unstructured workflow.
f. For Title, select element_id.
g. For Body, select text.
h. Click Next.
On the Description page, enter some description for the agent, and then click Save.
At the bottom of the Behavior section, turn on Chat with documents.
In the upper-right corner of the page, click Deploy.
In this step, you ask questions about your organization’s source documents and semi-structured data. The chat app then
attempts to answer your questions by searching the related data that Unstructured generated and stored in your Astra DB or Milvus vector database.
If the Chat page is not already open in IBM watsonx Orchestrate, click the Open the main menu icon to the far left of the
top navigation bar, and then click Chat.
In the sidebar, in the Agents list, select the name of the agent that you created in the previous step.
In the Type something box, enter a question, and then press Enter.