In T401021#11193688 it was discussed that possibly the hasrecommendation keyword could be adapted to allow filtering by confidence score.
Currently recommendation weighted_tags are just encoded as a binary flag:
- prefix: recommendation.$type (e.g. recommendation.tone)
- tag: exists (generally hardcoded, could also be a place where to add some variation if needed in the future)
- score: null (defaults to the lowest score possible)
It is probable that some models may have a confidence score that could be useful to store and query using the hasrecommendation keyword. It might bring flexibility at query time allowing to adjust some threshold on a per query/wiki basis.
The syntax could look like this: hasrecommendation:tone>0.3.
It could also be interesting to evaluate if the hasrecommendation keyword should influence ranking based on this score. The idea needs to be validated but the assumption is that it could help to favor article that are less likely to be false-positives.
We could leave hasrecommendation as a filter only keyword but enable ranking if some weight is provided in the query:
- hasrecommendation:tone>0.5: filter pages
- hasrecommendation:tone^1.0>0.5 or hasrecommendation:tone^1.0: filter & rank pages with a tone recommendation using a weight of 1.0
AC:
- hasrecommentation has a way to filter by score
- hasrecommendation can rank pages when provided a weight hasrecommendation:tone^0.4
- other keywords like articletopic/articlecountry should also support this new weight syntax