You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-8Lines changed: 30 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,25 @@
1
-
# ChatGPT-like app with your data using Azure OpenAI and Azure AI Search (Python)
1
+
<!--
2
+
---
3
+
name: RAG chat app with your data (Python)
4
+
description: Chat with your domain data using Azure OpenAI and Azure AI Search.
5
+
languages:
6
+
- python
7
+
- typescript
8
+
- bicep
9
+
- azdeveloper
10
+
products:
11
+
- azure-openai
12
+
- azure-cognitive-search
13
+
- azure-app-service
14
+
- azure
15
+
page_type: sample
16
+
urlFragment: azure-search-openai-demo
17
+
---
18
+
-->
19
+
20
+
# RAG chat app with Azure OpenAI and Azure AI Search (Python)
21
+
22
+
This solution creates a ChatGPT-like frontend experience over your own documents using RAG (Retrieval Augmented Generation). It uses Azure OpenAI Service to access GPT models, and Azure AI Search for data indexing and retrieval.
2
23
3
24
This solution's backend is written in Python. There are also [**JavaScript**](https://aka.ms/azai/js/code), [**.NET**](https://aka.ms/azai/net/code), and [**Java**](https://aka.ms/azai/java/code) samples based on this one. Learn more about [developing AI apps using Azure AI Services](https://aka.ms/azai).
4
25
@@ -65,8 +86,8 @@ The repo includes sample data so it's ready to try end to end. In this sample ap
65
86
Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage.
66
87
However, you can try the [Azure pricing calculator](https://azure.com/e/a87a169b256e43c089015fda8182ca87) for the resources below.
67
88
68
-
- Azure App Service: Basic Tier with 1 CPU core, 1.75 GB RAM. Pricing per hour. [Pricing](https://azure.microsoft.com/pricing/details/app-service/linux/)
69
-
- Azure Container Apps: Only provisioned if you deploy to Azure Container Apps following [the ACA deployment guide](docs/azure_container_apps.md). Consumption plan with 1 CPU core, 2.0 GB RAM. Pricing with Pay-as-You-Go. [Pricing](https://azure.microsoft.com/pricing/details/container-apps/)
89
+
- Azure Container Apps: Default host for app deployment as of 10/28/2024. See more details in [the ACA deployment guide](docs/azure_container_apps.md). Consumption plan with 1 CPU core, 2.0 GB RAM. Pricing with Pay-as-You-Go. [Pricing](https://azure.microsoft.com/pricing/details/container-apps/)
90
+
- Azure App Service: Only provisioned if you deploy to Azure App Service following [the App Service deployment guide](docs/azure_app_service.md). Basic Tier with 1 CPU core, 1.75 GB RAM. Pricing per hour. [Pricing](https://azure.microsoft.com/pricing/details/app-service/linux/)
70
91
- Azure OpenAI: Standard tier, GPT and Ada models. Pricing per 1K tokens used, and at least 1K tokens are used per question. [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/)
71
92
- Azure AI Document Intelligence: SO (Standard) tier using pre-built layout. Pricing per document page, sample documents have 261 pages total. [Pricing](https://azure.microsoft.com/pricing/details/form-recognizer/)
72
93
- Azure AI Search: Basic tier, 1 replica, free level of semantic search. Pricing per hour. [Pricing](https://azure.microsoft.com/pricing/details/search/)
@@ -128,7 +149,7 @@ A related option is VS Code Dev Containers, which will open the project in your
128
149
129
150
## Deploying
130
151
131
-
The steps below will provision Azure resources and deploy the application code to Azure App Service. To deploy to Azure Container Apps instead, follow [the container apps deployment guide](docs/azure_container_apps.md).
152
+
The steps below will provision Azure resources and deploy the application code to Azure Container Apps. To deploy to Azure App Service instead, follow [the app service deployment guide](docs/azure_app_service.md).
132
153
133
154
1. Login to your Azure account:
134
155
@@ -137,6 +158,7 @@ The steps below will provision Azure resources and deploy the application code t
137
158
```
138
159
139
160
For GitHub Codespaces users, if the previous command fails, try:
161
+
140
162
```shell
141
163
azd auth login --use-device-code
142
164
```
@@ -158,7 +180,7 @@ It will look like the following:
158
180
159
181

160
182
161
-
> NOTE: It may take 5-10 minutes after you see 'SUCCESS'for the application to be fully deployed. If you see a "Python Developer" welcome screen or an error page, thenwait a bit and refresh the page. See [guide on debugging App Service deployments](docs/appservice.md).
183
+
> NOTE: It may take 5-10 minutes after you see 'SUCCESS'for the application to be fully deployed. If you see a "Python Developer" welcome screen or an error page, thenwait a bit and refresh the page.
162
184
163
185
### Deploying again
164
186
@@ -262,16 +284,16 @@ Here are the most common failure scenarios and solutions:
262
284
263
285
1. You see `CERTIFICATE_VERIFY_FAILED` when the `prepdocs.py` script runs. That's typically due to incorrect SSL certificates setup on your machine. Try the suggestions in this [StackOverflow answer](https://stackoverflow.com/questions/35569042/ssl-certificate-verify-failed-with-python3/43855394#43855394).
264
286
265
-
1. After running `azd up` and visiting the website, you see a '404 Not Found'in the browser. Wait 10 minutes and try again, as it might be still starting up. Then try running `azd deploy` and wait again. If you still encounter errors with the deployed app, consult the [guide on debugging App Service deployments](docs/appservice.md). Please file an issue if the logs don't help you resolve the error.
287
+
1. After running `azd up` and visiting the website, you see a '404 Not Found'in the browser. Wait 10 minutes and try again, as it might be still starting up. Then try running `azd deploy` and wait again. If you still encounter errors with the deployed app and are deploying to App Service, consult the [guide on debugging App Service deployments](docs/appservice.md). Please file an issue if the logs don't help you resolve the error.
266
288
267
289
### Resources
268
290
269
291
- [Additional documentation for this app](docs/README.md)
270
-
- [📖 Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and AI Search](https://aka.ms/entgptsearchblog)
292
+
- [📖 Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and AI Search](https://techcommunity.microsoft.com/blog/azure-ai-services-blog/revolutionize-your-enterprise-data-with-chatgpt-next-gen-apps-w-azure-openai-and/3762087)
271
293
- [📖 Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search)
- [📖 Comparing Azure OpenAI and OpenAI](https://learn.microsoft.com/azure/cognitive-services/openai/overview#comparing-azure-openai-and-openai/)
274
-
- [📖 Access Control in Generative AI applications with Azure Cognitive Search](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/access-control-in-generative-ai-applications-with-azure/ba-p/3956408)
296
+
- [📖 Access Control in Generative AI applications with Azure AI Search](https://techcommunity.microsoft.com/blog/azure-ai-services-blog/access-control-in-generative-ai-applications-with-azure-ai-search/3956408)
275
297
- [📺 Quickly build and deploy OpenAI apps on Azure, infused with your own data](https://www.youtube.com/watch?v=j8i-OM5kwiY)
276
298
- [📺 AI Chat App Hack series](https://www.youtube.com/playlist?list=PL5lwDBUC0ag6_dGZst5m3G72ewfwXLcXV)
0 commit comments