Page MenuHomePhabricator

Display the outline name that applies when listing Wikidata items in Article guidance
Closed, ResolvedPublic4 Estimated Story Points

Assigned To
Authored By
Pginer-WMF
May 5 2026, 7:45 AM

Description

As part of Article Guidance (T396029), by typing the title for a new article, users can select the specific subject for the article. The list is based on Wikidata items and displays the name of the outline for the item. For the outline, the items used to show only one value. However, now they seem to display multiple. For example, searching for "Buster Keaton" the outlines "Human" and "Animalia" are displayed on Simple English Wikipedia even though the actor outline is the most specific outline, while the test instance still shows the old behaviour, where only "actor" is displayed.

On the test instanceOn Simple English Wikipedia
b24e11a4f1.catalyst.wmcloud.org_w_index.php_title=Special_NewArticle&mobileaction=toggle_view_mobile(Wiki Mobile) (15).png (320×568 px, 68 KB)
simple.wikipedia.org_wiki_Special_NewArticle(Wiki Mobile).png (320×568 px, 60 KB)

This ticket proposes to display only the one outline that will be applied when the item is selected. In the example, searching for "Buster Keaton" should list it only as "actor".

Event Timeline

Pginer-WMF triaged this task as High priority.

Change #1285826 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ArticleGuidance@master] Log search results and matches to the js console

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

SBisson changed the task status from Open to In Progress.May 11 2026, 2:34 PM
SBisson claimed this task.
SBisson moved this task from Prioritized to In-progress on the LPL Hypothesis board.

Change #1285826 merged by jenkins-bot:

[mediawiki/extensions/ArticleGuidance@master] Log search results and matches to the js console

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

Change #1285928 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ArticleGuidance@master] Add configurable user-agent and sparql endpoint url

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

Change #1285931 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ArticleGuidance@master] Short cache on sparql errors

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

Change #1285928 merged by jenkins-bot:

[mediawiki/extensions/ArticleGuidance@master] Add configurable user-agent and sparql endpoint url

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

Change #1285931 merged by jenkins-bot:

[mediawiki/extensions/ArticleGuidance@master] Short cache on sparql errors

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

Change #1286334 had a related patch set uploaded (by Sbisson; author: Sbisson):

[operations/mediawiki-config@master] ArticleGuidance: set sparql endpoint

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

Change #1286334 merged by jenkins-bot:

[operations/mediawiki-config@master] ArticleGuidance: set sparql endpoint

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

Mentioned in SAL (#wikimedia-operations) [2026-05-12T13:06:55Z] <sbisson@deploy1003> Started scap sync-world: Backport for [[gerrit:1286334|ArticleGuidance: set sparql endpoint (T425389)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-12T13:08:47Z] <sbisson@deploy1003> sbisson: Backport for [[gerrit:1286334|ArticleGuidance: set sparql endpoint (T425389)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-05-12T13:14:08Z] <sbisson@deploy1003> Finished scap sync-world: Backport for [[gerrit:1286334|ArticleGuidance: set sparql endpoint (T425389)]] (duration: 07m 13s)

Change #1286359 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ArticleGuidance@wmf/1.47.0-wmf.1] Add configurable user-agent and sparql endpoint url

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

Change #1286359 merged by jenkins-bot:

[mediawiki/extensions/ArticleGuidance@wmf/1.47.0-wmf.1] Add configurable user-agent and sparql endpoint url

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

Mentioned in SAL (#wikimedia-operations) [2026-05-13T13:03:53Z] <sbisson@deploy1003> Started scap sync-world: Backport for [[gerrit:1286359|Add configurable user-agent and sparql endpoint url (T425389)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-13T13:05:52Z] <sbisson@deploy1003> sbisson: Backport for [[gerrit:1286359|Add configurable user-agent and sparql endpoint url (T425389)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-05-13T13:12:12Z] <sbisson@deploy1003> Finished scap sync-world: Backport for [[gerrit:1286359|Add configurable user-agent and sparql endpoint url (T425389)]] (duration: 08m 18s)

Change #1286985 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ArticleGuidance@master] Improved logging around fetching outline depth and matchvia

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

Change #1286985 merged by jenkins-bot:

[mediawiki/extensions/ArticleGuidance@master] Improved logging around fetching outline depth and matchvia

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

I tried the example on Simple English Wikipedia and now it only shows "human" instead of "human animalia", which is an improvemetn since it makes clear which outline was selected. However, it is not matching the "actor" outline which is the most specific.

simple.wikipedia.org_w_index.php_title=Special_NewArticle&mobileaction=toggle_view_mobile(Wiki Mobile) (8).png (320×568 px, 59 KB)

The outline matching is working as expected for the example case now:

simple.wikipedia.org_wiki_Special_NewArticle(Wiki Mobile) (4).png (320×568 px, 59 KB)

I noticed another discrepancy with Wikidata search on SImple English compared to Test Wiki. Searching for "Marie Curie" the main result is not shown on simple English while it does on test wiki (as reported in T424638#11885674). I just checked and shared results below:

On Test Wikipedia Marie Curie is in the results when searching for "Marie Curie"On Simple English Wikipedia searching for "Marie Courie" does not list the famous scientist.
test.wikipedia.org_wiki_Special_NewArticle(Wiki Mobile) (4).png (320×986 px, 104 KB)
simple.wikipedia.org_w_index.php_title=Special_NewArticle&mobileaction=toggle_view_mobile(Wiki Mobile) (9).png (320×1,382 px, 159 KB)

Please, let me know if it seems unrelated to the present ticket, and I can move it to a separate one.

@Pginer-WMF it's not related to this task but it's a recurring problem that we haven't solved properly so it's worth some more effort imo.

We've gone back and forth between regular MediaWiki search and wbsearchentities. The problem with Marie Curie specifically is that the wikidata item that you expect to see (Q7186) is the 12th result and since many of the earlier results match outlines it doesn't get included in the top 8 that we display. Since we don't paginate it's very likely that what you are looking for is there but just not in the top 8. The relevance ranking appears to be based on number of statements and sitelinks but doesn't establish a hierarchy between a person and all the things named after that person.

The good news is you can type "Marie Curie scientist" and get it as the top result. We could consider some messaging when there is too many results and the query could be made more specific.

BTW you can compare the different search APIs using my wdsearch tool: https://wdsearch.toolforge.org/

About testwiki, it only has 2 outlines so it's not a good place to test. I can't add more or all outlines if you want.

The relevance ranking appears to be based on number of statements and sitelinks but doesn't establish a hierarchy between a person and all the things named after that person.

That makes sense. I understand that the system cannot guess wheteher a person or a building is more relevant in a given context. What I think makes this case a bit more counterintuitive is that the results don't get more prominent in the list when they are an exact match of the query. I'll take a look into this and will check the linked tool to consider a separate ticket if needed. Thanks for all the clarifications!