Author diversity resets on every For You request, so the same author repeats across consecutive loads
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 33.3k
- Forks
- 5.4k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 1
Description
Problem
The same author can fill For You across consecutive refreshes and scrolls, because author diversity is computed per request and starts from zero each time.
Current behavior (6bb4594)
author_pool_countscounts an author's posts only among the current request's candidates:
https://github.com/xai-org/x-algorithm/blob/6bb4594/home-mixer/scorers/ranking_scorer.rs#L629AuthorDiversityDecay= 0.5,AuthorDiversityFloor= 0.25 (2nd post from an author in a request scored at 0.625, 3rd at 0.4375):
https://github.com/xai-org/x-algorithm/blob/6bb4594/home-mixer/params/param.rs#L229-L245- The query carries
served_ids(post IDs only), andPreviouslyServedPostsFilteruses them to drop exact posts already served, not authors:
https://github.com/xai-org/x-algorithm/blob/6bb4594/home-mixer/models/query.rs#L49
https://github.com/xai-org/x-algorithm/blob/6bb4594/home-mixer/filters/previously_served_posts_filter.rs#L26-L30
Result: an author's first post in every new load gets a full 1.0 multiplier, even if the viewer was shown that author several times in the previous load seconds earlier.
Proposal
- Carry recently served author IDs (bounded, e.g. last N requests or last few minutes) with the query.
- Seed
author_pool_countswith those counts, time-decayed, so diversity continues across loads instead of resetting. - Ship behind a param, off by default, for controlled evaluation.
Related
- #37: hard author cap within a single slate (off by default)
- #83: cross-request semantic fatigue (topic-keyed, not author-keyed)
- #172 (closed): diversity keyed on the retweeter
Open questions
- Window size and decay rate
- Whether mutual follows or authors the viewer engages with heavily should get a softer penalty
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with home-mixer/scorers/ranking_scorer.rs and inspect how author_pool_counts is built, then trace served_ids through home-mixer/models/query.rs and previously_served_posts_filter.rs. Review the parameters in home-mixer/params/param.rs and resolve the proposed window, decay, and rollout choices. Done means bounded recent author history can seed diversity across loads behind an off-by-default parameter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100