Skip to content

Commit 3f813c1

Browse files
Update readme with feedback (#74)
* #67: * emphasize increase quota requirements * change features section to improve flow * add additional info to quick deployment * add post deployment steps to ensure everything is deployed correctly * add guidance to use another deployment option upon failure * #60 * #59 * add recommended prompts/chats for after app is deployed * add short instructions for quick deploy
1 parent bf88e65 commit 3f813c1

File tree

3 files changed

+66
-37
lines changed

3 files changed

+66
-37
lines changed

README.md

Lines changed: 60 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ MENU: [**FEATURES**](#features) \| [**QUICK DEPLOY**](#quick-deploy) \| [**GETTI
66

77
This solution deploys a web-based chat application with an AI agent running in Azure Container Apps. The agent leverages the Azure AI Agent service and utilizes Azure AI Search for knowledge retrieval from uploaded files, enabling it to generate responses with citations. The solution also includes built-in monitoring capabilities with tracing to ensure easier troubleshooting and optimized performance.
88

9-
This solution creates an Azure AI Foundry hub, project and connected resources including Azure AI Services, AI Search and more. For more details about the resources that are created, view the [resources](#resources) documentation. There are options to enable Retrieval-Augmented Generation (RAG) and use logging, tracing, and monitoring.
9+
This solution creates an Azure AI Foundry hub, project and connected resources including Azure AI Services, AI Search and more. More details about the resources that are created are located in the [resources](#resources) documentation. There are options to enable Retrieval-Augmented Generation (RAG) and use logging, tracing, and monitoring.
1010

1111
Instructions are provided for deployment through GitHub Codespaces, VS Code Dev Containers, and your local development environment.
1212

1313
#### Architecture diagram
1414

1515
![Architecture diagram showing that user input used in conjunction with user identity to call app code running in Azure Container apps that processes the user input and generates a response to the user. The app code leverages Azure AI projects, Azure AI model inference, prompty, and Azure AI Search.](docs/architecture.png)
1616

17-
## Quick Deploy
17+
## Getting Started
18+
19+
### Quick Deploy
1820

1921
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Azure-Samples/get-started-with-ai-agents) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/Azure-Samples/get-started-with-ai-agents) |
2022
|---|---|
2123

22-
Github Codespaces and Dev Containers both allow you to download and deploy the code for development. Deploy to Azure will create the resources for later deployment. Detailed instructions for options to deploy this solution can be found in [deployment](#deployment).
23-
24-
## Getting Started
24+
Github Codespaces and Dev Containers both allow you to download and deploy the code for development. You can also continue with local development. Once you have selected your environment, follow the instructions below to customize and deploy your solution.
2525

2626
### Prerequisites
2727

@@ -47,7 +47,9 @@ Make sure the following tools are installed:
4747
## Development
4848

4949
#### Code
50-
Download the project code:
50+
If you are using one of the [Quick Deploy options](#quick-deploy), open the codespace now.
51+
52+
If you are not using any of the Quick Deploy options, download the project code:
5153

5254
```shell
5355
git clone https://github.com/Azure-Samples/get-started-with-ai-agents.git
@@ -61,11 +63,11 @@ When you start a deployment, most parameters will have default values. You can c
6163
| **Setting** | **Description** | **Default value** |
6264
|------------|----------------| ------------|
6365
| **Azure Region** | Select a region with quota which supports your selected model. | |
64-
| **Model** | Choose from the [list of models supported by Azure AI Agent Service](https://learn.microsoft.com/azure/ai-services/agents/concepts/model-region-support) for your selected region | gpt-4o-mini |
65-
| **Model Format** | Choose from OpenAI or Microsoft, depending on your model | OpenAI |
66-
| **Model Deployment Capacity** | Configure capacity for your model. Recommended value is 100k. | 50k |
67-
| **Embedding Model** | Choose from text-embedding-3-large, text-embedding-3-small, and text-embedding-ada-002. | text-embedding-3-small |
68-
| **Embedding Model Capacity** | Configure capacity for your embedding model. | 50k |
66+
| **Model** | Choose from the [list of models supported by Azure AI Agent Service](https://learn.microsoft.com/azure/ai-services/agents/concepts/model-region-support) for your selected region. | gpt-4o-mini |
67+
| **Model Format** | Choose from OpenAI or Microsoft, depending on your model. | OpenAI |
68+
| **Model Deployment Capacity** | Configure capacity for your model. Recommended value is 100k. | 30k |
69+
| **Embedding Model** | Choose from text-embedding-3-large, text-embedding-3-small, and text-embedding-ada-002. This may only be deployed if Azure AI Search is enabled. | text-embedding-3-small |
70+
| **Embedding Model Capacity** | Configure capacity for your embedding model. | 30k |
6971
| **Knowledge Retrieval** | Choose from OpenAI's file search or including Azure AI Search Index. | OpenAI's file search |
7072

7173
For a detailed description of customizable fields and instructions, view the [deployment customization guide](docs/deploy_customization.md).
@@ -85,10 +87,10 @@ By default, the template deploys OpenAI's [file search](https://learn.microsoft.
8587
To use index search, please set the local environment variable `USE_AZURE_AI_SEARCH_SERVICE` to `true` during the `azd up` command. In this case the Azure AI Search resource will be deployed and used.
8688

8789
#### Logging
88-
If you want to enable logging to a file, uncomment the following line in Dockerfile located in the src directory:
90+
If you want to enable logging to a file, navigate to `src/Dockerfile` and edit the code to uncomment the following line:
8991

9092
```
91-
ENV APP_LOG_FILE=app.log
93+
# ENV APP_LOG_FILE=app.log
9294
```
9395

9496
By default the file name app.log is used. You can provide your own file name by replacing app.log with the desired log file name.
@@ -98,8 +100,8 @@ If you want to enable logging to a file, uncomment the following line in Dockerf
98100
The provided file logging implementation is intended for development purposes only, specifically for testing with a single client/worker. It should not be used in production environments after the R&D phase.
99101

100102
#### Tracing to Azure Monitor
101-
To enable tracing to Azure Monitor, modify the value of `ENABLE_AZURE_MONITOR_TRACING` environment variable to true in `Dockerfile` found in src directory:
102-
```code
103+
To enable tracing to Azure Monitor, navigate to `src/Dockerfile` and modify the value of `ENABLE_AZURE_MONITOR_TRACING` environment variable to true:
104+
```
103105
ENV ENABLE_AZURE_MONITOR_TRACING=true
104106
```
105107
Note that the optional App Insights resource is required for tracing to Azure Monitor (it is created by default).
@@ -112,19 +114,18 @@ ENV AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED=true
112114

113115
#### Quota Recommendations (Optional)
114116

115-
The default for the model capacity in deployment is 50k tokens. For optimal performance, it is recommended to increase to 100k tokens. You can change the capacity by following the steps in [setting capacity and deployment SKU](docs/deploy_customization.md#customizing-model-deployments).
117+
The default for the model capacity in deployment is 30k tokens. For optimal performance, it is recommended to increase to 100k tokens. You can change the capacity by following the steps in [setting capacity and deployment SKU](docs/deploy_customization.md#customizing-model-deployments).
116118

117-
* Navigate to the [Azure AI Foundry Portal](https://ai.azure.com/)
118-
* Select the AI Project you are using for this template if you are not already in the project.
119-
* Select Management center from the bottom left navigation menu
120-
* Select Quota, click the GlobalStandard dropdown and select the model and region you are using for this accelerator to see your available quota. Please note GPT-4o mini and text-embedding-ada-002 are used as default.
119+
* Navigate to the home screen of the [Azure AI Foundry Portal](https://ai.azure.com/)
120+
* Select Quota Management buttom at the bottom of the home screen
121+
* In the Quota tab, click the GlobalStandard dropdown and select the model and region you are using for this accelerator to see your available quota. Please note gpt-4o-mini and text-embedding-ada-002 are used as default.
121122
* Request more quota or delete any unused model deployments as needed.
122123

123124
## Deployment
124125

125126
### Deployment Options
126127

127-
Pick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, and Local Environments.
128+
Pick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, and Local Environments. If you encounter an issue with any of the following options, try a different one.
128129

129130
<details>
130131
<summary><b>GitHub Codespaces</b></summary>
@@ -205,7 +206,7 @@ You can optionally use a local development server to test app changes locally. M
205206

206207
4. Duplicate `src/.env.sample` and name to `.env`.
207208

208-
5. Fill in the environamnet variables in `.env`.
209+
5. Fill in the environment variables in `.env`.
209210

210211
6. Run the local server:
211212

@@ -230,6 +231,12 @@ Once you've opened the project in [Codespaces](#github-codespaces) or in [Dev Co
230231
231232
2. (Optional) If you would like to customize the deployment to [disable resources](docs/deploy_customization.md#disabling-resources), [customize resource names](docs/deploy_customization.md#customizing-resource-names), [customize the models](docs/deploy_customization.md#customizing-model-deployments) or [increase quota](docs/deploy_customization.md#customizing-model-deployments), you can follow those steps now.
232233
234+
⚠️ **NOTE!** For optimal performance, the recommended quota is 100k tokens per minute. If you have the capacity, we recommend increasing the quota by running the following command:
235+
```shell
236+
azd env set AZURE_AI_AGENT_DEPLOYMENT_CAPACITY 100
237+
```
238+
If you do not increase your quota, you may encounter rate limit issues. If needed, you can increase the quota after deployment by editing your model in the Models and Endpoints tab of the [Azure AI Foundry Portal](https://ai.azure.com/).
239+
233240
3. Provision and deploy all the resources by running the following in get-started-with-ai-agents directory:
234241
235242
```shell
@@ -244,14 +251,20 @@ Once you've opened the project in [Codespaces](#github-codespaces) or in [Dev Co
244251
245252
**NOTE!** If you get authorization failed and/or permission related errors during the deployment, please refer to the Azure account requirements in the [Prerequisites](#prerequisites) section. If you were recently granted these permissions, it may take a few minutes for the authorization to apply.
246253
247-
5. When `azd` has finished deploying, you'll see an endpoint URI in the command output. Visit that URI, and you should see the app! 🎉
254+
5. When `azd` has finished deploying, you'll see an endpoint URI in the command output. Visit that URI, and you should see the app! 🎉
248255

249-
You can view information about your deployment with:
250-
```shell
251-
azd show
252-
```
256+
* From here, you can interact with the agent. Try chatting with the agent by asking for a joke, or you could try a more specific query to see the agent's citation capabilities. By default, this solution uploads two documents from the `src/files` folder. To see the agent use this information, try asking about Contoso's products.
257+
258+
* You can view information about your deployment with:
259+
```shell
260+
azd show
261+
```
262+
263+
6. (Optional) Now that your app has deployed, you can view your resources in the Azure Portal and your deployments in Azure AI Foundry.
264+
* In the [Azure Portal](https://portal.azure.com/), navigate to your environment's resource group. The name will be `rg-[your environment name]`. Here, you should see your container app, storage account, and all of the other [resources](#resources) that are created in the deployment.
265+
* In the [Azure AI Foundry Portal](https://ai.azure.com/), select your project. If you navigate to the Assistants tab, you should be able to view your new assistant, named `agent-template-assistant`. If you navigate to the Models and Endpoints tab, you should see your AI Services connection with your model deployments.
253266
254-
6. If you make further modification to the app code, you can deploy the updated version with:
267+
7. (Optional) If you make further modification to the app code, you can deploy the updated version with:
255268
256269
```shell
257270
azd deploy
@@ -264,12 +277,27 @@ Once you've opened the project in [Codespaces](#github-codespaces) or in [Dev Co
264277
>
265278
>Check carefully for any errors during deployment and the startup phase of the Azure Container App. If the container fails to start correctly after deployment, the application changes you made will not take effect, and Azure Container Apps will continue serving requests from the previous stable revision.
266279
267-
7. You can optionally use a local development server to test app changes locally. To do so, follow the steps in [local deployment server](#local-development-server) after your app is deployed.
280+
8. (Optional) You can use a local development server to test app changes locally. To do so, follow the steps in [local deployment server](#local-development-server) after your app is deployed.
268281
269-
8. When you are done using your application, you can now delete the resources by running `azd down`. This may take up to 20 minutes.
282+
## Resource Clean-up
270283
271-
⚠️ To avoid unnecessary costs, remember to take down your app if it's no longer in use,
272-
either by deleting the resource group in the Portal or running `azd down`.
284+
To prevent incurring unnecessary charges, it's important to clean up your Azure resources after completing your work with the application.
285+
286+
- **When to Clean Up:**
287+
- After you have finished testing or demonstrating the application.
288+
- If the application is no longer needed or you have transitioned to a different project or environment.
289+
- When you have completed development and are ready to decommission the application.
290+
291+
- **Deleting Resources:**
292+
To delete all associated resources and shut down the application, execute the following command:
293+
294+
```bash
295+
azd down
296+
```
297+
298+
Please note that this process may take up to 20 minutes to complete.
299+
300+
⚠️ Alternatively, you can delete the resource group directly from the Azure Portal to clean up resources.
273301

274302
## Tracing and Monitoring
275303

infra/main.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"metadata": {
199199
"description": "Capacity of the chat deployment"
200200
},
201-
"defaultValue": 50
201+
"defaultValue": 30
202202
},
203203
"embedModelFormat": {
204204
"type": "string",
@@ -215,7 +215,8 @@
215215
"type": "string",
216216
"metadata": {
217217
"description": "Name of the embedding model to deploy"
218-
}
218+
},
219+
"defaultValue": "text-embedding-3-small"
219220
},
220221
"embeddingDeploymentName": {
221222
"type": "string",
@@ -250,7 +251,7 @@
250251
"metadata": {
251252
"description": "Capacity of the embedding deployment"
252253
},
253-
"defaultValue": 50
254+
"defaultValue": 30
254255
},
255256
"useContainerRegistry": {
256257
"type": "bool",

infra/main.parameters.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"value": "${AZURE_AI_AGENT_DEPLOYMENT_SKU=GlobalStandard}"
7373
},
7474
"agentDeploymentCapacity": {
75-
"value": "${AZURE_AI_AGENT_DEPLOYMENT_CAPACITY=50}"
75+
"value": "${AZURE_AI_AGENT_DEPLOYMENT_CAPACITY=30}"
7676
},
7777
"embeddingDeploymentName": {
7878
"value": "${AZURE_AI_EMBED_DEPLOYMENT_NAME=text-embedding-3-small}"
@@ -90,7 +90,7 @@
9090
"value": "${AZURE_AI_EMBED_DEPLOYMENT_SKU=Standard}"
9191
},
9292
"embedDeploymentCapacity": {
93-
"value": "${AZURE_AI_EMBED_DEPLOYMENT_CAPACITY=50}"
93+
"value": "${AZURE_AI_EMBED_DEPLOYMENT_CAPACITY=30}"
9494
},
9595
"embeddingDeploymentDimensions": {
9696
"value": "${AZURE_AI_EMBED_DIMENSIONS=100}"

0 commit comments

Comments
 (0)