Creates the Kendra plugin section in Compare Search Results (#2060)
* Creates the Kendra plugin section in Compare Search Results Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Implemented editorial comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
This commit is contained in:
parent
f9a9ea1baf
commit
f353f86b16
|
@ -98,4 +98,60 @@ Setting `size` to a high value (for example, larger than 250 documents) may degr
|
|||
{: .note}
|
||||
|
||||
You cannot save a given comparison for future use, so Compare Search Results is not suitable for systematic testing.
|
||||
{: .note}
|
||||
{: .note}
|
||||
|
||||
## Comparing OpenSearch search results with re-ranked results
|
||||
|
||||
One use case for Compare Search Results is to compare raw OpenSearch results with the same results processed by a re-ranking application. An example of such a re-ranker is **Kendra Intelligent Ranking for OpenSearch**, contributed by the Amazon Kendra team. This plugin takes search results from OpenSearch and applies Amazon Kendra’s semantic relevance rankings calculated using vector embeddings and other semantic search techniques. For many applications, this provides better result rankings.
|
||||
|
||||
To try Kendra Intelligent Ranking, you must first set up the Amazon Kendra service. To get started, see [Amazon Kendra](https://aws.amazon.com/kendra/). For detailed information, including plugin setup instructions, see [Intelligently ranking OpenSearch (self managed) results using Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/opensearch-rerank.html).
|
||||
|
||||
Once you've set up Kendra Intelligent Ranking, enter a query in **Query 1** and enter the same query using Kendra Intelligent Ranking in **Query 2**. Then compare the search results from OpenSearch and Amazon Kendra.
|
||||
|
||||
### Example
|
||||
|
||||
The following example searches for the text "snacking nuts" in the `abo` index. The documents in the index contain snack descriptions in the `bullet_point` array.
|
||||
|
||||
<img src="{{site.url}}{{site.baseurl}}/images/kendra_query.png" alt="OpenSearch Intelligent Ranking query"/>{: .img-fluid }
|
||||
|
||||
1. Enter `snacking nuts` in the search bar.
|
||||
1. Enter the following query, which searches the `bullet_point` field for the search text "snacking nuts", in **Query 1**:
|
||||
|
||||
```json
|
||||
{
|
||||
"query": {
|
||||
"match": {
|
||||
"bullet_point": "%SearchText%"
|
||||
}
|
||||
},
|
||||
"size": 25
|
||||
}
|
||||
```
|
||||
1. Enter the same query with intelligent ranking in **Query 2**:
|
||||
|
||||
```json
|
||||
{
|
||||
"query" : {
|
||||
"match" : {
|
||||
"bullet_point": "%SearchText%"
|
||||
}
|
||||
},
|
||||
"size": 25,
|
||||
"ext": {
|
||||
"search_configuration":{
|
||||
"result_transformer" : {
|
||||
"kendra_intelligent_ranking": {
|
||||
"order": 1,
|
||||
"properties": {
|
||||
"title_field": "item_name",
|
||||
"body_field": "bullet_point"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In the preceding query, `body_field` refers to the body field of the documents in the index, which Kendra Intelligent Ranking uses to rank the results. The `body_field` is required, while the `title_field` is optional.
|
||||
1. Select **Search** and compare the results in **Result 1** and **Result 2**.
|
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
Loading…
Reference in New Issue