|
1 | 1 | ---
|
2 |
| -title: "Part 1: Set up project and development environment to build a a custom knowledge retrieval (RAG) app" |
| 2 | +title: "Part 1: Set up project and development environment to build a custom knowledge retrieval (RAG) app" |
3 | 3 | titleSuffix: Azure AI Studio
|
4 | 4 | description: Build a custom chat app using the Azure AI Foundry SDK. Part 1 of a 3-part tutorial series, which shows how to create the resources you'll need for parts 2 and 3.
|
5 | 5 | manager: scottpolly
|
@@ -44,8 +44,31 @@ To create a project in [Azure AI Studio](https://ai.azure.com), follow these ste
|
44 | 44 | 1. Go to the **Home** page of [Azure AI Studio](https://ai.azure.com).
|
45 | 45 | 1. Select **+ Create project**.
|
46 | 46 | 1. Enter a name for the project. Keep all the other settings as default.
|
| 47 | +1. Projects are created in hubs. For this tutorial, create a new hub. If you see **Create a new hub** select it and specify a name. Then select **Next**. (If you don't see **Create new hub**, it's because a new one is being created for you.) |
| 48 | +1. Select **Customize** to specify properties of the hub. |
| 49 | +1. Use any values you want, except for **Region**. We recommend you use either **East US2** or **Sweden Central** for the region for this tutorial series. |
| 50 | +1. Select **Next**. |
47 | 51 | 1. Select **Create project**.
|
48 | 52 |
|
| 53 | +## Deploy models |
| 54 | + |
| 55 | +You need two models to build a RAG-based chat app: an Azure OpenAI chat model (`gpt-4o-mini`) and an Azure OpenAI embedding model (`text-embedding-ada-002`). Deploy these models in your Azure AI Studio project, using this set of steps for each model. |
| 56 | + |
| 57 | +These steps deploy a model to a real-time endpoint from the AI Studio [model catalog](../how-to/model-catalog-overview.md): |
| 58 | + |
| 59 | +1. On the left navigation pane, select **Model catalog**. |
| 60 | +1. Select the **gpt-4o-mini** model from the list of models. You can use the search bar to find it. |
| 61 | + |
| 62 | + :::image type="content" source="../media/tutorials/chat/select-model.png" alt-text="Screenshot of the model selection page." lightbox="../media/tutorials/chat/select-model.png"::: |
| 63 | + |
| 64 | +1. On the model details page, select **Deploy**. |
| 65 | + |
| 66 | + :::image type="content" source="../media/tutorials/chat/deploy-model.png" alt-text="Screenshot of the model details page with a button to deploy the model." lightbox="../media/tutorials/chat/deploy-model.png"::: |
| 67 | + |
| 68 | +1. Leave the default **Deployment name**. select **Deploy**. Or, if the model isn't available in your region, a different region is selected for you and connected to your project. In this case, select **Connect and deploy**. |
| 69 | + |
| 70 | +After you deploy the **gpt-4o-mini**, repeat the steps to deploy the **text-embedding-ada-002** model. |
| 71 | + |
49 | 72 | ## Create an Azure AI Search service
|
50 | 73 |
|
51 | 74 | The goal with this application is to ground the model responses in your custom data. The search index is used to retrieve relevant documents based on the user's question.
|
@@ -80,10 +103,13 @@ In the Azure AI Studio, check for an Azure AI Search connected resource.
|
80 | 103 | 1. Otherwise, select **New connection** and then **Azure AI Search**.
|
81 | 104 | 1. Find your Azure AI Search service in the options and select **Add connection**.
|
82 | 105 | 1. Use **API key** for **Authentication**.
|
| 106 | + |
| 107 | + > [!NOTE] |
| 108 | + > You can instead use **Microsoft Entra ID** for **Authentication**. If you do this, you must also configure access control for the Azure AI Search service. Assign yourself the **Search Index Data Contributor** and **Search Service Contributor** roles. If you don't know how to do this, or don't have the necessary permissions, use the **API key** for **Authentication**. |
| 109 | +
|
83 | 110 | 1. Select **Add connection**.
|
84 | 111 |
|
85 |
| -> [!NOTE] |
86 |
| -> You can instead use **Microsoft Entra ID** for **Authentication**. If you do this, you must also configure access control for the Azure AI Search service. Assign yourself the **Cognitive Services OpenAI User** role. If you don't know how to do this, or don't have the necessary permissions, use the **API key** for **Authentication**. |
| 112 | + |
87 | 113 |
|
88 | 114 | ## <a name="installs"></a> Install the Azure CLI and sign in
|
89 | 115 |
|
@@ -113,25 +139,6 @@ Create a folder for your work. Create a file called **config.py** in this folder
|
113 | 139 |
|
114 | 140 | :::code language="python" source="~/azureai-samples-nov2024/scenarios/rag/custom-rag-app/config.py":::
|
115 | 141 |
|
116 |
| -## Deploy models |
117 |
| - |
118 |
| -You need two models to build a RAG-based chat app: an Azure OpenAI chat model (`gpt-4o-mini`) and an Azure OpenAI embedding model (`text-embedding-ada-002`). Deploy these models in your Azure AI Studio project, using this set of steps for each model. |
119 |
| - |
120 |
| -These steps deploy a model to a real-time endpoint from the AI Studio [model catalog](../how-to/model-catalog-overview.md): |
121 |
| - |
122 |
| -1. Sign in to [Azure AI Studio](https://ai.azure.com). |
123 |
| -1. Studio remembers where you were last, so you should now see the project you created at the beginning of this tutorial. If you instead see a list of projects, select the one you created for this tutorial. |
124 |
| -1. Select the **gpt-4o-mini** model from the list of models. You can use the search bar to find it. |
125 |
| - |
126 |
| - :::image type="content" source="../media/tutorials/chat/select-model.png" alt-text="Screenshot of the model selection page." lightbox="../media/tutorials/chat/select-model.png"::: |
127 |
| - |
128 |
| -1. On the model details page, select **Deploy**. |
129 |
| - |
130 |
| - :::image type="content" source="../media/tutorials/chat/deploy-model.png" alt-text="Screenshot of the model details page with a button to deploy the model." lightbox="../media/tutorials/chat/deploy-model.png"::: |
131 |
| - |
132 |
| -1. Leave the default **Deployment name**. Select **Connect and deploy**. |
133 |
| - |
134 |
| -After you deploy the **gpt-4o-mini**, repeat the steps to deploy the **text-embedding-ada-002** model. |
135 | 142 |
|
136 | 143 | ## Configure environment variables
|
137 | 144 |
|
|
0 commit comments