Recommender systems
Eligibility, Inventory, and Candidate Constraints
Design eligibility and inventory logic that respects availability, policy, safety, contracts, capacity, and user-level constraints before ranking begins.
By the end you can
- Explain why eligibility and inventory are part of recommendation modeling
- Distinguish hard constraints, soft preferences, and operational quotas
- Design versioned enforcement points across the recommendation pipeline
- Evaluate sparse candidate sets, invalid exposure, and fallback behavior
Visual
A layered eligibility gate
Each gate can only refuse. An item clears global validity, then rights, then whether the platform can actually deliver it, then whether this user may see it, then the surface constraints of the placement itself. Personalization begins after the last gate, never before the first.
What it costs when the first gate leaks has a count and a date. More than 400,000 products sold through Fulfilled by Amazon fall under an order of the U.S. Consumer Product Safety Commission: faulty carbon monoxide detectors, hairdryers without electrocution protection, children's sleepwear violating federal flammability standards. The Commission had determined unanimously on 29 July 2024 that Amazon was a “distributor” of those defective or non-compliant goods. Its Decision and Order followed on 16 January 2025 and was announced the next day: “More than 400,000 products are subject to this Order”. The Order requires public and direct recall notices, refunds on proof of destruction, five years of recall information on the platform, and monthly progress reports.
It is not in force. The Commission stayed it on 28 February 2025. Amazon then sued in the US District Court for the District of Maryland on 14 March 2025, challenging both the July 2024 and the January 2025 orders. The Order becomes effective only 14 days after that court enters final judgment. Courtney Griffin, the Consumer Federation of America's Director of Consumer Product Safety, put the design lesson plainly: “Online marketplaces need more robust systems to vet products before the products make their way into American homes.” That is the first gate, described from outside.
The fourth gate can be built by order too. On 4 September 2019 Google and YouTube settled COPPA charges with the Federal Trade Commission and the New York Attorney General for $170 million — $136 million to the FTC, $34 million to New York. The money was not the whole remedy. The FTC's press release that day: “In addition to the monetary penalty, the proposed settlement requires Google and YouTube to develop, implement, and maintain a system that permits channel owners to identify their child-directed content on the YouTube platform so that YouTube can ensure it is complying with COPPA.”
That system is an eligibility flag. Once it existed, the platform switched personalization off for the flagged class. YouTube's blog post the same day: “we will treat data from anyone watching children's content on YouTube as coming from a child, regardless of the age of the user.” And: “We will also stop serving personalized ads on this content entirely”. A user-level constraint is not a preference the ranker weighs. Here it is a regulator-ordered label that removes an entire class of impressions from personalization.
Global validity
The item is active, correctly identified, and allowed on the platform.
Market and rights
The item is legal, licensed, priced, and available in the relevant region.
Operational feasibility
Inventory, capacity, delivery, and service dependencies can satisfy the action.
User-level constraints
Age, subscription, preferences, blocks, and frequency rules permit exposure.
Surface constraints
The format, creative, and action are compatible with the current placement.
Example
The ranker recommended a perfect item that could not be delivered
US federal law already forbids offering what you cannot deliver. Under the FTC's Mail, Internet, or Telephone Order Merchandise Rule it is unlawful to solicit an order unless, at the time of the solicitation, “the seller has a reasonable basis to expect that it will be able to ship any ordered merchandise to the buyer” within the time stated. If no time is stated, the limit is thirty (30) days. That is § 435.2(a)(1).
Now take the grocery app. It ranked a highly relevant product first. The item was out of stock at the user's store, restricted in the destination region, and available only after the requested delivery window. That is not merely a ranking that scored well and delivered badly. The surface made a solicitation. And the rule fixes the moment at which a reasonable basis has to exist: the moment of the solicitation. That is the moment of the render, not the moment the feature snapshot was computed.
- Catalog record: The item existed globally but not in the local fulfillment network. A record that looks valid in the catalog is not by itself a reasonable basis to expect shipment.
- Temporal constraint: Availability changed between feature computation and page render. § 435.2(a)(1) attaches to the time of the solicitation, which is the later of those two moments.
- Policy constraint: Regional rules and age requirements affected eligibility. Where the surface states no shipment time at all, the rule's thirty (30) day default applies instead.
- Capacity constraint: Only a limited number of promotions and seller impressions were allowed, so the slot was spent on an item the platform could not stand behind.
- User boundary: The user had hidden the brand in a previous control setting, a constraint no relevance score is entitled to overrule.
Eligibility defines the feasible action space
Only actions the system is permitted and able to take belong in a ranking. Eligibility may depend on inventory, geography, rights, safety classification, subscription, device, age, seller status, frequency caps, prior exposure, and user controls. If invalid items enter training or evaluation, the model learns from impossible choices. If rules are applied only after ranking, candidate recall and score distributions change in ways the model never saw.
Constraints usually live in the serving path rather than the model, and the shipped systems say so in their own words. X released its recommendation algorithm on 31 March 2023. The README describes visibility filtering as “Responsible for filtering X content to support legal compliance, improve product quality, increase user trust, protect revenue through the use of hard-filtering, visible product treatments, and coarse-grained downranking”. Hard filters and coarse downranking, arranged around the ranker rather than inside it.
Facebook's search team reports the same layering. Its 2020 paper on embedding-based retrieval concedes the starting point in the abstract: “While embedding-based retrieval (EBR) has been applied in web search engines for years, Facebook search was still mainly based on a Boolean matching model.” The paper then describes serving that retrieval inside a system built on an inverted index. The learned retriever was added to Boolean matching. It did not replace it. What the index refuses to match is never scored.
Datasets carry eligibility rules too, written into the release notes. MovieLens 25M holds 25,000,095 ratings from 162,541 users across 62,423 movies. The GroupLens README of 21 November 2019 states the admission rule in one line: “Each user has rated at least 20 movies”. Google's TensorFlow Datasets catalogue, packaging the data independently, repeats it. Every model trained on that file inherits a population defined by a threshold nobody in the modelling code chose.
Whatever the serving path filters is part of the training problem too, even when the model never sees the rule.
Steps
Engineer the feasible candidate set
Constraints get counted before they get placed. Enforcement points, versioning, and empty-set tests follow. Monitoring invalid exposure is what tells the team the rules still hold in production.
Those middle steps stop being advice once a court writes them down. Meta paid a $115,054 civil penalty and agreed to stop using an ad tool that relied on protected characteristics to decide who was eligible for housing ads. The United States had sued under the Fair Housing Act on 21 June 2022. What replaced the tool was a named enforcement point in the delivery path: the Variance Reduction System, launched for US housing ads and confirmed with the government on 9 January 2023. Meta described it that day: “The VRS uses new machine learning technology in ad delivery so that the actual audience that sees an ad more closely reflects the eligible target audience for that ad.”
Read that against the steps. Step 2 is the enforcement point: the constraint sits in ad delivery, downstream of whatever targeting produced the audience. Step 3 is the versioned decision. The system was not merely shipped but confirmed with the government on a dated occasion, which is what makes it auditable later. Step 5 is monitoring that outlives the launch. The company stays under court-supervised compliance review through 27 June 2026.
1. Inventory constraints
List global, regional, contractual, operational, and user-specific rules.
2. Assign enforcement points
Choose ingestion, indexing, retrieval, ranking, or final-render gates.
3. Version decisions
Record rule versions and timestamps with exposure logs.
4. Test empty and sparse sets
Define safe fallbacks and non-personalized alternatives.
5. Monitor invalid exposure
Alert on stale inventory, policy breaches, and rule disagreement.
Comparison
Hard constraints and soft preferences must remain separate
Keep these apart in the code, not only in the design document. Hard eligibility means a violation makes the action invalid, so it cannot be one term inside a score. A soft constraint is a preference that may lose to another objective. The operational quota in the third column can behave as either, which is exactly why it needs a named owner.
The cleanest example of the first column is a rule a legislature wrote. A platform may not show profiling-based advertising to someone it is reasonably certain is a minor. That is Article 28(2) of the EU's Digital Services Act, adopted on 19 October 2022: “Providers of online platform shall not present advertisements on their interface based on profiling as defined in Article 4, point (4), of Regulation (EU) 2016/679 using personal data of the recipient of the service when they are aware with reasonable certainty that the recipient of the service is a minor.” Reproduced as printed, singular “online platform” and all.
Nothing in that sentence is tradeable. There is no relevance score high enough to buy an exception. That is precisely the property that keeps such a rule out of the ranker's objective and at a gate in front of it. Article 38 adds a second obligation of the same kind: very large platforms must offer at least one recommender option not based on profiling.
TikTok reported implementing both in the EU in 2023, and its compliance post shows what obeying each looks like. On Article 38: “users in Europe can now turn off personalisation so that their For You and LIVE feeds instead recommend both locally relevant and globally 'popular' videos”. On Article 28(2): “users in Europe aged 13-17 no longer see personalised advertising based on their activities on or off TikTok”. The first is a whole alternative ranking path. The second is an eligibility class removed from a surface. Neither is a coefficient.
Hard eligibility
A violation makes the action invalid.
- Apply before scoring or at a guaranteed gate
- Do not trade against relevance
- Version and audit rules
- Example: unavailable inventory
Soft constraint
A preference can trade against other objectives.
- Express as feature, penalty, or re-ranking objective
- Measure utility impact
- May vary by user or surface
- Example: reduce repeated genres
Operational quota
Allocates scarce platform capacity.
- Can be hard or flexible
- Needs a clear owner
- Changes exposure and training data
- Example: notification frequency budget
Example
Constraint implementation failures
A stale eligibility cache is an internal failure. Constraint gaming is an external one. The evidence for each comes from a different place: one from comparing the index against the catalog, the other from watching how provider metadata changes after a rule ships.
The external failure is not hypothetical. In the US it now has a rule of its own. The FTC announced its Rule on the Use of Consumer Reviews and Testimonials on 14 August 2024. It was published on 22 August 2024 and took effect 60 days later. From the announcement: “The Federal Trade Commission today announced a final rule that will combat fake reviews and testimonials by prohibiting their sale or purchase and allow the agency to seek civil penalties against knowing violators.”
The rule reaches fake and AI-generated reviews, reviews bought for a stated sentiment, undisclosed insider reviews, company-controlled “independent” review sites, and review suppression. It also reaches the signals themselves. At § 465.8: “It is an unfair or deceptive act or practice and a violation of this part for anyone to: (a) Sell or distribute fake indicators of social media influence that they knew or should have known to be fake and that can be used by individuals or businesses to materially misrepresent their influence or importance for a commercial purpose”. Every one of those manipulations targets an input a platform uses to decide eligibility or exposure.
- Stale eligibility cache: Items become invalid after the index or feature snapshot is built, so the gate passes an item the catalog no longer supports.
- Training-serving mismatch: The model trains on candidates that production would never allow, and learns preferences over choices it will never get to make.
- Rule order ambiguity: Different services apply constraints in conflicting sequences, and the resulting exposure belongs to no single rule version.
- Silent fallback: An empty candidate set produces a low-quality or unsafe default that no one designed and no alarm names.
- Constraint gaming: Providers alter metadata to enter eligibility segments or quotas — conduct the FTC's review rule now penalises, down to § 465.8 on selling or distributing fake indicators of social media influence.
Key idea
Filtering rules belong to the decision contract
Eligibility is not a cleanup filter; it is part of the decision contract and the historical data-generating process.
The published funnel shows how little room there is for a downstream rescue. Google's 2016 paper on the YouTube recommender opens its section on candidate generation with one sentence: “During candidate generation, the enormous YouTube corpus is winnowed down to hundreds of videos that may be relevant to the user.” Its funnel diagram is labelled millions → hundreds → dozens. Hundreds out of millions ever reach a scorer. Dozens of those reach the user. An item cut at the first stage is not scored low. It is not scored at all, and nothing about it appears in the exposure logs the next model is trained on.
An item filtered out at candidate generation cannot be rescued by any downstream score, and its absence is already written into the data the next model trains on.
Key idea
The feasibility gate
A recommendation cannot be considered relevant if the platform cannot legitimately present or fulfill it.
That is a design principle with a legal floor under it. The FTC's Mail, Internet, or Telephone Order Merchandise Rule requires the seller to have a reasonable basis, at the time of the solicitation, to expect it can ship within the time stated. If no time is stated, within thirty (30) days. That is § 435.2(a)(1). The ranking surface is where the solicitation happens. So the ranking surface is where that basis has to already exist.
Send nothing to ranking that the platform could not stand behind if the user acted on it right now.
Key takeaways
- Ranking optimizes within a feasible choice set; it does not define that set. Google's 2016 YouTube paper labels the funnel millions → hundreds → dozens, and the ranker only ever sees the hundreds.
- Only actions the system is permitted and able to take belong in a ranking. Under § 435.2(a)(1) the seller needs a reasonable basis to expect shipment within the stated time, or within thirty (30) days if none is stated. That basis must exist at the moment of the solicitation.
- Eligibility is not a cleanup filter. It is part of the decision contract and the historical data-generating process, because an item winnowed out during candidate generation leaves no trace in the logs the next model learns from.
- Global validity is the first gate for a reason. The Consumer Product Safety Commission's Order of 16 January 2025 covers more than 400,000 Fulfilled by Amazon products, including faulty carbon monoxide detectors and children's sleepwear violating federal flammability standards.
- Stale eligibility cache remains a practical risk: items become invalid after the index or feature snapshot is built, and the model then trains on candidates production would refuse.
- Invalid exposure needs an alarm of its own. Stale inventory, policy breaches, and gates that disagree with one another should surface while the item is still being shown. Both remedies here treat monitoring as a dated obligation rather than a launch task: the Meta consent framework runs court-supervised compliance review through 27 June 2026, and the CPSC Order requires monthly progress reports.