You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/cache-tutorial-vector-similarity.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,13 @@ title: 'Tutorial: Conduct vector similarity search on Azure OpenAI embeddings us
3
3
description: In this tutorial, you learn how to use Azure Cache for Redis to store and search for vector embeddings.
4
4
5
5
6
-
6
+
ms.collection: ce-skilling-ai-copilot
7
7
ms.topic: tutorial
8
8
ms.custom:
9
9
- ignite-2024
10
10
ms.date: 09/15/2023
11
11
12
-
#CustomerIntent: As a < type of user >, I want < what? > so that < why? >.
12
+
#CustomerIntent: As a developer, I want to develop some code using a sample so that I see an example of a vector similarity with an AI-based large language model.
13
13
---
14
14
15
15
# Tutorial: Conduct vector similarity search on Azure OpenAI embeddings using Azure Cache for Redis
@@ -40,8 +40,7 @@ In this tutorial, you learn how to:
40
40
## Prerequisites
41
41
42
42
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services?azure-portal=true)
43
-
* Access granted to Azure OpenAI in the desired Azure subscription
44
-
Currently, you must apply for access to Azure OpenAI. You can apply for access to Azure OpenAI by completing the form at <ahref="https://aka.ms/oai/access"target="_blank">https://aka.ms/oai/access</a>.
43
+
* Access granted to Azure OpenAI in the desired Azure subscription. Currently, you must apply for access to Azure OpenAI. You can apply for access to Azure OpenAI by completing the form at <ahref="https://aka.ms/oai/access"target="_blank">https://aka.ms/oai/access</a>.
45
44
* <ahref="https://www.python.org/"target="_blank">Python 3.8 or later version</a>
* An Azure OpenAI resource with the **text-embedding-ada-002 (Version 2)** model deployed. This model is currently only available in [certain regions](/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability). See the [resource deployment guide](/azure/ai-services/openai/how-to/create-resource) for instructions on how to deploy the model.
@@ -134,7 +133,7 @@ Next, you'll read the csv file into a pandas DataFrame.
134
133
```
135
134
136
135
1. Execute code cell 3. You should see the following output:
137
-
136
+
138
137
:::image type="content" source="media/cache-tutorial-vector-similarity/code-cell-3.png" alt-text="Screenshot of results from executing code cell 3, displaying eight columns and a sampling of 10 rows of data." lightbox="media/cache-tutorial-vector-similarity/code-cell-3.png":::
139
138
140
139
1. Next, process the data by adding an `id` index, removing spaces from the column titles, and filters the movies to take only movies made after 1970 and from English speaking countries or regions. This filtering step reduces the number of movies in the dataset, which lowers the cost and time required to generate embeddings. You're free to change or remove the filter parameters based on your preferences.
Learn how to deploy an Azure Resource Manager template (ARM template) from your local machine. It takes about **8 minutes** to complete.
12
12
13
-
This tutorial is the first of a series. As you progress through the series, you modularize the template by creating a linked template, you store the linked template in a storage account, and secure the linked template by using SAS token, and you learn how to create a DevOps pipeline to deploy templates. This series focuses on template deployment. If you want to learn template development, see the [beginner tutorials](./template-tutorial-create-first-template.md).
13
+
This tutorial is the first of a series. As you progress through the series, you modularize the template by creating a linked template, store the linked template in a storage account, secure the linked template by using SAS token, and learn how to create a DevOps pipeline to deploy templates. This series focuses on template deployment. If you want to learn template development, see the [beginner tutorials](./template-tutorial-create-first-template.md).
14
14
15
15
## Get tools
16
16
17
-
Let's start by making sure you have the tools you need to deploy templates.
17
+
Make sure you have the tools you need to deploy templates.
18
18
19
19
### Command-line deployment
20
20
21
-
You need either Azure PowerShell or Azure CLI to deploy the template. For the installation instructions, see:
21
+
To deploy the template, you need either Azure PowerShell or Azure CLI. For the installation instructions, see:
-[Install Azure CLI on Windows](/cli/azure/install-azure-cli-windows)
25
25
-[Install Azure CLI on Linux](/cli/azure/install-azure-cli-linux)
26
26
-[Install Azure CLI on macOS](/cli/azure/install-azure-cli-macos)
27
27
28
-
After installing either Azure PowerShell or Azure CLI, make sure you sign in for the first time. For help, see [Sign in - PowerShell](/powershell/azure/install-az-ps#sign-in) or [Sign in - Azure CLI](/cli/azure/get-started-with-azure-cli#sign-in).
28
+
After installing either Azure PowerShell or Azure CLI, sign in for the first time. For help, see [Sign in - PowerShell](/powershell/azure/install-az-ps#sign-in) or [Sign in - Azure CLI](/cli/azure/get-started-with-azure-cli#sign-in).
29
29
30
30
### Editor (Optional)
31
31
32
-
Templates are JSON files. To review/edit templates, you need a good JSON editor. We recommend Visual Studio Code with the Resource Manager Tools extension. If you need to install these tools, see [Quickstart: Create ARM templates with Visual Studio Code](quickstart-create-templates-use-visual-studio-code.md).
32
+
Templates are JSON files. To review or edit templates, you need a good JSON editor. We recommend using Visual Studio Code with the Resource Manager Tools extension. If you need to install these tools, see [Quickstart: Create ARM templates with Visual Studio Code](quickstart-create-templates-use-visual-studio-code.md).
33
33
34
34
## Review template
35
35
36
-
The template deploys a storage account, app service plan, and web app. If you're interested in creating the template, you can go through [tutorial about Quickstart templates](template-tutorial-quickstart-template.md). However it's not required for completing this tutorial.
36
+
The template deploys a storage account, app service plan, and web app. If you're interested in creating the template, see [Quickstart templates tutorial](template-tutorial-quickstart-template.md). However, you don't need to create the template to complete this tutorial.
@@ -78,7 +78,7 @@ az account set --subscription [SubscriptionID/SubscriptionName]
78
78
79
79
## Create resource group
80
80
81
-
When you deploy a template, you specify a resource group that will contain the resources. Before running the deployment command, create the resource group with either Azure CLI or Azure PowerShell. Select the tabs in the following code section to choose between Azure PowerShell and Azure CLI. The CLI examples in this article are written for the Bash shell.
81
+
When you deploy a template, you specify a resource group for the resources. Before running the deployment command, create the resource group with either Azure CLI or Azure PowerShell. To choose between Azure PowerShell and Azure CLI, select the tabs in the following code section. The CLI examples in this article are written for the Bash shell.
82
82
83
83
# [PowerShell](#tab/azure-powershell)
84
84
@@ -149,7 +149,7 @@ To learn more about deploying template by using Azure CLI, see [Deploy resources
149
149
150
150
## Clean up resources
151
151
152
-
Clean up the resources you deployed by deleting the resource group.
152
+
To clean up the resources you deployed, delete the resource group.
153
153
154
154
1. From the Azure portal, select **Resource group** from the left menu.
155
155
2. Enter the resource group name in the **Filter by name** field.
@@ -158,7 +158,7 @@ Clean up the resources you deployed by deleting the resource group.
158
158
159
159
## Next steps
160
160
161
-
You learned how to deploy a local template. In the next tutorial, you separate the template into a main template and a linked template, and learn how to store and secure the linked template.
161
+
You learned how to deploy a local template. In the next tutorial, you separate the template into a main template and a linked template. You also learn how to store and secure the linked template.
162
162
163
163
> [!div class="nextstepaction"]
164
164
> [Deploy a linked template](./deployment-tutorial-linked-template.md)
0 commit comments