Along with all the existing recommendation API parameters, it should be possible to specify a difficulty level.
In this first phase, only access to easy recommendations is needed but the API interface should be designed in a way that is compatible with requesting other difficulty levels (medium, hard) in the future. For example: level: [1,2,3] or difficulty: [easy, medium, hard].
Recommendation difficulty level is initially based on size but could evolve to include aspects like unadapted templates, large tables, or other challenging wiki constructs.
For an article translation recommendation to be considered easy, the source article size should be between 2000 and 3000 kBs. For the purpose of this experiment, source articles smaller than 2000 kBs are considered stubs that are not worth translating.
For a section translation recommendation to be considered easy, the source section size should be between TBD and TBD kBs. (This should generally align with the quick translation label implemented in T360570 but the formula, 15 minutes at 200 words per minute, seams way too fast. Per that calculation, a 2000 kBs article would take 2 minutes to translate.)
Derived Requirements
- Ensure that the recommendation API supports a new parameter to filter results by difficulty level.
- Ensure that in the first phase, the API can return *easy* recommendations while keeping the design extensible to support other levels (medium, hard) in the future.
- Ensure that an article translation recommendation is classified as *easy* if the source article size is between 2000 and 3000 kBs.
- Ensure that source articles smaller than 2000 kBs are excluded from recommendations as they are considered stubs.
- Ensure that section translation recommendations for *easy* difficulty use a defined size range (currently TBD), aligned with the "quick translation" label logic.
- Ensure that the API query accepts both level: [1,2,3] and difficulty: [easy, medium, hard] formats for future compatibility.
Test Steps
Test Case 1: Ensure API Accepts Difficulty Parameter
- Send a request to the recommendation API with the parameter difficulty=easy.
- ✅❓❌⬜ AC1: Verify that the API returns only recommendations classified as *easy*.
QA Results - api.wikimedia
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T399117#11108930 |


