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
fix validation pipeline with missing files and actions (#1774)
* add missing sections and reorganize content
* add missing security file
* add security devops action to azure dev workflow
* add upload sarif action to azure dev workflow
* move screenshot and video after feature list
* prioritizing cost information
* moving running locally back down
* remove actions
* Some reorg that still meets reqs
* Fix broken links
* Delete local certs
---------
Co-authored-by: Pamela Fox <[email protected]>
Co-authored-by: Pamela Fox <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+53-48Lines changed: 53 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,37 +2,39 @@
2
2
3
3
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
4
5
+
[](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=599293758&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestUs2)
6
+
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-search-openai-demo)
-[VS Code Dev Containers](#vs-code-dev-containers)
14
-
-[Local environment](#local-environment)
15
-
-[Deploying](#deploying)
13
+
-[Getting Started](#getting-started)
14
+
-[GitHub Codespaces](#github-codespaces)
15
+
-[VS Code Dev Containers](#vs-code-dev-containers)
16
+
-[Local environment](#local-environment)
17
+
-[Deploying](#deploying)
16
18
-[Deploying again](#deploying-again)
17
-
-[Sharing environments](#sharing-environments)
18
-
-[Using the app](#using-the-app)
19
+
-[Sharing environments](#sharing-environments)
19
20
-[Running locally](#running-locally)
20
-
-[Monitoring with Application Insights](#monitoring-with-application-insights)
21
-
-[Customizing the UI and data](#customizing-the-ui-and-data)
22
-
-[Productionizing](#productionizing)
21
+
-[Using the app](#using-the-app)
23
22
-[Clean up](#clean-up)
24
-
-[Troubleshooting](#troubleshooting)
25
-
-[Resources](#resources)
23
+
-[Guidance](#guidance)
24
+
-[Customizing the UI and data](#customizing-the-ui-and-data)
25
+
-[Monitoring with Application Insights](#monitoring-with-application-insights)
26
+
-[Productionizing](#productionizing)
27
+
-[Troubleshooting](#troubleshooting)
28
+
-[Resources](#resources)
26
29
27
-
[](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=599293758&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestUs2)
28
-
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-search-openai-demo)
30
+

31
+
32
+
[📺 Watch a video overview of the app.](https://youtu.be/3acB0OWmLvM)
29
33
30
34
This sample demonstrates a few approaches for creating ChatGPT-like experiences over your own data using the Retrieval Augmented Generation pattern. It uses Azure OpenAI Service to access a GPT model (gpt-35-turbo), and Azure AI Search for data indexing and retrieval.
31
35
32
36
The repo includes sample data so it's ready to try end to end. In this sample application we use a fictitious company called Contoso Electronics, and the experience allows its employees to ask questions about the benefits, internal policies, as well as job descriptions and roles.
@@ -58,8 +60,6 @@ The repo includes sample data so it's ready to try end to end. In this sample ap
58
60
- Your Azure account must have `Microsoft.Authorization/roleAssignments/write` permissions, such as [Role Based Access Control Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview), [User Access Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#user-access-administrator), or [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner). If you don't have subscription-level permissions, you must be granted [RBAC](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview) for an existing resource group and [deploy to that existing group](docs/deploy_existing.md#resource-group).
59
61
- Your Azure account also needs `Microsoft.Resources/deployments/write` permissions on the subscription level.
60
62
61
-
## Azure deployment
62
-
63
63
### Cost estimation
64
64
65
65
Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage.
@@ -78,30 +78,31 @@ See this guide on [deploying with minimal costs](docs/deploy_lowcost.md) for mor
78
78
⚠️ To avoid unnecessary costs, remember to take down your app if it's no longer in use,
79
79
either by deleting the resource group in the Portal or running `azd down`.
80
80
81
-
### Project setup
81
+
##Getting Started
82
82
83
83
You have a few options for setting up this project.
84
84
The easiest way to get started is GitHub Codespaces, since it will setup all the tools for you,
85
85
but you can also [set it up locally](#local-environment) if desired.
86
86
87
-
####GitHub Codespaces
87
+
### GitHub Codespaces
88
88
89
89
You can run this repo virtually by using GitHub Codespaces, which will open a web-based VS Code in your browser:
90
90
91
91
[](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=599293758&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestUs2)
92
92
93
93
Once the codespace opens (this may take several minutes), open a terminal window.
94
94
95
-
####VS Code Dev Containers
95
+
### VS Code Dev Containers
96
96
97
97
A related option is VS Code Dev Containers, which will open the project in your local VS Code using the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers):
98
98
99
99
1. Start Docker Desktop (install it if not already installed)
100
-
1. Open the project:
100
+
2. Open the project:
101
101
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-search-openai-demo)
102
-
1. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
103
102
104
-
#### Local environment
103
+
3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
104
+
105
+
### Local environment
105
106
106
107
1. Install the required tools:
107
108
@@ -123,7 +124,7 @@ A related option is VS Code Dev Containers, which will open the project in your
123
124
124
125
Note that this command will initialize a git repository, so you do not need to clone this repository.
125
126
126
-
### Deploying
127
+
## Deploying
127
128
128
129
Follow these steps to provision Azure resources and deploy the application code:
129
130
@@ -162,7 +163,7 @@ If you've changed the infrastructure files (`infra` folder or `azure.yaml`), the
162
163
163
164
```azd up```
164
165
165
-
## Sharing environments
166
+
#### Sharing environments
166
167
167
168
To give someone else access to a completely deployed and existing environment,
168
169
either you or they can follow these steps:
@@ -176,7 +177,7 @@ either you or they can follow these steps:
176
177
177
178
## Running locally
178
179
179
-
You can only run locally **after** having successfully run the `azd up` command. If you haven't yet, follow the steps in [Azure deployment](#azure-deployment) above.
180
+
You can only run locally **after** having successfully run the `azd up` command. If you haven't yet, follow the [deploying](#deploying) steps above.
180
181
181
182
1. Run `azd auth login`
182
183
2. Change dir to `app`
@@ -195,7 +196,25 @@ Once in the web app:
195
196
- Explore citations and sources
196
197
- Click on "settings" to try different options, tweak prompts, etc.
197
198
198
-
## Monitoring with Application Insights
199
+
## Clean up
200
+
201
+
To clean up all the resources created by this sample:
202
+
203
+
1. Run `azd down`
204
+
2. When asked if you are sure you want to continue, enter `y`
205
+
3. When asked if you want to permanently delete the resources, enter `y`
206
+
207
+
The resource group and all the resources will be deleted.
208
+
209
+
## Guidance
210
+
211
+
Besides the tips below, you can find extensive documentation in the [docs](docs/README.md) folder.
212
+
213
+
### Customizing the UI and data
214
+
215
+
Once you successfully deploy the app, you can start customizing it for your needs: changing the text, tweaking the prompts, and replacing the data. Consult the [app customization guide](docs/customization.md) as well as the [data ingestion guide](docs/data_ingestion.md) for more details.
216
+
217
+
### Monitoring with Application Insights
199
218
200
219
By default, deployed apps use Application Insights for the tracing of each request, along with the logging of errors.
201
220
@@ -212,27 +231,13 @@ You can also see chart summaries on a dashboard by running the following command
212
231
azd monitor
213
232
```
214
233
215
-
## Customizing the UI and data
216
-
217
-
Once you successfully deploy the app, you can start customizing it for your needs: changing the text, tweaking the prompts, and replacing the data. Consult the [app customization guide](docs/customization.md) as well as the [data ingestion guide](docs/data_ingestion.md) for more details.
218
-
219
-
## Productionizing
234
+
### Productionizing
220
235
221
236
This sample is designed to be a starting point for your own production application,
222
237
but you should do a thorough review of the security and performance before deploying
223
238
to production. Read through our [productionizing guide](docs/productionizing.md) for more details.
224
239
225
-
## Clean up
226
-
227
-
To clean up all the resources created by this sample:
228
-
229
-
1. Run `azd down`
230
-
2. When asked if you are sure you want to continue, enter `y`
231
-
3. When asked if you want to permanently delete the resources, enter `y`
232
-
233
-
The resource group and all the resources will be deleted.
234
-
235
-
## Troubleshooting
240
+
### Troubleshooting
236
241
237
242
Here are the most common failure scenarios and solutions:
238
243
@@ -248,7 +253,7 @@ Here are the most common failure scenarios and solutions:
248
253
249
254
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.
250
255
251
-
## Resources
256
+
### Resources
252
257
253
258
- [Additional documentation for this app](docs/README.md)
254
259
- [📖 Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and AI Search](https://aka.ms/entgptsearchblog)
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6
+
7
+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](<https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)>), please report it to us as described below.
8
+
9
+
## Reporting Security Issues
10
+
11
+
**Please do not report security vulnerabilities through public GitHub issues.**
12
+
13
+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14
+
15
+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc).
16
+
17
+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18
+
19
+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
+
21
+
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
+
- Full paths of source file(s) related to the manifestation of the issue
23
+
- The location of the affected source code (tag/branch/commit or direct URL)
24
+
- Any special configuration required to reproduce the issue
25
+
- Step-by-step instructions to reproduce the issue
26
+
- Proof-of-concept or exploit code (if possible)
27
+
- Impact of the issue, including how an attacker might exploit the issue
28
+
29
+
This information will help us triage your report more quickly.
30
+
31
+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32
+
33
+
## Preferred Languages
34
+
35
+
We prefer all communications to be in English.
36
+
37
+
## Policy
38
+
39
+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd).
Copy file name to clipboardExpand all lines: docs/deploy_features.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ By default, the deployed Azure web app allows users to chat with all your indexe
166
166
167
167
## Enabling user document upload
168
168
169
-
You can enable an optional user document upload system to allow users to upload their own documents and chat with them. This feature requires you to first [enable login and document level access control](docs/login_and_acl.md). Then you can enable the optional user document upload system by setting an azd environment variable:
169
+
You can enable an optional user document upload system to allow users to upload their own documents and chat with them. This feature requires you to first [enable login and document level access control](./login_and_acl.md). Then you can enable the optional user document upload system by setting an azd environment variable:
170
170
171
171
`azd env set USE_USER_UPLOAD true`
172
172
@@ -205,15 +205,15 @@ Both these repositories adhere to the same [HTTP protocol for AI chat apps](http
205
205
206
206
## Adding an OpenAI load balancer
207
207
208
-
As discussed in more details in our [productionizing guide](docs/productionizing.md), you may want to consider implementing a load balancer between OpenAI instances if you are consistently going over the TPM limit.
208
+
As discussed in more details in our [productionizing guide](./productionizing.md), you may want to consider implementing a load balancer between OpenAI instances if you are consistently going over the TPM limit.
209
209
Fortunately, this repository is designed for easy integration with other repositories that create load balancers for OpenAI instances. For seamless integration instructions with this sample, please check:
210
210
211
211
* [Scale Azure OpenAI for Python with Azure API Management](https://learn.microsoft.com/azure/developer/python/get-started-app-chat-scaling-with-azure-api-management)
212
212
* [Scale Azure OpenAI for Python chat using RAG with Azure Container Apps](https://learn.microsoft.com/azure/developer/python/get-started-app-chat-scaling-with-azure-container-apps)
213
213
214
214
## Deploying with private endpoints
215
215
216
-
It is possible to deploy this app with public access disabled, using Azure private endpoints and private DNS Zones. For more details, read [the private deployment guide](docs/deploy_private.md). That requires a multi-stage provisioning, so you will need to do more than just `azd up` after setting the environment variables.
216
+
It is possible to deploy this app with public access disabled, using Azure private endpoints and private DNS Zones. For more details, read [the private deployment guide](./deploy_private.md). That requires a multi-stage provisioning, so you will need to do more than just `azd up` after setting the environment variables.
0 commit comments