-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add low cost deployment process and update Azure AI Document Intellig…
…ence references (#364) ## Purpose This pull request updates the references to Azure Form Recognizer to Azure AI Document Intelligence. It also includes changes to the deployment process to support low-cost deployment using services with free tiers. The documentation has been updated to provide a step-by-step guide for deploying with minimal costs. Additionally, a video link has been added to showcase the low-cost deployment process. ## Does this introduce a breaking change? <!-- Mark one with an "x". --> ``` [ ] Yes [X] No ``` ## Pull Request Type What kind of change does this Pull Request introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [X] Feature [ ] Code style update (formatting, local variables) [X] Refactoring (no functional changes, no api changes) [X] Documentation content changes [ ] Other... Please describe: ``` ## How to Test * Get the code ``` git clone [repo-address] cd [repo-name] ``` Follow the low-cost deploy document instructions.
- Loading branch information
Showing
10 changed files
with
103 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Deploying with Minimal Costs | ||
|
||
This AI RAG chat application is designed to be easily deployed using the Azure Developer CLI, which provisions the infrastructure according to the Bicep files in the `infra` folder. Those files describe each of the Azure resources needed, and configures their SKU (pricing tier) and other parameters. Many Azure services offer a free tier, but the infrastructure files in this project do *not* default to the free tier as there are often limitations in that tier. | ||
|
||
However, if your goal is to minimize costs while prototyping your application, follow the steps below *before* running `azd up`. Once you've gone through these steps, return to the [deployment steps](../README.md#deployment). | ||
|
||
[📺 Live stream: Deploying from a free account](https://youtu.be/V1ZLzXU4iiw) | ||
|
||
1. Log in to your Azure account using the Azure Developer CLI: | ||
|
||
```shell | ||
azd auth login | ||
``` | ||
|
||
1. Create a new azd environment for the free resource group: | ||
|
||
```shell | ||
azd env new | ||
``` | ||
|
||
Enter a name that will be used for the resource group. | ||
This will create a new folder in the `.azure` folder, and set it as the active environment for any calls to `azd` going forward. | ||
|
||
1. Use the free tier of **Azure AI Document Intelligence** (previously known as [Form Recognizer](https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/overview?view=doc-intel-4.0.0)): | ||
|
||
```shell | ||
azd env set AZURE_FORMRECOGNIZER_SERVICE_SKU F0 | ||
``` | ||
|
||
1. Use the free tier of **Azure AI Search**: | ||
|
||
```shell | ||
azd env set AZURE_SEARCH_SERVICE_SKU free | ||
azd env set AZURE_SEARCH_SEMANTIC_RANKER disabled | ||
``` | ||
|
||
Limitations: | ||
1. You are only allowed one free search service across all regions. | ||
If you have one already, either delete that service or follow instructions to | ||
reuse your [existing search service](../README.md#use-existing-resources). | ||
2. The free tier does not support semantic ranker. Note that will generally result in [decreased search relevance](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/azure-ai-search-outperforming-vector-search-with-hybrid/ba-p/3929167). | ||
|
||
1. Turn off **Azure Monitor** (Application Insights): | ||
|
||
```shell | ||
azd env set AZURE_USE_APPLICATION_INSIGHTS false | ||
``` | ||
|
||
Application Insights is quite inexpensive already, so turning this off may not be worth the costs saved, but it is an option for those who want to minimize costs. | ||
|
||
1. (Optional) Use **OpenAI.com** instead of Azure OpenAI. | ||
|
||
You can create a free account in OpenAI and [request a key to use OpenAI models](https://platform.openai.com/docs/quickstart/create-and-export-an-api-key). Once you have this, you can disable the use of Azure OpenAI Services, and use OpenAI APIs. | ||
|
||
```shell | ||
azd env set USE_AOAI false | ||
azd env set USE_VISION false | ||
azd env set OPENAI_CHATGPT_DEPLOYMENT gpt-4o-mini | ||
azd env set OPENAI_API_KEY <your openai.com key goes here> | ||
``` | ||
|
||
***Note:** Both Azure OpenAI and openai.com OpenAI accounts will incur costs, based on tokens used, but the costs are fairly low for the amount of sample data (less than $10).* | ||
|
||
1. Once you've made the desired customizations, follow the steps in the README [to run `azd up`](../README.md#deploying-from-scratch). We recommend using "eastus" as the region, for availability reasons. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters