forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_core.rank_eval.yaml
174 lines (174 loc) · 5.93 KB
/
_core.rank_eval.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
openapi: 3.1.0
info:
title: Schemas of _core.rank_eval category
description: Schemas of _core.rank_eval category
version: 1.0.0
paths: {}
components:
schemas:
RankEvalRequestItem:
type: object
properties:
id:
$ref: '_common.yaml#/components/schemas/Id'
request:
$ref: '#/components/schemas/RankEvalQuery'
ratings:
description: List of document ratings
type: array
items:
$ref: '#/components/schemas/DocumentRating'
template_id:
$ref: '_common.yaml#/components/schemas/Id'
params:
description: The search template parameters.
type: object
additionalProperties:
type: object
required:
- id
- ratings
RankEvalQuery:
type: object
properties:
query:
$ref: '_common.query_dsl.yaml#/components/schemas/QueryContainer'
size:
type: number
required:
- query
DocumentRating:
type: object
properties:
_id:
$ref: '_common.yaml#/components/schemas/Id'
_index:
$ref: '_common.yaml#/components/schemas/IndexName'
rating:
description: The document's relevance with regard to this search request.
type: number
required:
- _id
- _index
- rating
RankEvalMetric:
type: object
properties:
precision:
$ref: '#/components/schemas/RankEvalMetricPrecision'
recall:
$ref: '#/components/schemas/RankEvalMetricRecall'
mean_reciprocal_rank:
$ref: '#/components/schemas/RankEvalMetricMeanReciprocalRank'
dcg:
$ref: '#/components/schemas/RankEvalMetricDiscountedCumulativeGain'
expected_reciprocal_rank:
$ref: '#/components/schemas/RankEvalMetricExpectedReciprocalRank'
RankEvalMetricPrecision:
allOf:
- $ref: '#/components/schemas/RankEvalMetricRatingThreshold'
- type: object
properties:
ignore_unlabeled:
description: Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant.
type: boolean
RankEvalMetricRatingThreshold:
allOf:
- $ref: '#/components/schemas/RankEvalMetricBase'
- type: object
properties:
relevant_rating_threshold:
description: Sets the rating threshold above which documents are considered to be "relevant".
type: number
RankEvalMetricBase:
type: object
properties:
k:
description: Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.
type: number
RankEvalMetricRecall:
allOf:
- $ref: '#/components/schemas/RankEvalMetricRatingThreshold'
- type: object
RankEvalMetricMeanReciprocalRank:
allOf:
- $ref: '#/components/schemas/RankEvalMetricRatingThreshold'
- type: object
RankEvalMetricDiscountedCumulativeGain:
allOf:
- $ref: '#/components/schemas/RankEvalMetricBase'
- type: object
properties:
normalize:
description: If set to true, this metric will calculate the Normalized DCG (https://en.wikipedia.org/wiki/Discounted_cumulative_gain#Normalized_DCG).
type: boolean
RankEvalMetricExpectedReciprocalRank:
allOf:
- $ref: '#/components/schemas/RankEvalMetricBase'
- type: object
properties:
maximum_relevance:
description: The highest relevance grade used in the user-supplied relevance judgments.
type: number
required:
- maximum_relevance
RankEvalMetricDetail:
type: object
properties:
metric_score:
description: The metric_score in the details section shows the contribution of this query to the global quality metric score
type: number
unrated_docs:
description: The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn't have a ratings value. This can be used to ask the user to supply ratings for these documents
type: array
items:
$ref: '#/components/schemas/UnratedDocument'
hits:
description: The hits section shows a grouping of the search results with their supplied ratings
type: array
items:
$ref: '#/components/schemas/RankEvalHitItem'
metric_details:
description: The metric_details give additional information about the calculated quality metric (e.g. how many of the retrieved documents were relevant). The content varies for each metric but allows for better interpretation of the results
type: object
additionalProperties:
type: object
additionalProperties:
type: object
required:
- hits
- metric_details
- metric_score
- unrated_docs
UnratedDocument:
type: object
properties:
_id:
$ref: '_common.yaml#/components/schemas/Id'
_index:
$ref: '_common.yaml#/components/schemas/IndexName'
required:
- _id
- _index
RankEvalHitItem:
type: object
properties:
hit:
$ref: '#/components/schemas/RankEvalHit'
rating:
type: ['null', number, string]
required:
- hit
RankEvalHit:
type: object
properties:
_id:
$ref: '_common.yaml#/components/schemas/Id'
_index:
$ref: '_common.yaml#/components/schemas/IndexName'
_score:
type: number
required:
- _id
- _index
- _score