Skip to content

Commit 83f276e

Browse files
ajleong623epughwrigleyDankolchfa-awsnatebower
authored
Search Relevance Workbench Page (#9736)
* first prev Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * changes Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * creating query set Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * creating external query sets Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * adding search configs Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * adding search configs Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * added search relevance workbench page Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * here Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Added new page Signed-off-by: Anthony Leong <aj.leong623@gmail.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * fixed broken links Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * improved user voice Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Rework some text, testing if I can push Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> * typo Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> * Add structure for the new tools Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> * Prevent mishmash of spelling options Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> * Left nav reorganization Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> * Reference workbench as main entry Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> * first draft of judgments docs page Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * add Query Sets doc page, update Judgments page Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * comparing query sets and evaluate search quality pages started. However, I still have to explain the meaning behind the pointwise evaluation metrics. Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * add draft page for search configurations Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * type--signoff Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * finished draft of compare-query-sets and evaluate-search-quality pages Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * add content for hybrid search optimization, restructure comparison experiments, add folder for images and some images. Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * updated the page showing how to use the SRW Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * integrate some feedback Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * address vale findings Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * made small changes Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * change ordering of docs in left nav, add new SRW viz of comparing single queries to existing docs page Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * Update reject.txt Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> * Update SubstitutionsError.yml Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> * remove TODO Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * fixed dead link Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-search-results.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-query-sets.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Apply suggestions from code review Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-search-results.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-search-results.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/using-search-relevance-workbench.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/using-search-relevance-workbench.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/using-search-relevance-workbench.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/evaluate-search-quality.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/evaluate-search-quality.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/evaluate-search-quality.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/evaluate-search-quality.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/evaluate-search-quality.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Apply suggestions from code review Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Apply suggestions from code review Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Apply suggestions from code review Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Apply suggestions from code review Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * details block Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * details block update Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * details block update Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * more details block Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * optimize hybrid search Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * changes Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * response body fields Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * response body fields Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * response body fields Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * expand description of experiments Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * use experiment id Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * bugin requests and responses with intro sentence Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * dedup sentence Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * incorporate review feedback Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> * fixed accidental reverts Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * details Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * changed wording of hybrid optimizer Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-query-sets.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-query-sets.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-query-sets.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-search-results.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-search-results.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Apply suggestions from code review Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * made suggestion changes Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * search configuration copy url Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/compare-query-sets.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/query-sets.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> * Update _search-plugins/search-relevance/query-sets.md Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: Anthony Leong <aj.leong623@gmail.com> --------- Signed-off-by: Anthony Leong <aj.leong623@gmail.com> Signed-off-by: Eric Pugh <epugh@opensourceconnections.com> Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com> Co-authored-by: Eric Pugh <epugh@opensourceconnections.com> Co-authored-by: wrigleyDan <dwrigley@opensourceconnections.com> Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
1 parent 8f351f8 commit 83f276e

25 files changed

+1670
-21
lines changed

.github/vale/styles/OpenSearch/SubstitutionsError.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ swap:
5454
'web site': website
5555
'whitespace': white space
5656
'user interface \(UI\)': UI
57+
'judgement': judgment

.github/vale/styles/Vocab/OpenSearch/Products/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ RankLib
9696
RCF Summarize
9797
RPM Package Manager
9898
Ruby
99+
Search Relevance Workbench
99100
Simple Schema for Observability
100101
Tableau
101102
Textract

.github/vale/styles/Vocab/OpenSearch/Words/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ gibibyte
5454
[Ii]nstrumentations?
5555
[Ii]ntracluster
5656
[Jj]avadoc
57+
[Jj]accard
5758
k-NN
5859
[Kk]eystore
5960
kibibyte
@@ -85,6 +86,7 @@ p\d{2}
8586
[Pp]erformant
8687
[Pp]laintext
8788
[Pp]luggable
89+
[Pp]ointwise
8890
[Pp]reaggregate(s|d)?
8991
[Pp]recompute(s|d)?
9092
[Pp]reconfigure

_search-plugins/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ OpenSearch offers several ways to improve search performance:
7474

7575
OpenSearch provides the following search relevance features:
7676

77-
- [Compare Search Results]({{site.url}}{{site.baseurl}}/search-plugins/search-relevance/compare-search-results/): A search comparison tool in OpenSearch Dashboards that you can use to compare results from two queries side by side.
77+
- [Search Relevance Workbench]({{site.url}}{{site.baseurl}}/search-plugins/search-relevance/using-search-relevance-workbench/): A suite of tools that support search quality improvements through experimentation.
7878

7979
- [Querqy]({{site.url}}{{site.baseurl}}/search-plugins/querqy/): Offers query rewriting capability.
8080

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
---
2+
layout: default
3+
title: Comparing query sets
4+
nav_order: 12
5+
parent: Using Search Relevance Workbench
6+
grand_parent: Search relevance
7+
has_children: false
8+
has_toc: false
9+
---
10+
11+
# Comparing query sets
12+
13+
To compare the results of two different search configurations, you can run a pairwise experiment. To achieve this, you need two search configurations and a query set to use for the search configuration.
14+
15+
16+
For more information about creating a query set, see [Query Sets]({{site.url}}{{site.baseurl}}/search-plugins/search-relevance/query-sets/).
17+
18+
For more information about creating search configurations, see [Search Configurations]({{site.url}}{{site.baseurl}}/search-plugins/search-relevance/search-configurations/).
19+
20+
## Creating a pairwise experiment
21+
22+
An experiment is used to compare the metrics between two different search configurations. An experiment shows you the top N results for every query based on the specified search configurations. In the dashboard, you can view the returned documents from any of the queries in the query set and determine which search configuration returns more relevant results. Additionally, you can measure the similarity between the two returned search result lists using the provided similarity metrics.
23+
24+
### Example
25+
26+
To create a pairwise comparison experiment for the specified query set and search configurations, send the following request:
27+
28+
```json
29+
PUT _plugins/_search_relevance/experiments
30+
{
31+
"querySetId": "8368a359-146b-4690-b756-40591b2fcddb",
32+
"searchConfigurationList": ["a5acc9f3-6ad7-43f4-9651-fe118c499bc6", "26c7255c-c36e-42fb-b5b2-633dbf8e53b6"],
33+
"size": 10,
34+
"type": "PAIRWISE_COMPARISON"
35+
}
36+
```
37+
{% include copy-curl.html %}
38+
39+
### Request body fields
40+
41+
The following table lists the available input parameters.
42+
43+
Field | Data type | Description
44+
:--- | :--- | :---
45+
`querySetId` | String | The query set ID.
46+
`searchConfigurationList` | List | A list of search configuration IDs to use for comparison.
47+
`size` | Integer | The number of documents to return in the results.
48+
`type` | String | Defines the type of experiment to run. Valid values are `PAIRWISE_COMPARISON`, `HYBRID_OPTIMIZER`, or `POINTWISE_EVALUATION`. Depending on the experiment type, you must provide different body fields in the request. `PAIRWISE_COMPARISON` is for comparing two search configurations against a query set and is used [here]({{site.url}}{{site.baseurl}}/search-plugins/search-relevance/compare-query-sets/). `HYBRID_OPTIMIZER` is for combining results and is used [here]({{site.url}}{{site.baseurl}}/search-plugins/search-relevance/optimize-hybrid-search/). `POINTWISE_EVALUATION` is for evaluating a search configuration against judgments and is used [here]({{site.url}}{{site.baseurl}}/search-plugins/search-relevance/evaluate-search-quality/).
49+
50+
The response contains the experiment ID of the created experiment:
51+
52+
```json
53+
{
54+
"experiment_id": "cbd2c209-96d1-4012-aa73-e524b7a1b11a",
55+
"experiment_result": "CREATED"
56+
}
57+
```
58+
## Interpreting the experiment results
59+
To interpret the experiment results, use the following operations.
60+
61+
### Retrieving the experiment results
62+
63+
Use the following API to retrieve the result of a specific experiment.
64+
65+
#### Endpoints
66+
67+
```json
68+
GET _plugins/_search_relevance/experiments
69+
GET _plugins/_search_relevance/experiments/<experiment_id>
70+
```
71+
72+
#### Path parameters
73+
74+
The following table lists the available path parameters.
75+
76+
| Parameter | Data type | Description |
77+
| :--- | :--- | :--- |
78+
| `experiment_id` | String | The ID of the experiment to retrieve. Retrieves all experiments when empty. |
79+
80+
#### Example request
81+
82+
```json
83+
GET _plugins/_search_relevance/experiments/cbd2c209-96d1-4012-aa73-e524b7a1b11a
84+
```
85+
86+
#### Example response
87+
88+
```json
89+
{
90+
"took": 2,
91+
"timed_out": false,
92+
"_shards": {
93+
"total": 1,
94+
"successful": 1,
95+
"skipped": 0,
96+
"failed": 0
97+
},
98+
"hits": {
99+
"total": {
100+
"value": 1,
101+
"relation": "eq"
102+
},
103+
"max_score": 1,
104+
"hits": [
105+
{
106+
"_index": ".plugins-search-relevance-experiment",
107+
"_id": "cbd2c209-96d1-4012-aa73-e524b7a1b11a",
108+
"_score": 1,
109+
"_source": {
110+
"id": "cbd2c209-96d1-4012-aa73-e524b7a1b11a",
111+
"timestamp": "2025-06-11T23:24:26.792Z",
112+
"type": "PAIRWISE_COMPARISON",
113+
"status": "PROCESSING",
114+
"querySetId": "8368a359-146b-4690-b756-40591b2fcddb",
115+
"searchConfigurationList": [
116+
"a5acc9f3-6ad7-43f4-9651-fe118c499bc6",
117+
"26c7255c-c36e-42fb-b5b2-633dbf8e53b6"
118+
],
119+
"judgmentList": [],
120+
"size": 10,
121+
"results": {}
122+
}
123+
}
124+
]
125+
}
126+
}
127+
```
128+
129+
Once the experiment finishes running, the results are available:
130+
131+
<details open markdown="block">
132+
<summary>
133+
Response
134+
</summary>
135+
136+
```json
137+
{
138+
"took": 34,
139+
"timed_out": false,
140+
"_shards": {
141+
"total": 1,
142+
"successful": 1,
143+
"skipped": 0,
144+
"failed": 0
145+
},
146+
"hits": {
147+
"total": {
148+
"value": 1,
149+
"relation": "eq"
150+
},
151+
"max_score": 1.0,
152+
"hits": [
153+
{
154+
"_index": ".plugins-search-relevance-experiment",
155+
"_id": "cbd2c209-96d1-4012-aa73-e524b7a1b11a",
156+
"_score": 1.0,
157+
"_source": {
158+
"id": "cbd2c209-96d1-4012-aa73-e524b7a1b11a",
159+
"timestamp": "2025-06-12T04:18:37.284Z",
160+
"type": "PAIRWISE_COMPARISON",
161+
"status": "COMPLETED",
162+
"querySetId": "7889ffe9-835e-4f48-a9cd-53905bb967d3",
163+
"searchConfigurationList": [
164+
"a5acc9f3-6ad7-43f4-9651-fe118c499bc6",
165+
"26c7255c-c36e-42fb-b5b2-633dbf8e53b6"
166+
],
167+
"judgmentList": [],
168+
"size": 10,
169+
"results": {
170+
"tv": {
171+
"26c7255c-c36e-42fb-b5b2-633dbf8e53b6": [
172+
"B07X3S9RTZ",
173+
"B07WVZFKLQ",
174+
"B00GXD4NWE",
175+
"B07ZKCV5K5",
176+
"B07ZKDVHFB",
177+
"B086VKT9R8",
178+
"B08XLM8YK1",
179+
"B07FPP6TB5",
180+
"B07N1TMNHB",
181+
"B09CDHM8W7"
182+
],
183+
"pairwiseComparison": {
184+
"jaccard": 0.11,
185+
"rbo90": 0.16,
186+
"frequencyWeighted": 0.2,
187+
"rbo50": 0.07
188+
},
189+
"a5acc9f3-6ad7-43f4-9651-fe118c499bc6": [
190+
"B07Q7VGW4Q",
191+
"B00GXD4NWE",
192+
"B07VML1CY1",
193+
"B07THVCJK3",
194+
"B07RKSV7SW",
195+
"B010EAW8UK",
196+
"B07FPP6TB5",
197+
"B073G9ZD33",
198+
"B07VXRXRJX",
199+
"B07Q45SP9P"
200+
]
201+
},
202+
"led tv": {
203+
"26c7255c-c36e-42fb-b5b2-633dbf8e53b6": [
204+
"B01M1D0KL1",
205+
"B07YSMD3Z9",
206+
"B07V4CY9GZ",
207+
"B074KFP426",
208+
"B07S8XNWWF",
209+
"B07XBJR7GY",
210+
"B075FDWSHT",
211+
"B01N2Z17MS",
212+
"B07F1T4JFB",
213+
"B07S658ZLH"
214+
],
215+
"pairwiseComparison": {
216+
"jaccard": 0.11,
217+
"rbo90": 0.13,
218+
"frequencyWeighted": 0.2,
219+
"rbo50": 0.03
220+
},
221+
"a5acc9f3-6ad7-43f4-9651-fe118c499bc6": [
222+
"B07Q45SP9P",
223+
"B074KFP426",
224+
"B07JKVKZX8",
225+
"B07THVCJK3",
226+
"B0874XJYW8",
227+
"B08LVPWQQP",
228+
"B07V4CY9GZ",
229+
"B07X3BS3DF",
230+
"B074PDYLCZ",
231+
"B08CD9MKLZ"
232+
]
233+
}
234+
}
235+
}
236+
}
237+
]
238+
}
239+
}
240+
```
241+
242+
</details>
243+
244+
### Interpreting the results
245+
246+
As shown in the preceding response, both search configurations return the top N documents, with `size` set to 10 in the search request. In addition to the results, the response also includes metrics from the pairwise comparison.
247+
248+
### Response body fields
249+
250+
Field | Description
251+
:--- | :---
252+
`jaccard` | Shows the similarity score by dividing the intersection cardinality by the union cardinality of the returned documents.
253+
`rbo` | The Rank-Biased Overlap (RBO) metric compares the returned result sets at each ranking depth—for example, the top 1 document, top 2 documents, and so on. It places greater importance on higher-ranked results, giving more weight to earlier positions in the list.
254+
`frequencyWeighted` | Similar to the Jaccard metric, the frequency-weighted metric calculates the ratio of the weighted intersection to the weighted union of two sets. However, unlike standard Jaccard, it gives more weight to documents with higher frequencies, skewing the result toward more frequently occurring items.

_search-plugins/search-relevance/compare-search-results.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
---
22
layout: default
3-
title: Comparing search results
4-
nav_order: 55
5-
parent: Search relevance
3+
title: Comparing single queries
4+
nav_order: 11
5+
parent: Using Search Relevance Workbench
6+
grand_parent: Search relevance
67
has_children: false
78
has_toc: false
8-
redirect_from:
9-
- /search-plugins/search-relevance/
109
---
1110

12-
# Comparing search results
11+
# Comparing single queries
1312

14-
With Compare Search Results in OpenSearch Dashboards, you can compare results from two queries side by side to determine whether one query produces better results than the other. Using this tool, you can evaluate search quality by experimenting with queries.
13+
With Compare Search Results in OpenSearch Dashboards, you can compare results from two queries side by side to determine whether one query produces better results than the other. Using this tool, you can evaluate search quality by experimenting with queries.
1514

1615
For example, you can see how results change when you apply one of the following query changes:
1716

@@ -21,20 +20,20 @@ For example, you can see how results change when you apply one of the following
2120

2221
## Prerequisites
2322

24-
Before you get started, you must index data in OpenSearch. To learn how to create a new index, see [Index data]({{site.url}}{{site.baseurl}}/opensearch/index-data/).
23+
Before you get started, you must index data in OpenSearch. To learn how to create a new index, see [Index data]({{site.url}}{{site.baseurl}}/opensearch/index-data/).
2524

2625
Alternatively, you can add sample data in OpenSearch Dashboards using the following steps:
2726

2827
1. On the top menu bar, go to **OpenSearch Dashboards > Overview**.
2928
1. Select **View app directory**.
30-
1. Select **Add sample data**.
29+
1. Select **Add sample data**.
3130
1. Choose one of the built-in datasets and select **Add data**.
3231

3332
## Using Compare Search Results in OpenSearch Dashboards
3433

3534
To compare search results in OpenSearch Dashboards, perform the following steps.
3635

37-
**Step 1:** On the top menu bar, go to **OpenSearch Plugins > Search Relevance**.
36+
**Step 1:** On the top menu bar, go to **OpenSearch Plugins > Search Relevance**.
3837

3938
**Step 2:** Enter the search text in the search bar.
4039

@@ -74,7 +73,7 @@ The following example screen shows a search for the word "cup" in the `descripti
7473

7574
<img src="{{site.url}}{{site.baseurl}}/images/search_relevance.png" alt="Compare search results"/>{: .img-fluid }
7675

77-
If a result in Result 1 appears in Result 2, the `Up` and `Down` indicators below the result number signify how many places the result moved up or down compared to the same result in Result 2. In this example, the document with the ID 2 is `Up 1` place in Result 2 compared to Result 1 and `Down 1` place in Result 1 compared to Result 2.
76+
If a result in Result 1 appears in Result 2, the `Up` and `Down` indicators below the result number signify how many positions the result moved up or down compared to the same result in Result 2. In this example, the document with the ID 2 is `Up 1` position in Result 2 compared to Result 1 and `Down 1` position in Result 1 compared to Result 2.
7877

7978
## Changing the number of results
8079

@@ -98,6 +97,27 @@ Setting `size` to a high value (for example, larger than 250 documents) may degr
9897
You cannot save a given comparison for future use, so Compare Search Results is not suitable for systematic testing.
9998
{: .note}
10099

100+
## Comparing OpenSearch search results using Search Relevance Workbench
101+
102+
[Search Relevance Workbench]({{site.url}}{{site.baseurl}}/search-plugins/search-relevance/using-search-relevance-workbench/) provides richer visualization options for examining the difference between two queries.
103+
104+
To use Search Relevance Workbench, follow steps 1--4. The displayed results and the options for viewing the differences are shown in the following image.
105+
106+
<img src="{{site.url}}{{site.baseurl}}/images/search-relevance-workbench/comparing_search_results.png" alt="Compare search results"/>{: .img-fluid }
107+
108+
The top section provides a summary of the results: how many of the retrieved results are unique to the query on the left, how many are unique to the query on the right, and how many are part of both queries?
109+
110+
What follows is a visual representation of the retrieved results. By default the unique identifier field (`_id`) is shown. You can change this by selecting a different field in the **Display Field** dropdown list.
111+
In the side-by-side view, you can see the positional changes for all common documents among the two result lists.
112+
Selecting one item shows all stored fields in the index to facilitate easier document identification.
113+
114+
Lastly, Search Relevance Workbench allows you to choose among different visualization styles from a dropdown list:
115+
116+
* **Default style**: Different colors are used for the two result list documents (unique results are on the left in yellow and on the right in purple, and common results are displayed in green).
117+
* **Ranking change color coding**: All unique documents are purple, and common results are green to focus on ranking changes.
118+
* **Ranking change color coding 2**: All unique documents are gray, and common results are green to focus on ranking changes.
119+
* **Venn diagram color coding**: All unique documents are purple, and common results are blue as in the Venn diagram at the top of the two result lists.
120+
101121
## Comparing OpenSearch search results with reranked results
102122

103123
One use case for Compare Search Results is the comparison of raw OpenSearch results with the same results processed by a reranking application. OpenSearch currently integrates with the following two rerankers:
@@ -115,7 +135,7 @@ To try Amazon Kendra Intelligent Ranking, you must first set up the Amazon Kendr
115135

116136
To compare search results with reranked results in OpenSearch Dashboards, enter a query in **Query 1** and enter the same query using a reranker in **Query 2**. Then compare the OpenSearch results with the reranked results.
117137

118-
The following example demonstrates searching for the text "snacking nuts" in the `abo` index. The documents in the index contain snack descriptions in the `bullet_point` array.
138+
The following example demonstrates searching for the text "snacking nuts" in the `abo` index. The documents in the index contain snack descriptions in the `bullet_point` array.
119139

120140
<img src="{{site.url}}{{site.baseurl}}/images/kendra_query.png" alt="OpenSearch Intelligent Ranking query"/>{: .img-fluid }
121141

0 commit comments

Comments
 (0)