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: docs/01-getting-started.md
+4-7Lines changed: 4 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,19 +53,16 @@ azd up
53
53
54
54
### 4. Wait for Document Indexing
55
55
56
-
After deployment completes, the system will automatically index PDF documents into Azure AI Search. The sample includes **262 documents** that need to be indexed before you can use the `/answer` endpoint effectively.
56
+
After deployment completes, the system will automatically index PDF documents into Azure AI Search. The sample includes **263 documents** that need to be indexed before you can use the `/answer` endpoint effectively.
57
57
58
58
You can check the indexing status in the deployment output, or use the Azure Portal to view your Azure AI Search service.
59
59
60
60
### 5. Test the API
61
61
62
-
Once indexing is complete, you can test the API:
62
+
Once indexing is complete, you can test the API using the URL displayed at the end of the `azd up` command:
63
63
64
64
```bash
65
-
# Get the deployed app URL from azd
66
-
azd env get-values | grep SERVICE_API_URI
67
-
68
-
# Test the API
65
+
# Test the API (use the URL from azd up output)
69
66
curl -X POST <YOUR_API_URL>/answer \
70
67
-H "Content-Type: application/json" \
71
68
-d '{"question": "What are the standard benefit options?"}'
@@ -90,7 +87,7 @@ If deployment fails, check:
90
87
### Can't Query Documents
91
88
92
89
If queries return empty results:
93
-
- Ensure all 262 documents are indexed (check `INDEX_DOCUMENT_COUNT` in environment variables)
90
+
- Ensure all 263 documents are indexed (check `INDEX_DOCUMENT_COUNT` in environment variables)
94
91
- Wait a few minutes after deployment for indexing to complete
95
92
- Check the Azure AI Search service in the Azure Portal
Copy file name to clipboardExpand all lines: docs/02-local-development.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,13 +62,9 @@ This will install dependencies for both the root project and all workspace packa
62
62
63
63
### 2. Configure Environment Variables
64
64
65
-
Create a `.env` file in the repository root:
65
+
**Prerequisites**: Complete the `azd up` deployment first (see [Getting Started](./01-getting-started.md)), which automatically creates the `.env` file with all necessary Azure resource information.
66
66
67
-
```bash
68
-
cp sample.env .env
69
-
```
70
-
71
-
Edit `.env` with your Azure resource information:
67
+
If you need to manually update environment variables, edit the `.env` file in the repository root:
72
68
73
69
```bash
74
70
# Azure OpenAI
@@ -132,14 +128,16 @@ The API server will start on `http://localhost:3000`.
132
128
133
129
### Working with Vector Data
134
130
131
+
**Note**: If you deployed with `azd up`, vector data is already loaded. These commands are only needed if you're setting up from scratch without using `azd up`.
132
+
135
133
```bash
136
-
# Load PDF documents into Azure AI Search index
134
+
# Load PDF documents into Azure AI Search index (only needed if not using azd up)
137
135
npm run load_data
138
136
139
-
# Test embedding generation
137
+
# Test embedding generation (useful for verifying Azure OpenAI authentication)
140
138
npm run embed
141
139
142
-
# Test LLM completion
140
+
# Test LLM completion (useful for verifying Azure OpenAI authentication)
@@ -162,29 +161,29 @@ This runs the complete deployment pipeline:
162
161
163
162
### Incremental Commands
164
163
164
+
**Note**: These commands are handled automatically by `azd up` hooks. You typically won't need to run them manually unless you're doing custom development.
165
+
165
166
```bash
166
167
# Provision/update infrastructure only
167
168
azd provision
168
169
169
170
# Deploy application code only (infrastructure must exist)
170
171
azd deploy
171
172
172
-
# View environment variables
173
-
azd env get-values
174
-
175
-
# Set environment variable
176
-
azd env set KEY value
177
-
178
173
# Delete all resources
179
-
azd down
174
+
azd down --purge
180
175
```
181
176
177
+
**About `--purge` flag**: Using `azd down --purge` immediately releases Azure resource quotas. Without `--purge`, some resources (like OpenAI deployments) may hold quota for up to 48 hours, which could prevent redeployment.
178
+
182
179
## Bicep Infrastructure as Code
183
180
184
-
The `infra/main.bicep` file uses Azure Verified Modules (AVM) for best-practice resource configuration:
181
+
The `infra/main.bicep` file uses [Azure Verified Modules (AVM)](https://azure.github.io/Azure-Verified-Modules/) for best-practice resource configuration.
182
+
183
+
**Why use AVM?** Azure Verified Modules provide pre-built, tested, and maintained Bicep modules that follow Microsoft's best practices. Instead of writing raw Bicep resource definitions, you use these curated modules which handle security, networking, and configuration complexity for you. This reduces errors and ensures your infrastructure follows Azure's recommended patterns.
Where `prefix = environmentName + resourceToken` (13-char hash).
230
242
231
243
### Resource Token
232
244
@@ -246,6 +258,16 @@ The application is currently configured to deploy to specific regions with OpenA
246
258
247
259
These regions support the required GPT and embedding models. See [Azure OpenAI Model Availability](https://learn.microsoft.com/azure/ai-services/openai/concepts/models) for the latest regional information.
248
260
261
+
**To update allowed regions**: Edit the `location` parameter's `@allowed` array in `infra/main.bicep` (lines 11-15):
262
+
263
+
```bicep
264
+
@allowed([
265
+
'eastus2'
266
+
'swedencentral'
267
+
])
268
+
param location string
269
+
```
270
+
249
271
## Monitoring and Troubleshooting
250
272
251
273
### View Application Logs
@@ -292,7 +314,7 @@ The resources created incur costs:
Copy file name to clipboardExpand all lines: docs/05-azure-identity-authentication.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,8 @@ export async function azureADTokenProvider_OpenAI() {
70
70
}
71
71
```
72
72
73
+
**About the token provider**: The `azureADTokenProvider` is specific to third-party SDKs like LangChain that don't natively support Azure SDK authentication patterns. When using official Azure SDKs (like `@azure/search-documents`), you can pass the `DefaultAzureCredential` directly without a token provider. However, LangChain's `@langchain/openai` package requires a token provider function that returns a string token, hence this wrapper.
74
+
73
75
This token provider is used when initializing Azure OpenAI clients in LangChain:
Copy file name to clipboardExpand all lines: docs/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ See [Azure Container Apps](./06-azure-container-apps.md) for details.
74
74
75
75
### Vector Store Indexing
76
76
77
-
The application loads **262 documents** into Azure AI Search as embedding vectors. You must wait for indexing to complete before using the `/answer` endpoint.
77
+
The application loads **263 documents** into Azure AI Search as embedding vectors. You must wait for indexing to complete before using the `/answer` endpoint.
78
78
79
79
See [Azure AI Search Vector Store](./07-azure-ai-search-vector-store.md) for details.
80
80
@@ -137,8 +137,8 @@ See [Azure Container Apps](./06-azure-container-apps.md) and [Azure AI Search Ve
137
137
138
138
### Empty or Poor Answers
139
139
140
-
- Wait for all 262 documents to be indexed
141
-
- Check `INDEX_DOCUMENT_COUNT` equals 262
140
+
- Wait for all 263 documents to be indexed
141
+
- Check `INDEX_DOCUMENT_COUNT` equals 263
142
142
- Verify Azure AI Search and OpenAI are accessible
143
143
- Review application logs for errors
144
144
@@ -165,7 +165,7 @@ See [Azure Container Apps](./06-azure-container-apps.md) and [Azure AI Search Ve
0 commit comments