Skip to content

Commit

Permalink
Opensearch Conversational Search Demo WMS 3427 (#418)
Browse files Browse the repository at this point in the history
* Opensearch Conversational Search Demo app stack lab

* more image alt text

* fix image

* more specific file names to avoid confusion

* typo
  • Loading branch information
streamnsight authored Sep 7, 2024
1 parent 20945b1 commit 2b8efe7
Show file tree
Hide file tree
Showing 17 changed files with 164 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Pre-requisites

## Introduction

In this lab, you can launch a pre-built demo of the semantic search and conversational search utilizing a RAG pipeline.
To build it yourself step-by-step, you can skip to the next lab.

Estimated Time: 15 minutes

### Objectives

In this lab, you will:

- Deploy the Conversational Search Demo application via the Ressource Manager.

The stack deploys a new VCN (if needed) a new cluster (if needed), the application (in a container inastance), and a load balancer.

## Step 1: Prerequisites

In this deployment, you can deploy a complete stack, creating a new VCN, new OpenSearch cluster, and deploying the app. The cluster takes some time to deploy, so if you already deployed the OpenSearch cluster in previous steps, you can opt to use the existing cluster.

Confirm that the OpenSearch cluster is version 2.11.

To use an OCI Generative AI connector with OCI Search with OpenSearch, you need a cluster configured to use OpenSearch version 2.11.

By default, new clusters are configured to use version 2.11. To create a cluster, see Creating an OpenSearch Cluster.

Please refer to **LAB2** **Task3** on how to connect to the OpenSearch Dashboard.

You will also need a subscription to the Chicago or Frankfurt regions, which host the OCI GenAI infrastructure.

## Step 2: Launch the Demo Stack

The stack consists in a terraform script launched via Ressource Manager.

Click the following link to get started:

<a href="https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://objectstorage.us-chicago-1.oraclecloud.com/p/pzndeC45z4x_hSvQXWbmHETsui97i7ihHYd0U-Uahhjb8UWjxpzGpzjk3iCAcJAv/n/idehhejtnbtc/b/opensearch-demo-code/o/opensearch-convo.zip">Conversation Search Demo App Stack</a>

## Step 3: Acknowledge Terms and Conditions

First, acknowledge the Terms and Conditions for using the stack.

![Acknowledge Terms and Conditions](../images/image-demo-ack-tc.png)


## Step 4: Select the Compartment

Select the compartment to use. For this livelab, the `opensearch-livelab` compartment should be used, so the cluster can be re-used.

![Select Compartment](../images/image-demo-compartment.png)

Click **Next** at the bottom of the page.

## Step 5: Select the OpenSearch Cluster

If you do not select any option, the stack will deploy a new VCN, a new OpenSearch cluster and the application. If you have stood up the OpenSearch cluster earlier, re-using will allow deploying the stack in a few minutes only, while a new cluster deployment may take up to 30min.

Here we will re-use the cluster.

**Click** the checkbox to **Use an Existing OpenSearch cluster***

![Select Existing Cluster](../images/image-demo-existing-cluster.png)

You will be prompted to enter the OCID of the OpenSearch cluster.

![Select Existing Cluster OCID](../images/image-demo-cluster-ocid.png)

## Step 6: Find the OpenSearch Cluster OCID

- Duplicate your browser tab so you can easily return to the stack configuration, and in the new tab go to **Databases -> OpenSearch -> Clusters** to find the already deployed cluster

![Find Cluster](../images/image-demo-find-cluster1.png)

- **Select** the cluster `opensearch_cluster` created earlier.

![Select Cluster](../images/image-demo-select-cluster.png)

- **Copy** the OCID of the cluster from the **Cluster Details**.

![Copy OCID](../images/image-demo-opensearch-ocid.png)

- **Paste** the OCID in the Demo Stack configuration tab

![Paste OCID](../images/image-demo-opensearch-ocid2.png)


## Step 7: Configure Networking Information

The application needs to be deployed in the same VCN and subnet as the cluster, so you will be prompted to enter the VCN and subnet information.

**Note: It is important to select the correct VCN for the cluster, and the proper private and public subnets.**

If you followed the labs from the start, you should only have 1 VCN in the compartment, as well as 1 private subnet and 1 public subnet.

- Select the VCN. Make sure this is the VCN where the OpenSearch cluster was deployed.

- Select the **private** subnet for the application.

- Select the **public** subnet for the load balancer.

![Select VCN, Private and Public Subnets](../images/image-demo-network.png)


## Step 8: Deploy

**Click** the **Next** button at the bottom of the page to start the deployment.

The Stack will deploy and show logs

![Deploy Stack - Accepted](../images/image-demo-rmj-accepted.png)


## Step 9: Find the Application URL

- Once done, the stack switches to green.

![Stack switch to green](../images/image-demo-rmj-succeeded.png)

- At this point, you can go look at the **outputs** to find the deployment URL

![Go to Outputs, find the URL](../images/image-demo-url.png)

- Alternatively you can scroll all the way down the logs to find the URL, or look for the load balancer (under Network -> Load Balancers) to find the public IP.

- **Copy** the URL, and paste it in you browser

## Step 10: Interact With the Application

You should see the application interface in your browser. If it doesn't show right away, wait a minute or two. The application loads and embeds data at start up, which can take a couple minutes.


![App screen](../images/image-demo-app.png)

The dataset here consists of file events from object storage. Files were uploaded, viewed and/or deleted by various users. Use the search to find out what files were uploaded, viewed or deleted, when and by whom.

You can ask questions like:

- Tell me about the files that were deleted.
- Who uploaded file patient_3905?
- Who viewed it?
- Who deleted file patient_20926?
- etc...

![App screen with content](../images/image-demo-app2.png)

To learn more about how this works, you can now proceed to the next lab, which guides you through the process the app uses step-by-step.


## Acknowledgements

* **Author** - Emmanuel Leroy
* **Last Updated By/Date** - Emmanuel Leroy, September 2024
Binary file added oci-opensearch/images/image-demo-ack-tc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added oci-opensearch/images/image-demo-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added oci-opensearch/images/image-demo-app2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added oci-opensearch/images/image-demo-compartment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added oci-opensearch/images/image-demo-network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added oci-opensearch/images/image-demo-rmj-accepted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added oci-opensearch/images/image-demo-url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions oci-opensearch/workshops/ocw-tenancy/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
"filename": "../../Semantic-search/semantic-search.md"
},
{
"title": "Lab 7: Conversational search with RAG",
"filename": "../../Conversational-with-RAG/conversational-with-RAG.md"
"title": "Lab 7a: Conversational search Demo app",
"filename": "../../conversational-with-rag/conversational-with-rag-demo-stack.md"
},
{
"title": "Lab 7b: Conversational search DIY",
"filename": "../../conversational-with-rag/conversational-with-rag.md"
},
{
"title": "Lab 8: Observability in OpenSearch",
Expand Down
6 changes: 5 additions & 1 deletion oci-opensearch/workshops/tenancy/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
"filename": "../../semantic-search/semantic-search.md"
},
{
"title": "Lab 7: Conversational search with RAG",
"title": "Lab 7a: Conversational search Demo app",
"filename": "../../conversational-with-rag/conversational-with-rag-demo-stack.md"
},
{
"title": "Lab 7b: Conversational search DIY",
"filename": "../../conversational-with-rag/conversational-with-rag.md"
},
{
Expand Down

0 comments on commit 2b8efe7

Please sign in to comment.