Skip to content

Commit aea2e6b

Browse files
committed
adding query type
1 parent 600af69 commit aea2e6b

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,18 @@ zone_pivot_groups: selection-azure-ai-search
1717
::: zone pivot="overview-azure-ai-search"
1818
Use an existing Azure AI Search index with the agent's Azure AI Search tool.
1919

20-
> [!NOTE]
21-
> Azure AI Search indexes must meet the following requirements:
22-
> - The index must contain at least one searchable & retrievable text field (type Edm.String)
23-
> - The index must contain at least one searchable vector field (type Collection(Edm.Single))
24-
> - The index must use a vector profile/integrated vectorization
2520

2621
## Search types
22+
You can specify the search type for your index by choosing one of the following
23+
- Simple
24+
- Semantic
25+
- Vector
26+
- Hybrid (Vector + Keyword)
27+
- Hybrid (Vector + Keyword + Semantic)
2728

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>
3129

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

3533
## Usage support
3634

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

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

131131
# Initialize agent AI search tool and add the search index connection ID and index name
132132
# TO DO: replace <your-index-name> with the name of the index you want to use
133-
ai_search = AzureAISearchTool(index_connection_id=conn_id, index_name="<your-index-name>")
133+
ai_search = AzureAISearchTool(index_connection_id=conn_id, index_name="<your-index-name>"
134+
query_type="<select-search-type>")
134135
```
135136
# [C#](#tab/csharp)
136137
```csharp
@@ -143,7 +144,7 @@ ToolResources searchResource = new ToolResources
143144
{
144145
AzureAISearch = new AzureAISearchResource
145146
{
146-
IndexList = { new IndexResource(connection.Id, "<your-index-name>") }
147+
IndexList = { new IndexResource(connection.Id, "<your-index-name>", "<select-search-type>") }
147148
}
148149
};
149150
```

0 commit comments

Comments
 (0)