Page MenuHomePhabricator

Add a link in VE: enforce a maximum number of recommendations
Closed, DeclinedPublic

Description

On T261408, it says that the maximum number of link recommendations that should be shown to the user in a given session is 10. That maximum needs to be enforced somewhere. To deal with phrases that can't be found, we may want the server to send 15 recommendations and have the client display the first 10 that it can find.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Currently there is no concept of a buffer: the backend sends the "maximum links per task" config variable to the link recommendation service which returns only that many recommendations.

Currently there is no concept of a buffer: the backend sends the "maximum links per task" config variable to the link recommendation service which returns only that many recommendations.

Yes. So if we max links per task variable specifies 15, and the service returns 12 for an article, we still only want to show a maximum of 10 in the UI for that article.

So 10 would be a hard-coded value unrelated to the "Maximum number of link recommendations to display per article" parameter mentioned in T266443: Add Link engineering: On-wiki configuration?

So 10 would be a hard-coded value unrelated to the "Maximum number of link recommendations to display per article" parameter mentioned in T266443: Add Link engineering: On-wiki configuration?

Ah. Yes, I think we should change refreshLinkRecommendations.php to ask for maximumLinksPerTask + 5 (hardcoded buffer value) and keep maximumLinksPerTask as the value for display purposes in VisualEditor.

@MMiller_WMF this is a task we can cut from scope.

If we don't do this, that means that conceivably some longer articles might have 15 suggestions shown to a user instead of the business rule that says the maximum should be 10.

Declining for now. We are asking for 10 tasks without a buffer. We could revisit this post launch.