Skip to content

Commit 138e006

Browse files
docs: updates to the documentation and deployment scripts for Client Advisor (#496)
* Create quota_check_params.sh * Update quota_check_params.sh * Create quota_check.md * Update quota_check.md * Update quota_check_params.sh * Add files via upload * Update quota_check.md * Update quota_check.md * Update README.md * Add files via upload * Update README.md * Update README.md * Update README.md * Update README.md * Update WebApp.Dockerfile * Update build-docker.yml * Update WebApp.Dockerfile * Update Dockerfile * Update build-docker.yml * Update WebApp.Dockerfile
1 parent d705776 commit 138e006

File tree

10 files changed

+502
-21
lines changed

10 files changed

+502
-21
lines changed

.github/workflows/build-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Build Docker Image and optionally push
6969
uses: docker/build-push-action@v6
7070
with:
71-
context: .
71+
context: ./src
7272
file: ${{ inputs.dockerfile }}
7373
push: ${{ inputs.push }}
7474
cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.app_name}}:${{ steps.determine_tag.outputs.tagname }}

README.md

Lines changed: 84 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ This solution accelerator is a powerful tool that helps you create your own copi
1515

1616
It leverages Azure OpenAI Service, Azure AI Search and Microsoft Fabric, to streamline daily tasks and customer meeting preparation for customer-facing roles. As a result, this helps to improve client retention and customer satisfaction. By increasing employee productivity and improving customer conversations, our solution enables organizations to serve more customers and drive increased revenue for the entire company.
1717

18-
18+
> Note: Some features contained in this repository are in private preview. Certain features might not be supported or might have constrained capabilities. For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms).
19+
20+
1921
**Scenario**
2022

2123
A Woodgrove Bank Client Advisor is preparing for upcoming client meetings. He wants insight into his scheduled client meetings, access to portfolio information, a comprehensive understanding of previous meetings, and the ability to ask questions about client’s financial details and interests.
@@ -36,31 +38,100 @@ The sample data used in this repository is synthetic and generated using Azure O
3638

3739
![Landing Page](docs/images/readMe/landing_page.png)
3840

41+
### Solution accelerator architecture
42+
![image](docs/images/readMe/architecture.png)
3943

4044
<h2><img src="docs/images/readMe/quickDeploy.png" width="64">
4145
<br/>
42-
Quick deploy
46+
QUICK DEPLOY
4347
</h2>
4448

4549
### Prerequisites
4650

47-
To use this solution accelerator, you will need access to an [Azure subscription](https://azure.microsoft.com/free/) with permission to create resource groups and resources. While not required, a prior understanding of Azure OpenAI, Azure AI Search and Microsoft Fabric will be helpful.
51+
To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups and resources**. Follow the steps in [Azure Account Set Up](./docs/AzureAccountSetUp.md)
4852

49-
For additional training and support, please see:
53+
Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/table) page and select a **region** where the following services are available:
5054

