Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ name: document-knowledge-mining-solution-accelerator
requiredVersions:
azd: '>= 1.18.0'

metadata:
template: document-knowledge-mining-solution-accelerator@1.0
name: document-knowledge-mining-solution-accelerator@1.0
# metadata:
# template: document-knowledge-mining-solution-accelerator@1.0
# name: document-knowledge-mining-solution-accelerator@1.0
9 changes: 9 additions & 0 deletions docs/AzureAIModelQuotaSettings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# How to Check & Update AI Model Quota

Please follow [quota check instructions guide](./QuotaCheck.md) to check quota availability by region.

1. **Navigate** to the [Azure AI Foundry portal](https://ai.azure.com/).
2. **Select** the AI Project associated with this accelerator.
3. **Go to** the `Management Center` from the bottom-left navigation menu.
4. Select `Request Quota`
5. Request More Quota with fill up the form for 'Request for Quota Increase' or delete any unused model deployments as needed.
56 changes: 56 additions & 0 deletions docs/DeleteResourceGroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Deleting Resources After a Failed Deployment in Azure Portal

If your deployment fails and you need to clean up the resources manually, follow these steps in the Azure Portal.

---

## **1. Navigate to the Azure Portal**

1. Open [Azure Portal](https://portal.azure.com/).
2. Sign in with your Azure account.

---

## **2. Find the Resource Group**

1. In the search bar at the top, type **"Resource groups"** and select it.
2. Locate the **resource group** associated with the failed deployment.

![Resource Groups](./images/readme/portal_services_resource_groups.png)

![Resource Groups](./images/readme/portal_resource_groups_search.png)

---

## **3. Delete the Resource Group**

1. Click on the **resource group name** to open it.
2. Click the **Delete resource group** button at the top.

![Delete Resource Group](./images/readme/portal_resource_group_delete.png)

3. Type the resource group name in the confirmation box and click **Delete**.

📌 **Note:** Deleting a resource group will remove all resources inside it.

---

## **4. Delete Individual Resources (If Needed)**

If you don’t want to delete the entire resource group, follow these steps:

1. Open **Azure Portal** and go to the **Resource groups** section.
2. Click on the specific **resource group**.
3. Select the **resource** you want to delete (e.g., App Service, Storage Account).
4. Click **Delete** at the top.

![Delete Individual Resource](./images/readme/portal_web_app_delete.png)

---

## **5. Verify Deletion**

- After a few minutes, refresh the **Resource groups** page.
- Ensure the deleted resource or group no longer appears.

📌 **Tip:** If a resource fails to delete, check if it's **locked** under the **Locks** section and remove the lock.
471 changes: 303 additions & 168 deletions docs/DeploymentGuide.md

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions docs/PostDeploymentConfiguration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Post Deployment Configuration

## Step 1: Execute the Script

### 1.1 Open PowerShell, change directory where you code cloned, then run the deploy script:

```
cd .\Deployment\
```

### 1.2 Choose the appropriate command based on your deployment method:

**If you deployed using `azd up` command:**
```
.\resourcedeployment.ps1
```

**If you deployed using custom templates, ARM/Bicep deployments, or `az deployment group` commands:**
```
.\resourcedeployment.ps1 -ResourceGroupName "<your-resource-group-name>"
```

> **Note:** Replace `<your-resource-group-name>` with the actual name of the resource group containing your deployed Azure resources.

> **💡 Tip**: Since this guide is for azd deployment, you'll typically use the first command without the `-ResourceGroupName` parameter.

If you run into issue with PowerShell script file not being digitally signed, you can execute below command:

```
powershell.exe -ExecutionPolicy Bypass -File ".\resourcedeployment.ps1"
```

### 1.3 You will be prompted for the following parameters with this Screen :

<img src="./images/deployment/Deployment_Input_Param_01.png" width="900" alt-text="Input Parameters">

#### 1.3.1 **Email** - used for issuing certificates in Kubernetes clusters from the [Let's Encrypt](https://letsencrypt.org/) service. Email address should be valid.

<img src="./images/deployment/Deployment_Login_02.png" width="900" alt-text="Login">

#### 1.3.2 You will be prompted to Login, Select a account and proceed to Login.

#### 1.3.3 **GO !** - Post Deployment Script executes Azure Infrastructure configuration, Application code compile and publish into Kubernetes Cluster.

#### 1.3.4 Deployment Complete
#### 🥳🎉 First, congrats on finishing Deployment!
Let's check the message and configure your model's TPM rate higher to get better performance.
You can check the Application URL from the final console message.
Don't miss this Url information. This is the application's endpoint URL and it should be used for your data importing process.

<img src="./images/deployment/Deployment_Screen02.png" alt="Success Deployment" width="900">

### Manual Deployment Steps:
**Create Content Filter** - Please follow below steps
> * Navigate to project in Azure OpenAI, then go to Azure AI Foundry, select Safety + security
> * Click on Create Content Filter and set the filters to a high threshold for the following categories:
```
Hate, Sexual, Self-harm, Violence
```
> * Please select the checkbox of profanity
> * Leave all other configurations at their default settings and click on create

## Step 2: Configure Azure OpenAI Rate Limits

> **Capacity Note:**
> * The deployment script creates models with a setting of 1 token per minute (TPM) rate limit.
> * Faster performance can be achieved by increasing the TPM limit with Azure AI Foundry.
> * Capacity varies for [regional quota limits](https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits#regional-quota-limits) as well as for [provisioned throughput](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/provisioned-throughput).
> * As a starting point, we recommend the following quota threshold be set up for this service run.

| Model Name | TPM Threshold |
|------------------------|---------------|
| GPT-4.1-mini | 100K TPM |
| text-embedding-3-large | 200K TPM |


> **⚠️ Warning:** **Insufficient quota can cause failures during the upload process.** Please ensure you have the recommended capacity or request for additional capacity before start uploading the files.


### 2.1. Browse to the project in Azure AI Foundry, and select **each of the 2 models** within the `Deployments` menu:
<img src="./images/deployment/Control_Model_TPM000.png" alt="Select Model" width="700">

### 2.2. Increase the TPM value for **each model** for faster report generation:
<img src="./images/deployment/Control_Model_TPM001.png" alt="Set Token per minute" width="700">

### 3. Data Uploading and Processing
After increasing the TPM limit for each model, let's upload and process the sample documents.

Execute this command:

<img src="./images/deployment/Deployment_last_step.png" alt="Set Token per minute" width="700">
Loading
Loading