Skip to content

Commit 55328e4

Browse files
authored
Merge pull request #554 from HeidiSteen/heidist-fresh
[azure search] port scoring profile updates from release to main
2 parents afec781 + d037a4e commit 55328e4

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

articles/search/index-add-scoring-profiles.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.service: cognitive-search
1010
ms.custom:
1111
- ignite-2023
1212
ms.topic: how-to
13-
ms.date: 09/23/2024
13+
ms.date: 10/01/2024
1414
---
1515

1616
# Add scoring profiles to boost search scores
@@ -89,14 +89,19 @@ See the [Extended example for vector and hybrid search](#extended-example-for-ve
8989

9090
## How search scoring works in Azure AI Search
9191

92-
Scoring profiles supplement the default scoring algorithm by boosting the scores of matches that meet the profile's criteria. Scoring functions apply to keyword search, pure vector queries, and on hybrid queries.
92+
Scoring profiles supplement the default scoring algorithm by boosting the scores of matches that meet the profile's criteria. Scoring functions apply to:
9393

94-
When you use scoring profiles or any other boosting features in Azure AI Search, the [Reciprocal Ranking Function (RRF)](hybrid-search-ranking.md) algorithm assigns the score, including for standalone text and vector queries. Post-RRF, all scoring/boosting, [semantic ranking](semantic-search-overview.md), and [vector weighting](vector-search-how-to-query.md#vector-weighting) adjustments occur.
94+
+ [Text (keyword) search](search-query-create.md)
95+
+ [Pure vector queries](vector-search-how-to-query.md)
96+
+ [Hybrid queries](hybrid-search-how-to-query.md), with text and vector subqueries execute in parallel
9597

96-
:::image type="content" source="media/scoring-profiles/scoring-over-ranked-results.png" alt-text="Diagram showing which fields have a scoring profile and when ranking occurs.":::
98+
For standalone text queries, scoring profiles identify the maximum 1,000 matches in a [BM25-ranked search](index-similarity-and-scoring.md), and the top 50 are returned in results.
99+
100+
For pure vectors, the query is vector-only, but the [*k*-matching documents](vector-search-ranking.md) include alphanumeric fields that a scoring profile can process. The scoring profile revised the result set by boosting documents that match criteria in the profile.
97101

98-
> [!TIP]
99-
> You can use the [featuresMode (preview)](index-similarity-and-scoring.md#featuresmode-parameter-preview) parameter to request extra scoring details with the search results (including the field level scores).
102+
For text queries in a hybrid query, scoring profiles identify the maximum 1,000 matches in a BM25-ranked search. However, once those 1,000 results are identified, they're restored to their original BM25 order so that they can be rescored alongside vectors results in the final [Reciprocal Ranking Function (RRF)](hybrid-search-ranking.md) ordering, where the scoring profile (document boosting) is applied to the merged results, followed by [vector weighting](vector-search-how-to-query.md#vector-weighting), and [semantic ranking](semantic-search-overview.md) as the last step.
103+
104+
:::image type="content" source="media/scoring-profiles/scoring-over-ranked-results.png" alt-text="Diagram showing which fields have a scoring profile and when ranking occurs.":::
100105

101106
## Add a scoring profile to a search index
102107

articles/search/index-similarity-and-scoring.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ In Azure AI Search, you can configure BM25 algorithm parameters, and tune search
131131
| [Scoring algorithm configuration](index-ranking-similarity.md) | Search index | |
132132
| [Scoring profiles](index-add-scoring-profiles.md) | Search index | Provide criteria for boosting the search score of a match based on content characteristics. For example, you might want to boost matches based on their revenue potential, promote newer items, or perhaps boost items that have been in inventory too long. A scoring profile is part of the index definition, composed of weighted fields, functions, and parameters. You can update an existing index with scoring profile changes, without incurring an index rebuild.|
133133
| [Semantic ranking](semantic-search-overview.md) | Query request | Applies machine reading comprehension to search results, promoting more semantically relevant results to the top. |
134-
| [featuresMode parameter](#featuresmode-parameter-preview) | Query request | This parameter is mostly used for unpacking a score, but it can be used for in code that provides a [custom scoring solution](https://github.com/Azure-Samples/search-ranking-tutorial). |
134+
| [featuresMode parameter](#featuresmode-parameter-preview) | Query request | This parameter is mostly used for unpacking a BM25-ranked score, but it can be used for in code that provides a [custom scoring solution](https://github.com/Azure-Samples/search-ranking-tutorial). |
135135

136136
<a name="featuresMode-param"></a>
137137

138138
## featuresMode parameter (preview)
139139

140-
[Search Documents](/rest/api/searchservice/documents/search-post) requests support a featuresMode parameter that provides more detail about a relevance score at the field level. Whereas the `@searchScore` is calculated for the document all-up (how relevant is this document in the context of this query), featuresMode reveals information about individual fields, as expressed in a `@search.features` structure. The structure contains all fields used in the query (either specific fields through **searchFields** in a query, or all fields attributed as **searchable** in an index).
140+
[Search Documents](/rest/api/searchservice/documents/search-post) requests support a featuresMode parameter that provides more detail about a BM25 relevance score at the field level. Whereas the `@searchScore` is calculated for the document all-up (how relevant is this document in the context of this query), featuresMode reveals information about individual fields, as expressed in a `@search.features` structure. The structure contains all fields used in the query (either specific fields through **searchFields** in a query, or all fields attributed as **searchable** in an index).
141141

142142
For each field, `@search.features` give you the following values:
143143

@@ -169,7 +169,7 @@ For a query that targets the "description" and "title" fields, a response that i
169169

170170
You can consume these data points in [custom scoring solutions](https://github.com/Azure-Samples/search-ranking-tutorial) or use the information to debug search relevance problems.
171171

172-
The featuresMode parameter isn't documented in the REST APIs, but you can use it on a preview REST API call to Search Documents.
172+
The featuresMode parameter isn't documented in the REST APIs, but you can use it on a preview REST API call to Search Documents for text (Keyword) search that's BM25-ranked.
173173

174174
## Number of ranked results in a full text query response
175175

-675 KB
Loading

0 commit comments

Comments
 (0)