← Back to Home

Fair Ranking Algorithm

shop.mv uses a sophisticated fair ranking algorithm to ensure all sellers get equitable visibility while maintaining high-quality search results and user experience.

1. OVERVIEW

Our fair ranking system balances multiple objectives: relevance to search queries, exploration of new listings, support for boosted listings, and ensuring fairness across all sellers. The algorithm uses the FA*IR (Fair Alternative Item Recommendation) framework to guarantee statistical fairness with 90% confidence.

BASICALLY,

We make sure all sellers get a fair chance to be seen, not just the popular ones or those who pay for boosts.

2. WHEN FAIR RANKING APPLIES

Fair ranking is used for:

  • Homepage browsing: When viewing all listings
  • Category browsing: When filtering by category

Traditional ranking is used for:

  • Search results: Relevance takes priority
  • User's own listings: Shows your items chronologically

BASICALLY,

Fair ranking applies when you're browsing all listings. When you search for something specific or view your own items, we show the most relevant results instead.

3. LISTING GROUPS

Listings are categorized into three groups:

  • Boosted (up to 25%): Listings with active boost within the last 48 hours
  • New (up to 15%): Listings created within the last 48 hours (without active boost)
  • Organic (at least 60%): All other active listings

These are target proportions - actual percentages adjust dynamically based on available inventory to ensure quality results.

BASICALLY,

We divide listings into three groups: paid boosts get up to 25% of spots, new listings get up to 15%, and regular listings get at least 60%. The exact split adjusts based on what's available.

4. SCORING SYSTEM

4.1 Components

  • Relevance (70%): How well the listing matches your search query
  • Exploration (15%): Thompson Sampling to discover high-quality listings
  • Temporal (15%): Time-based decay with boost multipliers

4.2 Search Modes

  • Hybrid Search: Combines semantic embeddings (70%) with text similarity (30%)
  • Text Search: Uses fuzzy text matching when embeddings aren't available

BASICALLY,

We score listings based on how relevant they are to your search (70%), plus we explore new listings (15%) and consider how fresh they are (15%). This helps you find what you want while discovering new items.

5. EXPLORATION MECHANISM

We use Thompson Sampling to balance showing proven popular items with exploring potentially great new listings:

  • Tracks impressions (how many times shown) and views (how many times clicked)
  • Uses Beta distribution to model click-through probability
  • Gives new listings a chance to prove themselves
  • Gradually learns which listings users prefer
  • Prevents popular items from dominating forever

BASICALLY,

We track which listings get clicked when shown. New listings get a fair chance to be displayed, and if people like them (click on them), they'll be shown more often.

6. FAIR ALLOCATION

6.1 Statistical Guarantee

The FA*IR algorithm provides a 90% confidence guarantee that each group receives its fair share of visibility using:

  • Binomial distribution modeling for group representation
  • M-table computation for minimum representation thresholds
  • Position-aware allocation to ensure diversity at all ranks

6.2 Dynamic Adjustment

  • Proportions adjust based on available inventory
  • Maintains quality by respecting relevance scores
  • Ensures fairness even with limited listings
  • Shows up to 500 listings when fair ranking is active

BASICALLY,

We use math to guarantee that each group (boosted, new, organic) gets their fair share of visibility across up to 500 listings.

7. BENEFITS

7.1 For Sellers

  • New sellers get immediate visibility
  • Established sellers maintain presence
  • Boosts provide guaranteed exposure
  • Quality listings naturally rise over time

7.2 For Buyers

  • Discover new and interesting products
  • Still see the most relevant results first
  • Experience diverse marketplace offerings
  • Find hidden gems from new sellers

BASICALLY,

Sellers get fair visibility regardless of when they joined or how popular they are. Buyers discover more variety while still finding what they're looking for. Everyone wins!

8. TRANSPARENCY

We believe in transparency about our ranking system:

  • This document explains our approach openly
  • Sellers can see their listing performance metrics
  • No hidden factors or secret sauce
  • Regular audits ensure the system works as intended
  • We welcome feedback to improve fairness

BASICALLY,

We're open about how our ranking works. There are no secret tricks - just math ensuring everyone gets a fair shot at being seen.

9. TECHNICAL DETAILS

For the technically inclined:

  • Algorithm: FA*IR (Fair Alternative Item Recommendation)
  • Confidence Level: α = 0.1 (90% confidence)
  • Time Windows: 48 hours for new/boost status
  • Decay Rates: 0.099/day (base), 0.347/day (boost)
  • Search: Cosine distance for embeddings, trigram similarity for text
  • Sampling: Seeded pseudo-random (refreshes hourly)
  • Maximum Results: 500 listings for fair ranking

BASICALLY,

These are the specific numbers and methods we use. The important thing is that they're carefully chosen to balance fairness with quality results.

Last Updated: January 28, 2025

Old search API