Design Ranking of Web Sources for Grounded Answers in ChatGPT Search
Last updated: November 29, 2026
Quick Overview
Design the retrieval and ranking stack that, for a user question in ChatGPT search, selects which web pages and passages to feed the model so the answer is accurate, fresh and properly cited.
OpenAI
November 29, 20260
0
0 solved
Design the retrieval and ranking stack that, for a user question in ChatGPT search, selects which web pages and passages to feed the model so the answer is accurate, fresh and properly cited.
ChatGPT search answers with citations, so answer quality depends heavily on which passages the model sees. The interviewer wants to see a multi-stage retrieval and ranking pipeline tuned for answer quality rather than clicks, with freshness, source quality and latency trade-offs.
What the Interviewer Expects
- Rewrite the conversational question into one or more search queries
- Use multi-stage retrieval: search backend, page fetch, passage extraction, neural re-ranking
- Optimize for answer support (does the passage contain the evidence) instead of click-through
- Incorporate freshness, source authority and diversity
- Fit the whole pipeline in a tight latency budget before generation
- Evaluate with human-graded and model-graded answer quality plus citation accuracy
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How do you get training labels for passage usefulness?
- How do you handle a breaking news query where the index is minutes old?
- How do you prevent SEO spam or prompt-injection pages from being cited?
- How many passages should go into the context, and how do you decide?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
- Input: a conversational turn, possibly relying on context ("what about their pricing?").
- Output: 8 to 20 passages with URLs passed to the model; the answer cites them.
- Latency budget for retriev...
High-Level Design
- Query rewriter (small LLM): resolve context into standalone queries, produce 1 to 3 variants, and classify freshness need and intent.
- Retrieval: web search backends (own index and partne...