51-
1. [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/)
52-
2. [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/)
53-
3. [Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/)
54-
4. [Azure App Service](https://learn.microsoft.com/en-us/azure/app-service/)
55-
5. [Azure SQL Database](https://learn.microsoft.com/en-us/azure/azure-sql/)
56-
6. [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/)
55+
- [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/)
56+
- [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/)
57+
- [Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/)
58+
- [Azure App Service](https://learn.microsoft.com/en-us/azure/app-service/)
59+
- [Azure SQL Database](https://learn.microsoft.com/en-us/azure/azure-sql/)
60+
- [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/)
61+
- [Azure Semantic Search](./docs/AzureSemanticSearchRegion.md)
5762

58-
### Solution accelerator architecture
59-
![image](docs/images/readMe/architecture.png)
63+
Here are some example regions where the services are available: East US, East US2, Australia East, UK South, France Central.
64+
65+
### ⚠️ Important: Check Azure OpenAI Quota Availability
66+
67+
➡️ To ensure sufficient quota is available in your subscription, please follow **[Quota check instructions guide](./docs/quota_check.md)** before you deploy the solution.
68+
69+
<!-- Here are some example regions where the services are available: East US, East US2, Australia East, UK South, France Central. -->
70+
<!--
71+
| [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2Fdocument-generation-solution-accelerator%2Fmain%2Finfra%2Fmain.json) |
72+
|---|
73+
-->
74+
<<<<< Placeholder for Codespace | Placeholder for Dev Container >>>>>
75+
76+
### Configurable Deployment Settings
77+
78+
When you start the deployment, most parameters will have **default values**, but you can update the below settings by following the steps [here](./docs/CustomizingAzdParameters.md):
79+
80+
| **Setting** | **Description** | **Default value** |
81+
|------------|----------------| ------------|
82+
| **Azure Region** | The region where resources will be created. | eastus |
83+
| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | byocatemplate |
84+
| **Secondary Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | eastus2 |
85+
| **Deployment Type** | Select from a drop-down list. | Global Standard |
86+
| **GPT Model** | OpenAI GPT model | gpt-4o-mini |
87+
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. | 30k |
88+
| **Embedding Model** | OpenAI embedding model | text-embedding-ada-002 |
89+
| **Embedding Model Capacity** | Set the capacity for **embedding models**. | 80k |
90+
91+
92+
### [Optional] Quota Recommendations
93+
By default, the **Gpt-4o-mini model capacity** in deployment is set to **30k tokens**, so we recommend
94+
95+
<!-- **For Global Standard | GPT-4o-mini - the capacity to at least 150k tokens post-deployment for optimal performance.** -->
96+
97+
To adjust quota settings, follow these [steps](./docs/AzureGPTQuotaSettings.md)
98+
99+
### Deploying
100+
101+
To change the azd parameters from the default values, follow the steps [here](./docs/CustomizingAzdParameters.md).
102+
103+
104+
1. Login to Azure:
105+
106+
```shell
107+
azd auth login
108+
```
109+
110+
#### To authenticate with Azure Developer CLI (`azd`), use the following command with your **Tenant ID**:
111+
112+
```sh
113+
azd auth login --tenant-id <tenant-id>
114+
```
115+
116+
2. Provision and deploy all the resources:
117+
118+
```shell
119+
azd up
120+
```
121+
122+
3. Provide an `azd` environment name (like "byocaapp")
123+
4. Select a subscription from your Azure account, and select a location which has quota for all the resources.
124+
* This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data.
125+
* If you get an error or timeout with deployment, changing the location can help, as there may be availability constraints for the resources.
60126

127+
5. Once the deployment has completed successfully and you would like to use the sample data, run the bash command printed in the terminal. The bash command will look like the following:
128+
```shell
129+
bash ./infra/scripts/process_sample_data.sh
130+
```
61131

62-
> Note: Some features contained in this repository are in private preview. Certain features might not be supported or might have constrained capabilities. For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms).
132+
6. Open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service and get the app URL from `Default domain`.
63133

134+
6. You can now delete the resources by running `azd down`, if you are done trying out the application.
64135

65136
### **How to install/deploy**
66137

docs/AzureGPTQuotaSettings.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## How to Check & Update Quota
2+
3+
1. **Navigate** to the [Azure AI Foundry portal](https://ai.azure.com/).
4+
2. **Select** the AI Project associated with this accelerator.
5+
3. **Go to** the `Management Center` from the bottom-left navigation menu.
6+
4. Select `Quota`
7+
- Click on the `GlobalStandard` dropdown.
8+
- Select the required **GPT model** (`GPT-4, GPT-4o`) or **Embeddings model** (`text-embedding-ada-002`).
9+
- Choose the **region** where the deployment is hosted.
10+
5. Request More Quota or delete any unused model deployments as needed.

docs/AzureSemanticSearchRegion.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Select a region where Semantic Search Availability is available before proceeding with the deployment.
2+
3+
Steps to Check Semantic Search Availability
4+
1. Open the [Semantic Search Availability](https://learn.microsoft.com/en-us/azure/search/search-region-support) page.
5+
2. Scroll down to the **"Availability by Region"** section.
6+
3. Use the table to find supported regions for **Azure AI Search** and its **Semantic Search** feature.
7+
4. If your target region is not listed, choose a supported region for deployment.

docs/CustomizingAzdParameters.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## [Optional]: Customizing resource names
2+
3+
By default this template will use the environment name as the prefix to prevent naming collisions within Azure. The parameters below show the default values. You only need to run the statements below if you need to change the values.
4+
5+
6+
> To override any of the parameters, run `azd env set <key> <value>` before running `azd up`. On the first azd command, it will prompt you for the environment name. Be sure to choose 3-20 charaters alphanumeric unique name.
7+
8+
9+
Change the Secondary Location (example: eastus2, westus2, etc.)
10+
11+
```shell
12+
azd env set AZURE_ENV_SECONDARY_LOCATION eastus2
13+
```
14+
15+
Change the Model Deployment Type (allowed values: Standard, GlobalStandard)
16+
17+
```shell
18+
azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE Standard
19+
```
20+
21+
Set the Model Name (allowed values: gpt-4, gpt-4o)
22+
23+
```shell
24+
azd env set AZURE_ENV_MODEL_NAME gpt-4o
25+
```
26+
27+
Change the Model Capacity (choose a number based on available GPT model capacity in your subscription)
28+
29+
```shell
30+
azd env set AZURE_ENV_MODEL_CAPACITY 30
31+
```
32+
33+
Change the Embedding Model
34+
35+
```shell
36+
azd env set AZURE_ENV_EMBEDDING_MODEL_NAME text-embedding-ada-002
37+
```
38+
39+
Change the Embedding Deployment Capacity (choose a number based on available embedding model capacity in your subscription)
40+
41+
```shell
42+
azd env set AZURE_ENV_EMBEDDING_MODEL_CAPACITY 80
43+
```
12.6 KB
Loading

docs/quota_check.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
## Check Quota Availability Before Deployment
2+
3+
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
4+
> **For Global Standard | GPT-4o-mini - the capacity to at least 30K tokens for optimal performance.**
5+
6+
### Login if you have not done so already
7+
```
8+
azd auth login
9+
```
10+
11+
12+
### 📌 Default Models & Capacities:
13+
```
14+
gpt-4o-mini:30, text-embedding-ada-002:80
15+
```
16+
### 📌 Default Regions:
17+
```
18+
eastus, uksouth, eastus2, northcentralus, swedencentral, westus, westus2, southcentralus, canadacentral
19+
```
20+
### Usage Scenarios:
21+
- No parameters passed → Default models and capacities will be checked in default regions.
22+
- Only model(s) provided → The script will check for those models in the default regions.
23+
- Only region(s) provided → The script will check default models in the specified regions.
24+
- Both models and regions provided → The script will check those models in the specified regions.
25+
- `--verbose` passed → Enables detailed logging output for debugging and traceability.
26+
27+
### **Input Formats**
28+
> Use the --models, --regions, and --verbose options for parameter handling:
29+
30+
✔️ Run without parameters to check default models & regions without verbose logging:
31+
```
32+
./quota_check_params.sh
33+
```
34+
✔️ Enable verbose logging:
35+
```
36+
./quota_check_params.sh --verbose
37+
```
38+
✔️ Check specific model(s) in default regions:
39+
```
40+
./quota_check_params.sh --models gpt-4o-mini:30,text-embedding-ada-002:80
41+
```
42+
✔️ Check default models in specific region(s):
43+
```
44+
./quota_check_params.sh --regions eastus,westus
45+
```
46+
✔️ Passing Both models and regions:
47+
```
48+
./quota_check_params.sh --models gpt-4o-mini:30 --regions eastus,westus2
49+
```
50+
✔️ All parameters combined:
51+
```
52+
./quota_check_params.sh --models gpt-4o-mini:30,text-embedding-ada-002:80 --regions eastus,westus --verbose
53+
```
54+
55+
### **Sample Output**
56+
The final table lists regions with available quota. You can select any of these regions for deployment.
57+
58+
![quota-check-ouput](images/readMe/quota-check-output.png)
59+
60+
---
61+
### **If using Azure Portal and Cloud Shell**
62+
63+
1. Navigate to the [Azure Portal](https://portal.azure.com).
64+
2. Click on **Azure Cloud Shell** in the top right navigation menu.
65+
3. Run the appropriate command based on your requirement:
66+
67+
**To check quota for the deployment**
68+
69+
```sh
70+
curl -L -o quota_check_params.sh "https://raw.githubusercontent.com/microsoft/Build-your-own-copilot-Solution-Accelerator/main/infra/scripts/quota_check_params.sh"
71+
chmod +x quota_check_params.sh
72+
./quota_check_params.sh
73+
```
74+
- Refer to [Input Formats](#input-formats) for detailed commands.
75+
76+
### **If using VS Code or Codespaces**
77+
1. Open the terminal in VS Code or Codespaces.
78+
2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`.
79+
![git_bash](images/git_bash.png)
80+
3. Navigate to the `scripts` folder where the script files are located and make the script as executable:
81+
```sh
82+
cd infra/scripts
83+
chmod +x quota_check_params.sh
84+
```
85+
4. Run the appropriate script based on your requirement:
86+
87+
**To check quota for the deployment**
88+
89+
```sh
90+
./quota_check_params.sh
91+
```
92+
- Refer to [Input Formats](#input-formats) for detailed commands.
93+
94+
5. If you see the error `_bash: az: command not found_`, install Azure CLI:
95+
96+
```sh
97+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
98+
az login
99+
```
100+
6. Rerun the script after installing Azure CLI.

0 commit comments

Comments
 (0)