Skip to content

Commit 588db5b

Browse files
Merge pull request #3219 from fosteramanda/vnet-minor-fixes
Adding Query Type Parameter API Update - Azure AI Search tool
2 parents 6d4042b + 7b0bf0e commit 588db5b

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

articles/ai-services/agents/how-to/tools/azure-ai-search.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,19 @@ Use an existing Azure AI Search index with the agent's Azure AI Search tool.
2121
> Azure AI Search indexes must meet the following requirements:
2222
> - The index must contain at least one searchable & retrievable text field (type Edm.String)
2323
> - The index must contain at least one searchable vector field (type Collection(Edm.Single))
24-
> - The index must use a vector profile/integrated vectorization
24+
> - The index is assumed to be configured properly
2525
2626
## Search types
27+
You can specify the search type for your index by choosing one of the following
28+
- Simple
29+
- Semantic
30+
- Vector
31+
- Hybrid (Vector + Keyword)
32+
- Hybrid (Vector + Keyword + Semantic)
2733

28-
**Index without semantic configuration**
29-
- By default, the Azure AI Search tool runs a hybrid search (keyword + vector) on all text fields.
30-
<br>
3134

32-
**Index with semantic configuration**
33-
- By default, the Azure AI Search tool runs hybrid + semantic search on all text fields.
35+
**Indexes without a specified search type**
36+
- By default, the Azure AI Search tool runs a hybrid search (keyword + vector) on all text fields
3437

3538
## Usage support
3639

articles/ai-services/agents/includes/azure-search/code-examples.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ conn_id = "/subscriptions/<your-subscription-id>/resourceGroups/<your-resource-
136136

137137
# Initialize agent AI search tool and add the search index connection ID and index name
138138
# TO DO: replace <your-index-name> with the name of the index you want to use
139-
ai_search = AzureAISearchTool(index_connection_id=conn_id, index_name="<your-index-name>")
139+
ai_search = AzureAISearchTool(index_connection_id=conn_id, index_name="<your-index-name>"
140+
query_type="<select-search-type>")
140141
```
141142
# [C#](#tab/csharp)
142143
```csharp
@@ -149,7 +150,7 @@ ToolResources searchResource = new ToolResources
149150
{
150151
AzureAISearch = new AzureAISearchResource
151152
{
152-
IndexList = { new IndexResource(connection.Id, "<your-index-name>") }
153+
IndexList = { new IndexResource(connection.Id, "<your-index-name>", "<select-search-type>") }
153154
}
154155
};
155156
```

0 commit comments

Comments
 (0)