Design a Retrieval-Grounded Local Sports News Recommender
MicrosoftMachine Learning Engineer · HR ScreenLast updated
This question tests the ability to design an end-to-end RAG system for news, focusing on temporal data relevance, hybrid retrieval strategies, and mitigation of LLM hallucinations.
System Design: Local Sports News Recommender
Design a system that provides personalized, summarized sports news updates for a user's local city. The system must ingest various real-time sports feeds (RSS, social media, local news APIs), generate summaries, and present them in a mobile feed.
Requirements
- Data Ingestion: Handle high-velocity incoming sports articles while filtering for location-specific relevance.
- Retrieval Engine: Propose a hybrid retrieval approach that balances keyword-based search (for specific team names or player entities) and dense vector search (for semantic intent).
- Summarization: Use an LLM to synthesize multiple sources into a coherent local brief. Include provenance (linking back to sources).
- Hallucination Mitigation: Implement mechanisms to ensure the summary is strictly grounded in the retrieved documents.
- Personalization: Rank the news based on a user's stated team preferences and historical reading behavior.
Scale Assumptions
- 10,000+ local news sources.
- Peak traffic: 50,000 requests per minute during major sporting events.
- Latency target: Under 500ms for retrieval; under 3 seconds for generated summaries.
Key Deliverables
- Sketch the high-level architecture: ingestion, indexing, retrieval, and generation stages.
- Define the data model for articles and user profiles.
- Propose an evaluation strategy for both retrieval accuracy and generation quality (hallucinations).
- Discuss how to handle 'stale' news during live games and how to degrade the system gracefully if the LLM inference service is overloaded.
Hints
Hint 1
Consider how to represent 'local' metadata in your vector embeddings to ensure geographical relevance during the retrieval phase.
Hint 2
For hallucination checks, investigate NLI (Natural Language Inference) models or self-consistency loops to compare the summary against the source snippets.
Hint 3
Think about using a multi-tiered caching strategy (e.g., pre-computed summaries for breaking news) to handle high-traffic spikes.
Follow-up questions
- How would you handle a situation where two major news sources provide conflicting scores or facts about a game?
- If you move from a batch-processing ingestion pipeline to a streaming architecture (e.g., using Kafka), what changes in your system design?
- How would you implement 'freshness' as a primary signal in your ranking function without completely suppressing relevant older stories?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.