|
| 1 | +--- |
| 2 | +title: IBM watsonx Orchestrate |
| 3 | +--- |
| 4 | + |
| 5 | +[IBM watsonx Orchestrate](https://www.ibm.com/products/watsonx-orchestrate) helps you build, deploy and manage powerful |
| 6 | +AI assistants and agents that automate workflows and processes with generative AI. |
| 7 | + |
| 8 | +This article provides a hands-on, step-by-step walkthrough that uses IBM watsonx Orchestrate to |
| 9 | +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 |
| 10 | +is generated by Unstructured and is based on your organization's source documents and semi-structured data. |
| 11 | + |
| 12 | +## Requirements |
| 13 | + |
| 14 | +To use this example, you will need the following: |
| 15 | + |
| 16 | +If you want to connect Unstructured to Astra DB for providing the source data to IBM watsonx Orchestrate, you will need the following: |
| 17 | + |
| 18 | +- An [IBM Cloud account](https://cloud.ibm.com/registration) or [DataStax account](https://astra.datastax.com/signup) account. |
| 19 | +- An [Astra DB database](https://accounts.datastax.com/session-service/v1/login). |
| 20 | +- To complete this example, you will need the following settings for the Astra DB database: |
| 21 | + |
| 22 | + - The database's API endpoint. |
| 23 | + - An application token for the database. |
| 24 | + - The name of the target keyspace in the database. |
| 25 | + - The name of the target collection in the keyspace. |
| 26 | + |
| 27 | + To get these settings, see the [Astra DB destination connector](/ui/destinations/astradb) documentation. |
| 28 | + |
| 29 | +- Within your Unstructured account, a workflow that contains an Astra DB destination connector. |
| 30 | + |
| 31 | + - Create an [Unstructured account](https://unstructured.io/?modal=try-for-free). |
| 32 | + - Create an [Astra DB destination connector](/ui/destinations/astradb) in your Unstructured account. |
| 33 | + - Create a [custom workflow](/ui/workflows#create-a-custom-workflow) that contains the Astra DB destination connector in your Unstructured account. |
| 34 | + |
| 35 | + The workflow must generate [embeddings](/ui/embedding). The workflow's **Embedder** node's selected embedding model provider must be **IBM**. The |
| 36 | + node's selected embedding model must match the embedding model that you will specify later in **Step 2**. |
| 37 | + |
| 38 | + Be sure to [run the workflow](/ui/workflows#edit%2C-delete%2C-or-run-a-workflow) to have Unstructured generate the data and store it in your Astra DB database. |
| 39 | + |
| 40 | +After you meet the preceding requirements, skip ahead to [Step 1](#step-1%3A-add-an-ibm-watsonx-orchestrate-subscription-to-your-ibm-cloud-account). |
| 41 | + |
| 42 | +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: |
| 43 | + |
| 44 | +- Within your IBM Cloud account, an IBM watsonx.data subscription that contains a Milvus service instance. |
| 45 | + |
| 46 | + - Create an [IBM Cloud account](https://cloud.ibm.com/registration). |
| 47 | + |
| 48 | + To complete this example, you must [create an API key](https://www.ibm.com/docs/en/masv-and-l/cd?topic=cli-creating-your-cloud-api-key) for your IBM Cloud account. |
| 49 | + |
| 50 | + - Create an [IBM watsonx.data subscription](https://cloud.ibm.com/watsonxdata) in your IBM Cloud account. |
| 51 | + - Create a [Milvus service instance](/ui/destinations/milvus) within your IBM watsonx.data subscription plan. This instance |
| 52 | + must contain a database, a collection, and an index to store and manage the data that is generated by Unstructured. |
| 53 | + |
| 54 | + To complete this example, you will need the following settings for the Milvus service instance: |
| 55 | + |
| 56 | + - The instance's GRPC host value. |
| 57 | + - The instance's GRPC port value. |
| 58 | + - The name of the target database on the instance. |
| 59 | + - The name of the target collection in the database. |
| 60 | + - The name of the target index in the collection. |
| 61 | + |
| 62 | + To get these settings, see the [Milvus destination connector](/ui/destinations/milvus) documentation. |
| 63 | + |
| 64 | +- Within your Unstructured account, a workflow that contains a Milvus destination connector. |
| 65 | + |
| 66 | + - Create an [Unstructured account](https://unstructured.io/signup). |
| 67 | + - Create a [Milvus destination connector](/ui/destinations/milvus) in your Unstructured account. |
| 68 | + - Create a [custom workflow](/ui/workflows#create-a-custom-workflow) that contains the Milvus destination connector in your Unstructured account. |
| 69 | + |
| 70 | + The workflow must generate [embeddings](/ui/embedding). The workflow's **Embedder** node's selected embedding model provider must be **IBM**. The |
| 71 | + node's selected embedding model must match the embedding model that you will specify later in **Step 2**. |
| 72 | + |
| 73 | + Be sure to [run the workflow](/ui/workflows#edit%2C-delete%2C-or-run-a-workflow) to have Unstructured generate the data and store it in your Milvus instance's database. |
| 74 | + |
| 75 | +## Step 1: Add an IBM watsonx Orchestrate subscription to your IBM Cloud account |
| 76 | + |
| 77 | +If you already have an IBM watsonx Orchestrate subscription, then skip ahead to [Step 2](#step-2%3A-create-the-chat-app-in-ibm-watsonx-orchestrate) |
| 78 | + |
| 79 | +1. [Log in to your IBM Cloud account](https://cloud.ibm.com/login). |
| 80 | +2. 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 |
| 81 | + top navigation bar. |
| 82 | +3. Click **Create resource**. |
| 83 | +4. With **IBM Cloud catalog** selected, search for and select **watsonx Orchestrate**. |
| 84 | +5. Complete the on-screen instructions to finish creating the IBM watsonx Orchestrate subscription. |
| 85 | + |
| 86 | +## Step 2: Create the chat app in IBM watsonx Orchestrate |
| 87 | + |
| 88 | +In this step, you use IBM watsonx Orchestrate to create a chat app. This chat app allows you to ask questions about |
| 89 | +your organization's documents and semi-structured data. This data is stored in your Astra DB or Milvus vector database and was |
| 90 | +generated by Unstructured in a format that is well-suited for your chat app. |
| 91 | + |
| 92 | +1. Open your IBM watsonx Orchestrate subscription, if it is not already open. To do this: |
| 93 | + |
| 94 | + a. [Log in to your IBM Cloud account](https://cloud.ibm.com/login).<br/> |
| 95 | + 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 |
| 96 | + top navigation bar.<br/> |
| 97 | + c. In the list of resources, expand **AI / Machine Learning**, and then click the target watsonx Orchestrate subscription.<br/> |
| 98 | + d. Click **Launch watsonx Orchestrate**.<br/> |
| 99 | + |
| 100 | +2. If the **Chat** page is not already open, click the **Open the main menu** icon to the far left of the |
| 101 | + top navigation bar, and then click **Chat**. |
| 102 | +3. Toward the bottom of the sidebar, click **Create new agent**. |
| 103 | +4. On the **Create an agent** page, with **Create from scratch** already selected, enter some **Name** and **Description** for the agent, and then click **Create**. |
| 104 | +5. Under **Knowledge source**, in the **Start by adding knowledge** tile, click **Choose knowledge**. |
| 105 | + |
| 106 | +If you are using Astra DB for providing the source data to IBM watsonx Orchestrate, then do the following: |
| 107 | + |
| 108 | +1. On the **Select source** page, click **Astra DB**, and then click **Next**. |
| 109 | +2. On the **Connect Astra DB** page, specify the following settings: |
| 110 | + |
| 111 | + a. For **URL**, enter the API endpoint for the Astra DB database.<br/> |
| 112 | + b. Leave **Astra DB port** blank.<br/> |
| 113 | + c. For **API key**, enter the application token for your Astra DB database.<br/> |
| 114 | + d. Click **Next**.<br/> |
| 115 | + |
| 116 | +3. On the **Settings details** page, specify the following settings: |
| 117 | + |
| 118 | + a. For **Keyspace**, select the name of the target keyspace in the Astra DB database.<br/> |
| 119 | + b. For **Data type**, select **Collection**.<br/> |
| 120 | + c. For **Collection**, select the name of the target collection in the database.<br/> |
| 121 | + d. For **Embedding mode**, select **Client**.<br/> |
| 122 | + e. For **Embedding model**, select the name of the embedding model that matches the one that you specified earlier in your Unstructured workflow.<br/> |
| 123 | + f. For **Search mode**, select **Vector**.<br/> |
| 124 | + g. For **Title**, enter `record_id`.<br/> |
| 125 | + h. For **Body**, enter `content`.<br/> |
| 126 | + i. Leave **URL** and **Advanced settings** blank.<br/> |
| 127 | + j. Click **Next**.<br/> |
| 128 | + |
| 129 | +4. On the **Description** page, enter some description for the agent, and then click **Save**. |
| 130 | +5. In the list of pages, click **Behavior**. |
| 131 | +6. At the bottom of the **Behavior** section, turn on **Chat with documents**. |
| 132 | +7. In the upper-right corner of the page, click **Deploy**. |
| 133 | +8. On the **Pre-deployment summary** page, click **Deploy**. |
| 134 | + |
| 135 | +Skip ahead to [Step 3](#step-3%3A-run-the-chat-app). |
| 136 | + |
| 137 | +If, however, you are using Milvus on IBM watsonx.data for providing the source data to IBM watsonx Orchestrate, then do the following: |
| 138 | + |
| 139 | +1. On the **Select source** page, click **Milvus**, and then click **Next**. |
| 140 | +2. On the **Connect Milvus** page, specify the following settings: |
| 141 | + |
| 142 | + a. For **GRPC host**, enter the GRPC host value for the Milvus service instance within your IBM watsonx.data subscription.<br/> |
| 143 | + b. For **GRPC port**, enter the GRPC port value for the instance.<br/> |
| 144 | + c. For **Choose an authentication type**, select **Basic authentication**.<br/> |
| 145 | + d. For **Username**, enter `ibmlhapikey`.<br/> |
| 146 | + e. For **Password**, enter the API key for your IBM Cloud account.<br/> |
| 147 | + f. Click **Next**.<br/> |
| 148 | + |
| 149 | +3. On the **Select index** page, specify the following settings: |
| 150 | + |
| 151 | + a. For **Database**, select the name of the target database on the Milvus service instance within your IBM watsonx.data subscription.<br/> |
| 152 | + b. For **Use Collection or Alias**, select **Collection**.<br/> |
| 153 | + c. For **Collection**, select the name of the target collection in the database.<br/> |
| 154 | + d. For **Index**, select the name of the target index in the collection.<br/> |
| 155 | + e. For **Embedding model**, select the name of the embedding model that matches the one that you specified earlier in your Unstructured workflow.<br/> |
| 156 | + f. For **Title**, select **element_id**.<br/> |
| 157 | + g. For **Body**, select **text**.<br/> |
| 158 | + h. Click **Next**.<br/> |
| 159 | + |
| 160 | +4. On the **Description** page, enter some description for the agent, and then click **Save**. |
| 161 | +5. At the bottom of the **Behavior** section, turn on **Chat with documents**. |
| 162 | +6. In the upper-right corner of the page, click **Deploy**. |
| 163 | +7. On the **Pre-deployment summary** page, click **Deploy**. |
| 164 | + |
| 165 | +## Step 3: Run the chat app |
| 166 | + |
| 167 | +In this step, you ask questions about your organization's source documents and semi-structured data. The chat app then |
| 168 | +attempts to answer your questions by searching the related data that Unstructured generated and stored in your Astra DB or Milvus vector database. |
| 169 | + |
| 170 | +1. 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 |
| 171 | + top navigation bar, and then click **Chat**. |
| 172 | +2. In the sidebar, in the **Agents** list, select the name of the agent that you created in the previous step. |
| 173 | +3. In the **Type something** box, enter a question, and then press `Enter`. |
| 174 | +4. The agent will provide an answer. |
| 175 | +5. Keep asking as many questions as you want to. |
0 commit comments