Skip to content

Commit 1d68c65

Browse files
committed
Fix and do not deploy embeddings model if it is not needed.
1 parent 072d98f commit 1d68c65

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ azd env set AZURE_AI_AGENT_MODEL_VERSION <MODEL_VERSION>
6161
```
6262

6363
#### How to configure Agent knowledge retrieval
64-
By default, the template deploys OpenAI's file search for agent's knowledge retrieval. An agent also can perform search using the search index, deployed in Azure AI Search resource. The semantic index search represents so-called hybrid search i.e. it uses LLM to search for the relevant context in the provided index as well as embedding similarity search. This index is built from the `embeddings.csv` file, containing the embeddings vectors, followed by the contexts.
64+
By default, the template deploys OpenAI's [file search](https://learn.microsoft.com/azure/ai-services/agents/how-to/tools/file-search?tabs=python&pivots=overview) for agent's knowledge retrieval. An agent also can perform search using the search index, deployed in Azure AI Search resource. The semantic index search represents so-called hybrid search i.e. it uses LLM to search for the relevant context in the provided index as well as embedding similarity search. This index is built from the `embeddings.csv` file, containing the embeddings vectors, followed by the contexts.
6565
To use index search, please set the local environment variable `USE_AZURE_AI_SEARCH_SERVICE` to `true` during the `azd up` command. In this case the Azure AI Search resource will be deployed and used.
6666

6767
#### Logging

infra/main.bicep

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ var tags = { 'azd-env-name': environmentName }
138138

139139
var agentID = !empty(aiAgentID) ? aiAgentID : ''
140140

141-
var aiDeployments = [
141+
var aiChatModel = [
142142
{
143143
name: agentDeploymentName
144144
model: {
@@ -151,6 +151,8 @@ var aiDeployments = [
151151
capacity: agentDeploymentCapacity
152152
}
153153
}
154+
]
155+
var aiEmbeddingModel = [
154156
{
155157
name: embeddingDeploymentName
156158
model: {
@@ -165,6 +167,10 @@ var aiDeployments = [
165167
}
166168
]
167169

170+
var aiDeployments = concat(
171+
aiChatModel,
172+
useSearchService ? aiEmbeddingModel : [])
173+
168174
//for container and app api
169175
param apiAppExists bool = false
170176

0 commit comments

Comments
 (0)