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: articles/search/search-agentic-retrieval-how-to-create.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,7 @@ PUT https://{{search-url}}/agents/{{agent-name}}?api-version=2025-05-01-preview
196
196
}
197
197
```
198
198
199
-
+ `defaultRerankerThreshold` is the minimum semantic reranker score that's acceptable for inclusion in a response. [Reranker scores](semantic-search-overview.md#how-ranking-is-scored) range from 1 to 4. Plan on revising this value based on testing and what works for your content.
199
+
+ `defaultRerankerThreshold` is the minimum semantic reranker score that's acceptable for inclusion in a response. [Reranker scores](semantic-search-overview.md#how-results-are-scored) range from 1 to 4. Plan on revising this value based on testing and what works for your content.
200
200
201
201
+ `defaultIncludeReferenceSourceData` is a boolean that determines whether the reference portion of the response includes source data. We recommend starting with this value set to true if you want to shape your own response using output from the search engine. Otherwise, if you want to use the output in the response `content` string, you can set it to false.
Copy file name to clipboardExpand all lines: articles/search/search-agentic-retrieval-how-to-retrieve.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ POST https://{{search-url}}/agents/{{agent-name}}/retrieve?api-version=2025-05-0
103
103
104
104
+`rerankerThreshold` and `maxDocsForReranker` are also initially set in the knowledge agent definition as defaults. You can override them in the retrieve action to configure [semantic reranker](semantic-how-to-configure.md), setting minimum thresholds and the maximum number of inputs sent to the reranker.
105
105
106
-
`rerankerThreshold` is the minimum semantic reranker score that's acceptable for inclusion in a response. [Reranker scores](semantic-search-overview.md#how-ranking-is-scored) range from 1 to 4. Plan on revising this value based on testing and what works for your content.
106
+
`rerankerThreshold` is the minimum semantic reranker score that's acceptable for inclusion in a response. [Reranker scores](semantic-search-overview.md#how-results-are-scored) range from 1 to 4. Plan on revising this value based on testing and what works for your content.
107
107
108
108
`maxDocsForReranker` dictates the maximum number of documents to consider for the final response string. Semantic reranker accepts 50 documents. If the maximum is 200, four more subqueries are added to the query plan to ensure all 200 documents are semantically ranked. for semantic ranking. If the number isn't evenly divisible by 50, the query plan rounds up to nearest whole number.
Copy file name to clipboardExpand all lines: articles/search/search-relevance-overview.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: How scoring works
2
+
title: How relevance scoring works
3
3
titleSuffix: Azure AI Search
4
-
description: Describes the ranking algorithms in Azure AI Search and how to use them together.
4
+
description: Describes how the scoring and ranking algorithms work in Azure AI Search and how to use them together.
5
5
6
6
manager: nitinme
7
7
author: HeidiSteen
@@ -11,25 +11,29 @@ ms.topic: concept-article
11
11
ms.date: 07/23/2025
12
12
---
13
13
14
-
# How scoring works in Azure AI Search
14
+
# Relevance in Azure AI Search
15
15
16
-
The query engine in Azure AI Search supports a multi-level approach to ranking search results where there's a built-in ranking modality for each query type, plus extra ranking capabilities for more relevance tuning.
16
+
In a query operation, the relevance of any given result is measured by a ranking algorithm that determines the strength of a match based on how closely it aligns in content or characteristics. An algorithm assigns a score, and results are rank ordered by that score, with the most relevant matches returned in the response.
17
17
18
18
Ranking occurs whenever the query request includes full text or vector queries. It doesn't occur if the query invokes strict pattern matching, such as a filter-only query or a specialized query form like autocomplete, suggestions, geospatial search, fuzzy search, or regular expression search. A uniform search score of 1.0 indicates the absence of a ranking algorithm.
19
19
20
+
The query engine in Azure AI Search supports a multi-level approach to ranking search results, where there's a built-in ranking modality for each query type, plus extra ranking capabilities for extended relevance tuning.
21
+
20
22
## Levels of ranking
21
23
22
-
### Initial ranking
24
+
This section describes the levels of scoring operations. For an illustration of how they work together, see the [diagram](#diagram-of-ranking-algorithms) in this article. A [comparison of search score types and ranges](#types-of-search-scores) is also provided in this article.
25
+
26
+
### Level 1 (L1) ranking
23
27
24
-
Assuming the query engine performs a scoring operation, the initial scoring for level 1 (L1) ranking varies by query type.
28
+
Assuming the query engine performs a scoring operation, the initial search score varies by query type.
25
29
26
30
+ Text queries, which match on tokenized strings, are always initially ranked using the [BM25 ranking algorithm](index-similarity-and-scoring.md).
27
31
28
-
+ Vector query L1 ranking is either Hierarchical Navigable Small World (HNSW) or exhaustive K-nearest neighbor (KNN). Image search or multimodal searches are based on vector queries and scored using the vector L2 ranking algorithms.
32
+
+ Vector query L1 ranking is either [Hierarchical Navigable Small World (HNSW) or exhaustive K-nearest neighbor (KNN)](vector-search-ranking.md). Image search or multimodal searches are based on vector queries and scored using the vector L2 ranking algorithms.
29
33
30
-
### Fused ranking
34
+
### Fused L1 ranking
31
35
32
-
Hybrid queries that include text and vector components are ranked using the Reciprocal Ranking Fusion (RRF) algorithm that's used for merging the results of multiple queries. RRF is also used if multiple vector queries execute in parallel.
36
+
Hybrid queries that include text and vector components are ranked using the [Reciprocal Ranking Fusion (RRF) algorithm](hybrid-search-ranking.md) that's used for merging the results of multiple queries. RRF is also used if multiple vector queries execute in parallel.
33
37
34
38
### Level 2 (L2) ranking
35
39
@@ -65,7 +69,7 @@ Scored results are indicated for each match in the query response. This table li
65
69
|@search.score | 0 through unlimited |[BM25 ranking algorithm](index-similarity-and-scoring.md#scores-in-a-text-results) for text search |
66
70
|@search.score | 0.333 - 1.00 |[HNSW or exhaustive KNN algorithm](vector-search-ranking.md#scores-in-a-vector-search-results) for vector search |
67
71
|@search.score | 0 through an upper limit determined by the number of queries |[RRF algorithm](hybrid-search-ranking.md#scores-in-a-hybrid-search-results)|
Only the top 50 matches from the initial results can be semantically ranked. As with all queries, a response is composed of all fields marked as retrievable, or just those fields listed in the `select` parameter. A response includes the original relevance score, and might also include a count, or batched results, depending on how you formulated the request.
263
263
264
-
In semantic ranking, the response has more elements: a new [semantically ranked relevance score](semantic-search-overview.md#how-ranking-is-scored), an optional caption in plain text and with highlights, and an optional [answer](semantic-answers.md). If your results don't include these extra elements, then your query might be misconfigured. As a first step towards troubleshooting the problem, check the semantic configuration to ensure it's specified in both the index definition and query.
264
+
In semantic ranking, the response has more elements: a new [semantically ranked relevance score](semantic-search-overview.md#how-results-are-scored), an optional caption in plain text and with highlights, and an optional [answer](semantic-answers.md). If your results don't include these extra elements, then your query might be misconfigured. As a first step towards troubleshooting the problem, check the semantic configuration to ensure it's specified in both the index definition and query.
265
265
266
266
In a client app, you can structure the search page to include a caption as the description of the match, rather than the entire contents of a specific field. This approach is useful when individual fields are too dense for the search results page.
0 commit comments