Skip to content

Commit

Permalink
Updaing exercise intro
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebunting committed Aug 29, 2024
1 parent 45ec0d8 commit 5c9be3d
Showing 1 changed file with 6 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,22 @@ nav_order: 3
has_children: true
---

# Exercise 02 - Implement contextual grounding using vector search in Azure Cosmos DB NoSQL
# Exercise 02 - Implement contextual grounding using vector search in Azure Cosmos DB for NoSQL

## Lab Scenario

One of the most natural ways to integrate Azure OpenAI in an existing solution is to incorporate chat into an existing system. For this solution to bring the most value to an organization, however, the chat service must have access to information that may be proprietary or otherwise confidential. In this exercise, we will add custom data to augment an existing Azure OpenAI chat deployment, allowing customer service agents to review customer data in a natural language format.
Vector search provides a powerful technique for efficiently finding information within blocks of text. Using Azure Cosmos DB, vector embeddings generated using Azure OpenAI can be stored alongside data. In this exercise, you will add vector search capabilities to Azure Cosmos DB for NoSQL and integrate search functionality into the Consoso Suites Customer Information System (CIS) and Bookings applications.

## Objectives

After you complete this lab, you will be able to:

- Enable the Vector Search feature in Azure Cosmos DB NoSQL
- Enable the Vector Search feature in Azure Cosmos DB for NoSQL
- Define container vector policies
- Create vector indexing policies
- Generate vector embeddings using Azure OpenAI
- Peform similarity search using the `VectorDistance()` function in Cosmos DB
- Specify vector indexing policies
- Generate vector embeddings using Azure OpenAI and store them into Cosmos DB
- Peform similarity searches using the `VectorDistance()` function in Cosmos DB

## Lab Duration

- **Estimated Time:** 60 minutes

1. Enable vector search (15 min)
1. Enroll in feature
2. Create containers (UserReviews and PropertyMaintenance)
3. Define container vector policy and vector indexing policy.
2. Upload data and create vectors using Azure Open AI (30 min)
1. Upload data from blob storage (User reviews and property maintenance JSON files)
2. Vectorize text fields
3. Write vectors to field defined in container
4. Review data in data explorer to see what vectors look like.
5. Update application to handle vectorizing new records?
3. Execute vector distance queries (15 min)
1. Execute various vector searches
2. Compare against traditional search?
3. Add new record and then search for it? This will showcase vectorization process running against new records and making them immediately available for searching.

0 comments on commit 5c9be3d

Please sign in to comment.