101
0/304
Loading content...
A search analytics system records ranked results returned for each user query.
Table: queries
Data notes:
For each query_name, compute two metrics:
Output requirements:
Supported submission environments:
queries:
| query_name | result | position | rating |
|------------|-------------------|----------|--------|
| Dog | Golden Retriever | 1 | 5 |
| Dog | German Shepherd | 2 | 5 |
| Dog | Mule | 200 | 1 |
| Cat | Persian | 5 | 2 |
| Cat | Siamese | 3 | 3 |
| Cat | Sphynx | 7 | 4 |[
{"query_name":"Cat","quality":0.66,"poor_query_percentage":33.33},
{"query_name":"Dog","quality":2.5,"poor_query_percentage":33.33}
]For Dog, quality = ((5/1)+(5/2)+(1/200))/3 = 2.50 and one out of three rows is poor. For Cat, quality = ((2/5)+(3/3)+(4/7))/3 = 0.66 and one out of three rows is poor.
queries:
| query_name | result | position | rating |
|------------|-------------------|----------|--------|
| Neon | Item A | 10 | 3 |
| Neon | Item B | 20 | 4 |
| Neon | Item C | 40 | 5 |
| Orion | Item X | 1 | 2 |
| Orion | Item Y | 2 | 2 |[
{"query_name":"Neon","quality":0.26,"poor_query_percentage":0.0},
{"query_name":"Orion","quality":1.5,"poor_query_percentage":100.0}
]Neon has no poor rows. Orion has two poor rows out of two, so poor_query_percentage is 100.00.
queries:
| query_name | result | position | rating |
|------------|-------------------|----------|--------|
| Alpha | Item 1 | 8 | 1 |
| Alpha | Item 2 | 8 | 1 |
| Beta | Item 3 | 500 | 5 |
| Beta | Item 4 | 250 | 5 |
| Beta | Item 5 | 250 | 1 |[
{"query_name":"Alpha","quality":0.13,"poor_query_percentage":100.0},
{"query_name":"Beta","quality":0.01,"poor_query_percentage":33.33}
]Alpha quality is 0.125, which rounds to 0.13. Beta has one poor row among three rows, so poor_query_percentage is 33.33.
Constraints