Page MenuHomePhabricator

Image suggestions API: Sort suggestions based on confidence and timestamp
Closed, ResolvedPublic

Description

From the commit message of 807625

  • Sort the suggestions based on confidence and timestamp (derived from UUID) — MvpImageRecommendationApiHandler uses the first valid suggestion returned from the API so this patch achieves parity in that regard

Sorting based on confidence would be nice to have. We'll have to also deduplicate the entries based on timeuuid when we do the sorting.

Event Timeline

@KStoller-WMF @MMiller_WMF just wanted to confirm that sorting by confidence is something we actually want. I assume so, but double-checking. Here's the example response data for Agência para Assuntos Culturais on ptwiki:

1{
2 "rows": [
3 {
4 "wiki": "ptwiki",
5 "page_id": 6721577,
6 "id": "d6ec51ce-d83c-11ec-bd5d-bc97e1533e5c",
7 "image": "Banner_of_Agency_for_Cultural_Affairs.jpg",
8 "confidence": 70,
9 "found_on": null,
10 "kind": [
11 "istype-depicts"
12 ],
13 "origin_wiki": "commonswiki",
14 "page_rev": 63223798
15 },
16 {
17 "wiki": "ptwiki",
18 "page_id": 6721577,
19 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
20 "image": "Anime_Mirai_project.png",
21 "confidence": 80,
22 "found_on": null,
23 "kind": [
24 "istype-commons-category"
25 ],
26 "origin_wiki": "commonswiki",
27 "page_rev": 63223798
28 },
29 {
30 "wiki": "ptwiki",
31 "page_id": 6721577,
32 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
33 "image": "Banner_of_Agency_for_Cultural_Affairs.jpg",
34 "confidence": 80,
35 "found_on": null,
36 "kind": [
37 "istype-commons-category",
38 "istype-depicts"
39 ],
40 "origin_wiki": "commonswiki",
41 "page_rev": 63223798
42 },
43 {
44 "wiki": "ptwiki",
45 "page_id": 6721577,
46 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
47 "image": "Daniel-Guaragna1-254x300.png",
48 "confidence": 80,
49 "found_on": null,
50 "kind": [
51 "istype-commons-category"
52 ],
53 "origin_wiki": "commonswiki",
54 "page_rev": 63223798
55 },
56 {
57 "wiki": "ptwiki",
58 "page_id": 6721577,
59 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
60 "image": "Former_Monbushō_Ministry_of_Education,_Culture,_Sports,_Science_and_Technology_building_2010.jpg",
61 "confidence": 90,
62 "found_on": [
63 "dewiki",
64 "eswiki",
65 "frwiki",
66 "kowiki",
67 "ruwiki",
68 "zhwiki"
69 ],
70 "kind": [
71 "istype-lead-image",
72 "istype-wikidata-image"
73 ],
74 "origin_wiki": "commonswiki",
75 "page_rev": 63223798
76 },
77 {
78 "wiki": "ptwiki",
79 "page_id": 6721577,
80 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
81 "image": "Kurikaesi_kigoo_no_tukai-kata.pdf",
82 "confidence": 80,
83 "found_on": null,
84 "kind": [
85 "istype-commons-category"
86 ],
87 "origin_wiki": "commonswiki",
88 "page_rev": 63223798
89 },
90 {
91 "wiki": "ptwiki",
92 "page_id": 6721577,
93 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
94 "image": "Logo_of_Agency_for_Cultural_Affairs,_Government_of_Japan,_2018.png",
95 "confidence": 80,
96 "found_on": [
97 "astwiki",
98 "cawiki",
99 "enwiki",
100 "idwiki",
101 "trwiki"
102 ],
103 "kind": [
104 "istype-commons-category",
105 "istype-lead-image"
106 ],
107 "origin_wiki": "commonswiki",
108 "page_rev": 63223798
109 },
110 {
111 "wiki": "ptwiki",
112 "page_id": 6721577,
113 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
114 "image": "Process_of_Designation,_Registration,_and_Selection_of_Cultural_Properties_in_Japan.png",
115 "confidence": 80,
116 "found_on": null,
117 "kind": [
118 "istype-commons-category"
119 ],
120 "origin_wiki": "commonswiki",
121 "page_rev": 63223798
122 },
123 {
124 "wiki": "ptwiki",
125 "page_id": 6721577,
126 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
127 "image": "Processus_de_désignation_des_biens_culturels_au_Japon.png",
128 "confidence": 80,
129 "found_on": null,
130 "kind": [
131 "istype-commons-category"
132 ],
133 "origin_wiki": "commonswiki",
134 "page_rev": 63223798
135 },
136 {
137 "wiki": "ptwiki",
138 "page_id": 6721577,
139 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
140 "image": "Processus_de_désignation_des_trésors_nationaux_au_Japon.png",
141 "confidence": 80,
142 "found_on": null,
143 "kind": [
144 "istype-commons-category"
145 ],
146 "origin_wiki": "commonswiki",
147 "page_rev": 63223798
148 },
149 {
150 "wiki": "ptwiki",
151 "page_id": 6721577,
152 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
153 "image": "The_Young_Animator_Training_Project.jpg",
154 "confidence": 80,
155 "found_on": null,
156 "kind": [
157 "istype-commons-category"
158 ],
159 "origin_wiki": "commonswiki",
160 "page_rev": 63223798
161 },
162 {
163 "wiki": "ptwiki",
164 "page_id": 6721577,
165 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
166 "image": "The_japan_art_academy01_1024.jpg",
167 "confidence": 80,
168 "found_on": null,
169 "kind": [
170 "istype-commons-category"
171 ],
172 "origin_wiki": "commonswiki",
173 "page_rev": 63223798
174 },
175 {
176 "wiki": "ptwiki",
177 "page_id": 6721577,
178 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
179 "image": "地域文化創生本部.jpg",
180 "confidence": 80,
181 "found_on": null,
182 "kind": [
183 "istype-commons-category"
184 ],
185 "origin_wiki": "commonswiki",
186 "page_rev": 63223798
187 },
188 {
189 "wiki": "ptwiki",
190 "page_id": 6721577,
191 "id": "817b223a-e0f5-11ec-979e-f4e9d4db84f0",
192 "image": "文化庁ロゴ.svg",
193 "confidence": 80,
194 "found_on": [
195 "jawiki"
196 ],
197 "kind": [
198 "istype-commons-category",
199 "istype-lead-image"
200 ],
201 "origin_wiki": "commonswiki",
202 "page_rev": 63223798
203 },
204 {
205 "wiki": "ptwiki",
206 "page_id": 6721577,
207 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
208 "image": "Anime_Mirai_project.png",
209 "confidence": 80,
210 "found_on": null,
211 "kind": [
212 "istype-commons-category"
213 ],
214 "origin_wiki": "commonswiki",
215 "page_rev": 63223798
216 },
217 {
218 "wiki": "ptwiki",
219 "page_id": 6721577,
220 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
221 "image": "Banner_of_Agency_for_Cultural_Affairs.jpg",
222 "confidence": 80,
223 "found_on": null,
224 "kind": [
225 "istype-commons-category",
226 "istype-depicts"
227 ],
228 "origin_wiki": "commonswiki",
229 "page_rev": 63223798
230 },
231 {
232 "wiki": "ptwiki",
233 "page_id": 6721577,
234 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
235 "image": "Daniel-Guaragna1-254x300.png",
236 "confidence": 80,
237 "found_on": null,
238 "kind": [
239 "istype-commons-category"
240 ],
241 "origin_wiki": "commonswiki",
242 "page_rev": 63223798
243 },
244 {
245 "wiki": "ptwiki",
246 "page_id": 6721577,
247 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
248 "image": "Former_Monbushō_Ministry_of_Education,_Culture,_Sports,_Science_and_Technology_building_2010.jpg",
249 "confidence": 90,
250 "found_on": [
251 "dewiki",
252 "eswiki",
253 "frwiki",
254 "kowiki",
255 "ruwiki",
256 "zhwiki"
257 ],
258 "kind": [
259 "istype-lead-image",
260 "istype-wikidata-image"
261 ],
262 "origin_wiki": "commonswiki",
263 "page_rev": 63223798
264 },
265 {
266 "wiki": "ptwiki",
267 "page_id": 6721577,
268 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
269 "image": "Kurikaesi_kigoo_no_tukai-kata.pdf",
270 "confidence": 80,
271 "found_on": null,
272 "kind": [
273 "istype-commons-category"
274 ],
275 "origin_wiki": "commonswiki",
276 "page_rev": 63223798
277 },
278 {
279 "wiki": "ptwiki",
280 "page_id": 6721577,
281 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
282 "image": "Logo_of_Agency_for_Cultural_Affairs,_Government_of_Japan,_2018.png",
283 "confidence": 80,
284 "found_on": [
285 "astwiki",
286 "cawiki",
287 "enwiki",
288 "idwiki",
289 "trwiki"
290 ],
291 "kind": [
292 "istype-commons-category",
293 "istype-lead-image"
294 ],
295 "origin_wiki": "commonswiki",
296 "page_rev": 63223798
297 },
298 {
299 "wiki": "ptwiki",
300 "page_id": 6721577,
301 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
302 "image": "Process_of_Designation,_Registration,_and_Selection_of_Cultural_Properties_in_Japan.png",
303 "confidence": 80,
304 "found_on": null,
305 "kind": [
306 "istype-commons-category"
307 ],
308 "origin_wiki": "commonswiki",
309 "page_rev": 63223798
310 },
311 {
312 "wiki": "ptwiki",
313 "page_id": 6721577,
314 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
315 "image": "Processus_de_désignation_des_biens_culturels_au_Japon.png",
316 "confidence": 80,
317 "found_on": null,
318 "kind": [
319 "istype-commons-category"
320 ],
321 "origin_wiki": "commonswiki",
322 "page_rev": 63223798
323 },
324 {
325 "wiki": "ptwiki",
326 "page_id": 6721577,
327 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
328 "image": "Processus_de_désignation_des_trésors_nationaux_au_Japon.png",
329 "confidence": 80,
330 "found_on": null,
331 "kind": [
332 "istype-commons-category"
333 ],
334 "origin_wiki": "commonswiki",
335 "page_rev": 63223798
336 },
337 {
338 "wiki": "ptwiki",
339 "page_id": 6721577,
340 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
341 "image": "The_Young_Animator_Training_Project.jpg",
342 "confidence": 80,
343 "found_on": null,
344 "kind": [
345 "istype-commons-category"
346 ],
347 "origin_wiki": "commonswiki",
348 "page_rev": 63223798
349 },
350 {
351 "wiki": "ptwiki",
352 "page_id": 6721577,
353 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
354 "image": "The_japan_art_academy01_1024.jpg",
355 "confidence": 80,
356 "found_on": null,
357 "kind": [
358 "istype-commons-category"
359 ],
360 "origin_wiki": "commonswiki",
361 "page_rev": 63223798
362 },
363 {
364 "wiki": "ptwiki",
365 "page_id": 6721577,
366 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
367 "image": "地域文化創生本部.jpg",
368 "confidence": 80,
369 "found_on": null,
370 "kind": [
371 "istype-commons-category"
372 ],
373 "origin_wiki": "commonswiki",
374 "page_rev": 63223798
375 },
376 {
377 "wiki": "ptwiki",
378 "page_id": 6721577,
379 "id": "b65fd66a-f245-11ec-9ab1-bc97e15aff30",
380 "image": "文化庁ロゴ.svg",
381 "confidence": 80,
382 "found_on": [
383 "jawiki"
384 ],
385 "kind": [
386 "istype-commons-category",
387 "istype-lead-image"
388 ],
389 "origin_wiki": "commonswiki",
390 "page_rev": 63223798
391 },
392 {
393 "wiki": "ptwiki",
394 "page_id": 6721577,
395 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
396 "image": "Anime_Mirai_project.png",
397 "confidence": 80,
398 "found_on": null,
399 "kind": [
400 "istype-commons-category"
401 ],
402 "origin_wiki": "commonswiki",
403 "page_rev": 63223798
404 },
405 {
406 "wiki": "ptwiki",
407 "page_id": 6721577,
408 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
409 "image": "Banner_of_Agency_for_Cultural_Affairs.jpg",
410 "confidence": 80,
411 "found_on": null,
412 "kind": [
413 "istype-commons-category",
414 "istype-depicts"
415 ],
416 "origin_wiki": "commonswiki",
417 "page_rev": 63223798
418 },
419 {
420 "wiki": "ptwiki",
421 "page_id": 6721577,
422 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
423 "image": "Daniel-Guaragna1-254x300.png",
424 "confidence": 80,
425 "found_on": null,
426 "kind": [
427 "istype-commons-category"
428 ],
429 "origin_wiki": "commonswiki",
430 "page_rev": 63223798
431 },
432 {
433 "wiki": "ptwiki",
434 "page_id": 6721577,
435 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
436 "image": "Former_Monbushō_Ministry_of_Education,_Culture,_Sports,_Science_and_Technology_building_2010.jpg",
437 "confidence": 90,
438 "found_on": [
439 "dewiki",
440 "eswiki",
441 "frwiki",
442 "kowiki",
443 "ruwiki",
444 "zhwiki"
445 ],
446 "kind": [
447 "istype-lead-image",
448 "istype-wikidata-image"
449 ],
450 "origin_wiki": "commonswiki",
451 "page_rev": 63223798
452 },
453 {
454 "wiki": "ptwiki",
455 "page_id": 6721577,
456 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
457 "image": "Kurikaesi_kigoo_no_tukai-kata.pdf",
458 "confidence": 80,
459 "found_on": null,
460 "kind": [
461 "istype-commons-category"
462 ],
463 "origin_wiki": "commonswiki",
464 "page_rev": 63223798
465 },
466 {
467 "wiki": "ptwiki",
468 "page_id": 6721577,
469 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
470 "image": "Logo_of_Agency_for_Cultural_Affairs,_Government_of_Japan,_2018.png",
471 "confidence": 80,
472 "found_on": [
473 "astwiki",
474 "cawiki",
475 "enwiki",
476 "idwiki",
477 "trwiki"
478 ],
479 "kind": [
480 "istype-commons-category",
481 "istype-lead-image"
482 ],
483 "origin_wiki": "commonswiki",
484 "page_rev": 63223798
485 },
486 {
487 "wiki": "ptwiki",
488 "page_id": 6721577,
489 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
490 "image": "Process_of_Designation,_Registration,_and_Selection_of_Cultural_Properties_in_Japan.png",
491 "confidence": 80,
492 "found_on": null,
493 "kind": [
494 "istype-commons-category"
495 ],
496 "origin_wiki": "commonswiki",
497 "page_rev": 63223798
498 },
499 {
500 "wiki": "ptwiki",
501 "page_id": 6721577,
502 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
503 "image": "Processus_de_désignation_des_biens_culturels_au_Japon.png",
504 "confidence": 80,
505 "found_on": null,
506 "kind": [
507 "istype-commons-category"
508 ],
509 "origin_wiki": "commonswiki",
510 "page_rev": 63223798
511 },
512 {
513 "wiki": "ptwiki",
514 "page_id": 6721577,
515 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
516 "image": "Processus_de_désignation_des_trésors_nationaux_au_Japon.png",
517 "confidence": 80,
518 "found_on": null,
519 "kind": [
520 "istype-commons-category"
521 ],
522 "origin_wiki": "commonswiki",
523 "page_rev": 63223798
524 },
525 {
526 "wiki": "ptwiki",
527 "page_id": 6721577,
528 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
529 "image": "The_Young_Animator_Training_Project.jpg",
530 "confidence": 80,
531 "found_on": null,
532 "kind": [
533 "istype-commons-category"
534 ],
535 "origin_wiki": "commonswiki",
536 "page_rev": 63223798
537 },
538 {
539 "wiki": "ptwiki",
540 "page_id": 6721577,
541 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
542 "image": "The_japan_art_academy01_1024.jpg",
543 "confidence": 80,
544 "found_on": null,
545 "kind": [
546 "istype-commons-category"
547 ],
548 "origin_wiki": "commonswiki",
549 "page_rev": 63223798
550 },
551 {
552 "wiki": "ptwiki",
553 "page_id": 6721577,
554 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
555 "image": "地域文化創生本部.jpg",
556 "confidence": 80,
557 "found_on": null,
558 "kind": [
559 "istype-commons-category"
560 ],
561 "origin_wiki": "commonswiki",
562 "page_rev": 63223798
563 },
564 {
565 "wiki": "ptwiki",
566 "page_id": 6721577,
567 "id": "97c23850-f24b-11ec-83d8-f4e9d4dbbf00",
568 "image": "文化庁ロゴ.svg",
569 "confidence": 80,
570 "found_on": [
571 "jawiki"
572 ],
573 "kind": [
574 "istype-commons-category",
575 "istype-lead-image"
576 ],
577 "origin_wiki": "commonswiki",
578 "page_rev": 63223798
579 },
580 {
581 "wiki": "ptwiki",
582 "page_id": 6721577,
583 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
584 "image": "Anime_Mirai_project.png",
585 "confidence": 80,
586 "found_on": null,
587 "kind": [
588 "istype-commons-category"
589 ],
590 "origin_wiki": "commonswiki",
591 "page_rev": 63223798
592 },
593 {
594 "wiki": "ptwiki",
595 "page_id": 6721577,
596 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
597 "image": "Daniel-Guaragna1-254x300.png",
598 "confidence": 80,
599 "found_on": null,
600 "kind": [
601 "istype-commons-category"
602 ],
603 "origin_wiki": "commonswiki",
604 "page_rev": 63223798
605 },
606 {
607 "wiki": "ptwiki",
608 "page_id": 6721577,
609 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
610 "image": "Former_Monbushō_Ministry_of_Education,_Culture,_Sports,_Science_and_Technology_building_2010.jpg",
611 "confidence": 90,
612 "found_on": [
613 "dewiki",
614 "eswiki",
615 "frwiki",
616 "kowiki",
617 "ruwiki",
618 "zhwiki"
619 ],
620 "kind": [
621 "istype-lead-image",
622 "istype-wikidata-image"
623 ],
624 "origin_wiki": "commonswiki",
625 "page_rev": 63223798
626 },
627 {
628 "wiki": "ptwiki",
629 "page_id": 6721577,
630 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
631 "image": "Kurikaesi_kigoo_no_tukai-kata.pdf",
632 "confidence": 80,
633 "found_on": null,
634 "kind": [
635 "istype-commons-category"
636 ],
637 "origin_wiki": "commonswiki",
638 "page_rev": 63223798
639 },
640 {
641 "wiki": "ptwiki",
642 "page_id": 6721577,
643 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
644 "image": "Logo_of_Agency_for_Cultural_Affairs,_Government_of_Japan,_2018.png",
645 "confidence": 80,
646 "found_on": [
647 "astwiki",
648 "cawiki",
649 "enwiki",
650 "idwiki",
651 "trwiki"
652 ],
653 "kind": [
654 "istype-commons-category",
655 "istype-lead-image"
656 ],
657 "origin_wiki": "commonswiki",
658 "page_rev": 63223798
659 },
660 {
661 "wiki": "ptwiki",
662 "page_id": 6721577,
663 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
664 "image": "Process_of_Designation,_Registration,_and_Selection_of_Cultural_Properties_in_Japan.png",
665 "confidence": 80,
666 "found_on": null,
667 "kind": [
668 "istype-commons-category"
669 ],
670 "origin_wiki": "commonswiki",
671 "page_rev": 63223798
672 },
673 {
674 "wiki": "ptwiki",
675 "page_id": 6721577,
676 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
677 "image": "Processus_de_désignation_des_biens_culturels_au_Japon.png",
678 "confidence": 80,
679 "found_on": null,
680 "kind": [
681 "istype-commons-category"
682 ],
683 "origin_wiki": "commonswiki",
684 "page_rev": 63223798
685 },
686 {
687 "wiki": "ptwiki",
688 "page_id": 6721577,
689 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
690 "image": "Processus_de_désignation_des_trésors_nationaux_au_Japon.png",
691 "confidence": 80,
692 "found_on": null,
693 "kind": [
694 "istype-commons-category"
695 ],
696 "origin_wiki": "commonswiki",
697 "page_rev": 63223798
698 },
699 {
700 "wiki": "ptwiki",
701 "page_id": 6721577,
702 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
703 "image": "The_Young_Animator_Training_Project.jpg",
704 "confidence": 80,
705 "found_on": null,
706 "kind": [
707 "istype-commons-category"
708 ],
709 "origin_wiki": "commonswiki",
710 "page_rev": 63223798
711 },
712 {
713 "wiki": "ptwiki",
714 "page_id": 6721577,
715 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
716 "image": "The_japan_art_academy01_1024.jpg",
717 "confidence": 80,
718 "found_on": null,
719 "kind": [
720 "istype-commons-category"
721 ],
722 "origin_wiki": "commonswiki",
723 "page_rev": 63223798
724 },
725 {
726 "wiki": "ptwiki",
727 "page_id": 6721577,
728 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
729 "image": "地域文化創生本部.jpg",
730 "confidence": 80,
731 "found_on": null,
732 "kind": [
733 "istype-commons-category"
734 ],
735 "origin_wiki": "commonswiki",
736 "page_rev": 63223798
737 },
738 {
739 "wiki": "ptwiki",
740 "page_id": 6721577,
741 "id": "32428ef0-f2e4-11ec-87d4-bc97e1509594",
742 "image": "文化庁ロゴ.svg",
743 "confidence": 80,
744 "found_on": [
745 "jawiki"
746 ],
747 "kind": [
748 "istype-commons-category",
749 "istype-lead-image"
750 ],
751 "origin_wiki": "commonswiki",
752 "page_rev": 63223798
753 }
754 ]
755}

The current approach that we use with the old API is to take the first result, so in that case, it would be Banner_of_Agency_for_Cultural_Affairs.jpg. But there is a higher confidence result farther down, Former_Monbushō_Ministry_of_Education,_Culture,_Sports,_Science_and_Technology_building_2010.jpg. Should we present that latter, higher confidence suggestion to the user?

@kostajh Yes, if we are only going to suggest one image (like we do now) then I think it makes sense to suggest the image with the highest confidence.

Change 809289 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Add an image: sort suggestions

https://gerrit.wikimedia.org/r/809289

Change 809289 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add an image: sort suggestions

https://gerrit.wikimedia.org/r/809289

mewoph subscribed.
Etonkovidova subscribed.

Checked on wmf.25
eswiki

cswiki

  • Pampy - the recommended image File:PAMPAS.png has confidence_rating "high" (the only one recommendations with high score of 10 recommendations). Note: the same image - File:PAMPAS.png - was recommended with medium score.