-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cold start follow recommendations #15945
Conversation
9cca164
to
66cedcb
Compare
66cedcb
to
d3d6e97
Compare
@@ -363,7 +364,7 @@ def to_param | |||
end | |||
|
|||
def excluded_from_timeline_account_ids | |||
Rails.cache.fetch("exclude_account_ids_for:#{id}") { blocking.pluck(:target_account_id) + blocked_by.pluck(:account_id) + muting.pluck(:target_account_id) } | |||
Rails.cache.fetch("exclude_account_ids_for:#{id}") { block_relationships.pluck(:target_account_id) + blocked_by_relationships.pluck(:account_id) + mute_relationships.pluck(:target_account_id) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is unrelated but it does remove a redundant JOIN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be moved in another PR as well.
Sometimes I am suggested myself. This should be excluded. |
Good point. |
d3d6e97
to
71652f4
Compare
The list of suggestions has a dismiss button, but it has no effect on additional candidates. This is not what the user expects.
|
Due to the suggestions API returning accounts and not a different entity that wraps accounts it is difficult to add a "dismissable" attribute, or other information about the source/nature of the recommendation. It is also difficult to make the global fallback results dismissable; personalized suggestions live in a personal sorted set, so removing is simple, but to dismiss a global result, another layer of filtering would need to be added. I think it is not a huge problem if the dismiss button doesn't work on some results, it is unexpected but it might not be noticed often. Removing the dismiss function altogether is another option. While dismissing recommendations is possible on LinkedIn, there is no such option on Twitter, for example. Alternatively, we will need to add another model similar to mutes, but I would not want to do that within this PR. |
OK. The dissmiss button appears to work on the WebUI until it reloads. Until you find a good solution, I think it's best to stay as it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like admins to be able to disable the feature entirely. Indeed, this in an additional venue for bad actors to be promoted to users, and while admins are able to suppress individual suggestions, monitoring them and doing so is also additional work for them.
Considering the suggestion criteria, I'm unsure about the sensitive
thing. I understand this may to not present people with porn and stuff, but:
- that's already some bias
- how that bit is set for posts without media is dependent on the client, and, if the account is remote, of the server
- this risks effectively filtering out people using content warnings, actively encouraging newcomers using content warnings less than half the time, which might in turn make newcomers accustomed to not using them at all.
Apart from that, I can't really comment on the quality of the recommendations, I'm not too sure
On the technical side of things, I wonder how much space the account_summaries
materialized view takes. At many points you were reluctant to add columns to the accounts table because of how big it is… but an additional materialized view on the whole accounts table would be even worse, wouldn't it?
You don't know when something is "sensitive" because it's porn/gore or because it's a "cat picture with eye contact". You have to err on the side of caution because you don't know how old the new user is. Porn/gore without "sensitive" flag is against most places' rules so while it's possible that it can occur, it becomes a moderation matter. Likewise from the perspective of reducing friction for new users, the less click-throughs are required to view content, the better. The content warning system can be alienating to someone not accustomed to it when it's everywhere. |
Okay, so adding columns to the On mastodon.online, |
Yeah, but I'm worried such a criteria would just discourage use of CWs and the sensitive flag overall. That being said, I'm not sure how effective that check even is, e.g. if someone posts properly-tagged porn 9 out of 20 times, they're going to be eligible anyway.
Ok, we probably don't have to care about that then. Although we could do some a-priori filtering (e.g. only keeping discoverable and non-locked accounts in the materialized view) to reduce both the materialized view size and the query time. |
71652f4
to
09d38c6
Compare
75c8cef
to
2e5db73
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few inline comments. My comments about the whole approach still stand, but the PR is in better shape overall.
app/javascript/mastodon/features/compose/components/search_results.js
Outdated
Show resolved
Hide resolved
@@ -363,7 +364,7 @@ def to_param | |||
end | |||
|
|||
def excluded_from_timeline_account_ids | |||
Rails.cache.fetch("exclude_account_ids_for:#{id}") { blocking.pluck(:target_account_id) + blocked_by.pluck(:account_id) + muting.pluck(:target_account_id) } | |||
Rails.cache.fetch("exclude_account_ids_for:#{id}") { block_relationships.pluck(:target_account_id) + blocked_by_relationships.pluck(:account_id) + mute_relationships.pluck(:target_account_id) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be moved in another PR as well.
2e5db73
to
0609a62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the inline comment this seems technically ok to me.
I'm just not completely sure about the metrics and criteria, and I would rather prefer if admins could disable the feature altogether, but otherwise it seems fine to me.
app/javascript/mastodon/features/compose/components/search_results.js
Outdated
Show resolved
Hide resolved
0609a62
to
6cb0a0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again I want to reiterate that:
- I'm not sure about the criteria/metrics used (especially wrt. it discouraging CWs use)
- I'd like admins to have the ability to disable the feature altogether
Otherwise, LGTM
Some follow-up discussions on #18128 |
Joining a new social network is a disorienting experience. Unlike other platforms, offering the user to find their old friends using something like a contact list upload is impossible. So we need to at least present the user with new content. The features that served this purpose so far were the public timelines, the profile directory, trending hashtags, and automatically following the admin user(s).
The public timelines worked while Mastodon was new and small, under the radar of spammers and marketers, and mostly concentrated in a few major languages. As of today, I do not believe anyone could say with a serious face that new users should browse the federated timeline to get accustomed to the platform. The noise to signal ratio is simply too small.
The profile directory is slightly better in this aspect but its egalitarian sorting method (recent activity) means it is just one step of abstraction from the federated timeline and not any more helpful for finding quality content. Previous attempt to at least make it categorized by using hashtags in people's bios proved unsuccessful, due to some fundamental flaws:
Trending hashtags are useful, but not very prominent. Auto-following admin user(s) is probably the feature that has been carrying new user onboarding for years, but it too is flawed. It requires admins to consistently act as curators and boost interesting content from different users. It leaves people wondering why they are already following someone they don't know, and does not always translate into new users following other people.
Regardless of what you think about popularity contests or "clout", the reality is that a new user must be presented with something interesting quickly after signing up, or they will bounce and never return, and that means that popularity must play into the new user experience (that is, unless you have some AI oracle mechanism that can tell you when something is interesting before showing it to real people).
This feature will provide new users "who to follow" recommendations. This is an enhancement of the existing "who to follow" feature which so far has been essentially a reminder to follow people you often engage with (which is useless for new users who have not had anyone to engage with yet).
The results will be a shuffled mix of two parts:
Where only users with unlocked, not-limited, active accounts who have opted-into the profile directory feature (though this might warrant a rename of the checkbox label; internally the setting is called "discoverable" and this no longer has anything to do with the profile directory specifically) are considered.
Furthermore, we can localize the results for whichever language the new user's interface is in, by looking at which language is most common among each user's most recent 10 posts.
While 2. highlights accounts that may have high significance or recognizability (like the EFF or Tutanota, or Mastodon itself), 1. promotes accounts that create content that resonates with the community.
The admin UI provides an overview of these recommendations with the ability to moderate them.