So the UI would display a pop-up based on the p-value stored in card info, and when searching prop:is_leech, Anki would convert it to prop:p<0.01, correct?
Actually, no, that still won’t work. In order to reduce the amount of time the leech status changes, in my specification of the detector I wrote that we should use two thresholds. If p<threshhold_1, card’s status is changed to “leech”. if p>threshold_2, card’s status is changed to “not a leech”. The second threshold can be 15% or 20% or something like that. Otherwise, some cards can jump around a lot. This means that we need to keep track of how p changes after every review.
For example, if the first threshold is 5% and the second one is 25%, and p(normal) is 10%, whether it’s a leech or not depends on whether it has crossed the first threshold before or not. If it has crossed it before, it’s a leech, otherwise it’s not a leech.
As an alternative solution, we could use one threshold but update the leech status once every 3 reviews. But that is also incompatible with your method of not using a tag/flag, since it requires keeping track of how many reviews ago the leech status changed.