Design Learned Web Search Ranking
Learn query-to-link relevance from historical clicks while separating weak feedback, candidate coverage and safe online ranking.
Problem statement
An interview report asks for an ML system that chooses links for a search query from observations containing user_id, timestamp, search_query and the links the user clicked.
For this exercise, assume an English search service over an existing link corpus with document titles and text and a query-based candidate retrieval dependency. Design the query-to-link learning and serving system, not a web crawler.
Historical records contain clicks but no complete displayed-result lists; do not assume that an unclicked link was shown. You may add future impression instrumentation and a small human-judged relevance set. Return up to 20 relevant links, with a useful query-only path for new users.
Mandatory per-user personalization, advertisements and generated answers are outside scope. For this exercise, assume training uses permitted records, event-time features and reproducible model versions.
A ranker or feature outage may reduce ranking quality but must still produce query-relevant results or an explicit unavailable response.
What to build
- Return up to 20 relevant links for a query from the supplied corpus, with bounded candidate retrieval and useful cold-start behavior.
- Use permitted historical clicks and future instrumented impressions to improve query-to-link ranking, without treating unobserved links as known rejected results.
- Evaluate query relevance reproducibly, release compatible model/features safely, and support query-relevant degraded search or explicit unavailability.
At scale
- For this exercise, assume 10 million corpus links, one million queries per day and 1000 queries per second at peak. Queries are at most 200 characters; retrieval returns at most 100 candidates for ranking.
- For this exercise, assume a 500 ms p95 search target, with bounded work and timeouts across candidate retrieval, features and inference.
- For this exercise, assume daily training releases, 30 days of permitted feedback retention, event-time replay for training, and a small human-judged query/link relevance set spanning common and rare queries.