Skip to content

Commit 7a054aa

Browse files
Merge pull request #216916 from HeidiSteen/heidist-gh
Fixed typo in semantic answers doc
2 parents 1d82203 + 00ffd40 commit 7a054aa

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

articles/search/semantic-answers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 03/16/2022
11+
ms.date: 11/02/2022
1212
---
1313

1414
# Return a semantic answer in Azure Cognitive Search
@@ -40,15 +40,15 @@ Answers are returned as an independent, top-level object in the query response p
4040

4141
<a name="query-params"></a>
4242

43-
## Formulate a query rest for "answers"
43+
## Formulate a REST query for "answers"
4444

45-
The approach for listing fields in priority order has changed, with "semanticConfiguration" replacing "searchFields". If you're currently using searchFields, update your code to the 2021-04-30-Preview API version and use "semanticConfiguration" instead.
45+
The approach for listing fields in priority order has changed, with "semanticConfiguration" replacing "searchFields". If you're currently using "searchFields", update your code to the 2021-04-30-Preview API version and use "semanticConfiguration" instead.
4646

4747
### [**Semantic Configuration (recommended)**](#tab/semanticConfiguration)
4848

4949
To return a semantic answer, the query must have the semantic "queryType", "queryLanguage", "semanticConfiguration", and the "answers" parameters. Specifying these parameters doesn't guarantee an answer, but the request must include them for answer processing to occur.
5050

51-
The "semanticConfiguration" parameter is crucial to returning a high-quality answer.
51+
The "semanticConfiguration" parameter is required. It's defined in a search index, and then referenced in a query, as shown below.
5252

5353
```json
5454
{
@@ -68,7 +68,7 @@ The "semanticConfiguration" parameter is crucial to returning a high-quality ans
6868

6969
+ "queryLanguage" must be one of the values from the [supported languages list (REST API)](/rest/api/searchservice/preview-api/search-documents#queryLanguage).
7070

71-
+ A "semanticConfiguration" determines which string fields provide tokens to the extraction model. The same fields that produce captions also produce answers. See [Configure semantic ranking](semantic-how-to-query-request.md#2---create-a-semantic-configuration) for details.
71+
+ A "semanticConfiguration" determines which string fields provide tokens to the extraction model. The same fields that produce captions also produce answers. See [Create a semantic configuration](semantic-how-to-query-request.md#2---create-a-semantic-configuration) for details.
7272

7373
+ For "answers", parameter construction is `"answers": "extractive"`, where the default number of answers returned is one. You can increase the number of answers by adding a `count` as shown in the above example, up to a maximum of 10. Whether you need more than one answer depends on the user experience of your app, and how you want to render results.
7474

articles/search/semantic-how-to-query-request.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.date: 11/01/2022
1616
> [!IMPORTANT]
1717
> Semantic search is in public preview under [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). It's available through Azure portal, preview REST APIs, and beta SDKs. This feature is billable. See [Availability and pricing](semantic-search-overview.md#availability-and-pricing).
1818
19-
In this article, you'll learn how to invoke a semantic ranking algorithm over a result set, promoting the most semantically relevant results to the top of the stack. You'll also get semantic captions (and optionally [semantic answers](semantic-answers.md)), with highlights over the most relevant terms and phrases.
19+
In this article, you'll learn how to invoke a semantic ranking algorithm over a result set, promoting the most semantically relevant results to the top of the stack. You can also get semantic captions, with highlights over the most relevant terms and phrases, and [semantic answers](semantic-answers.md).
2020

2121
There are two main activities to perform:
2222

@@ -61,7 +61,7 @@ You'll add a semantic configuration to your [index definition](/rest/api/searchs
6161

6262
You can add or update a semantic configuration at any time without rebuilding your index. When you issue a query, you'll add the semantic configuration (one per query) that specifies which semantic configuration to use for the query.
6363

64-
1. Review the properties you'll need to specify. A semantic configuration has a name and at least one of the following properties:
64+
1. Review the properties you'll need to specify. A semantic configuration has a name and at least one each of the following properties:
6565

6666
+ **Title field** - A title field should be a concise description of the document, ideally a string that is under 25 words. This field could be the title of the document, name of the product, or item in your search index. If you don't have a title in your search index, leave this field blank.
6767
+ **Content fields** - Content fields should contain text in natural language form. Common examples of content are the body of a document, the description of a product, or other free-form text.
@@ -71,7 +71,7 @@ You can add or update a semantic configuration at any time without rebuilding yo
7171

7272
1. For the above properties, determine which fields to assign.
7373

74-
A field must be a [supported data type](/rest/api/searchservice/supported-data-types) and it should contain strings.If you happen to include an invalid field, there's no error, but those fields won't be used in semantic ranking.
74+
A field must be a [supported data type](/rest/api/searchservice/supported-data-types) and it should contain strings. If you happen to include an invalid field, there's no error, but those fields won't be used in semantic ranking.
7575

7676
| Data type | Example from hotels-sample-index |
7777
|-----------|----------------------------------|
@@ -236,7 +236,7 @@ Your next step is adding parameters to the query request. To be successful, your
236236

237237
### [**REST API**](#tab/rest-query)
238238

239-
Use the [Search Documents (REST preview)](/rest/api/searchservice/preview-api/search-documents) to formulate the request programmatically.
239+
Use the [Search Documents (REST preview)](/rest/api/searchservice/preview-api/search-documents) to formulate the request.
240240

241241
A response includes an "@search.rerankerScore"" automatically. If you want captions, spelling correction, or answers in the response, add "captions", "speller", or "answers" to the request.
242242

@@ -298,6 +298,8 @@ The following example in this section uses the [hotels-sample-index](search-get-
298298
299299
1. Set ["select"](search-query-odata-select.md) to specify which fields are returned in the response, and "count" to return the number of matches in the index. These parameters improve the quality of the request and readability of the response.
300300
301+
1. Send the request to execute the query and return results.
302+
301303
### [**.NET SDK**](#tab/dotnet-query)
302304
303305
Beta versions of the Azure SDKs include support for semantic search. Because the SDKs are beta versions, there's no documentation or samples, but you can refer to the REST API section above for insights on how the APIs should work.

0 commit comments

Comments
 (0)