Page MenuHomePhabricator

AB test did-you-mean query suggester variations
Closed, ResolvedPublic2 Estimated Story Points

Description

As part of T390858 we added a new suggest_variant field to the production search clusters that contains the opening_text content, rather than the titles and redirects. We suspect this will produce a language model that more accurately reflects the queries users will type.

Run an ABC test with the following variants:

  • control: existing did-you-mean suggester
  • d1: existing configuration, but with prefix_length = 1
  • d1v: existing configuration, but with prefix_length = 1, field = suggest_variant

Test should run for one week, as is typical for search tests.

Test should be analyzed with a variant of the dym-ab-analysis notebook. We expect the d1v bucket to see an increased latency, the analysis likely needs to be updated to report on changes in latency between buckets. It may also require updates to properly report A/B/C.

Event Timeline

pfischer set the point value for this task to 2.Sep 22 2025, 3:36 PM

Patch to configure and start the tests was prepped in the earlier patch, shipped the test today. Can turn it off Oct 13.

Patch to start test: https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1187108

I mistakenly posted this to the parent ticket, but it belongs here:

Preliminary reports. They might become final, but they haven't been reviewed by anyone else yet:

In both breakdowns default_1 outperforms the other two variations. Top level stats for the change from control to the prefix_len=1 variant:

!! - statistically significant change

ALL WIKIS

display rate: 23.0 -> 24.5 !!
dym selection rate: 0.60 -> 0.61
auto rewrite rate: 9.26 -> 9.99 !!
user selected clickthrough rate: 26.2 -> 26.0
auto rewrite clickthrough rate: 19.9 -> 20.6 !!
all query clickthrough rate: 33.03 -> 33.13

EN, DE, FR

display rate: 28.6 -> 29.8 !!
dym selection rate: 0.52 -> 0.53
auto rewrite rate: 10.23 -> 10.86 !!
user selected clickthrough rate: 31.2 -> 30.9
auto rewrite clickthrough rate: 24.5 -> 25.3 !!
all query clickthrough rate: 37.90 -> 38.03

We reviewed the report in the wed meeting, where a report against major spaceless languages was requested. A quick runthrough of a report restricted to zhwiki and jawiki finds that the default_1v profile is significantly better than the others, suggesting that the variant does potentially have benefits, but it may depend on which language. As such I've run a batch of reports against the top few wikis by size, and a few selected languages that have unique language features:

Will need to ponder on these, it's a large variety of data to consider. There are clearly some languages that benefit more from the variant field than others.

From our review of the initial reports there is also a bit of surprise around the opening_text language model performing worse than the default language model. One plausible explanation is that there are word patterns seen in queries but not the opening text, only in the title fields. As such it would be interesting to run a follow-up test comparing title+redirect.title vs title+redirect.title+opening_text. For that I've created T407432.

Followup test with variant using the combined title+opening_text field, in T407432, surprisingly achieved almost the same results as the opening_text on it's own. As in this first test the default_1 profile, with only titles and prefix_len=1 looks to be the best performing.

The second AB test has been undeployed and reported on. Patches are also up that will stop building the variant field in production and changing cirrus to prefix_len=1.