googleinterns / blueprint-step-2020

Apache License 2.0
0 stars 2 forks source link

Create Prioritization system for ActionableMessages #139

Closed austinteshuba closed 4 years ago

austinteshuba commented 4 years ago

The system assigns one of three priorities to a message: Low, medium, and high. High priority is assigned if the user starred the email. Medium priority is assigned if one of the following is true: the email was not sent by a mailing list or the email was marked important automatically by Gmail. An email is classified to be "sent from a mailing list" if it is either 1) not addressed directly to the current user or 2) sent to more than some N number of recipients (I set N to 15 here, but we can move this up or down if anyone has strong feelings). A low priority is assigned if the email is not of high or medium priority.

Emails are returned to the server in order of priority, from highest to lowest, and then in order of date received (later it was received, the higher the priority).

This prioritization is quite rigid and isn't going to assign the perfect, real-world priority every time (if we were able to do that, we would assign priority via some discrete variable and sort by that, since the priority is absolute). However, this hopefully does enough of the sorting that the order emails are presented to the user makes sense.

Dependent on PR #155