Design a Citation and Source Attribution System
Last updated: September 4, 2025
Quick Overview
Given LLM-generated text, link specific sentences back to source documents with confidence scores. Handle deduplication, freshness decay, and domain authority weighting.
Perplexity
System Design
Software Engineer
Perplexity
September 4, 2025Software Engineer
System Design Round
System Design
Hard
10
4
2,731 solved
Given LLM-generated text, link specific sentences back to source documents with confidence scores. Handle deduplication, freshness decay, and domain authority weighting.
Citations are what differentiate Perplexity from ChatGPT. This tests the intersection of NLP and system design.
What the Interviewer Expects
- Design sentence-level attribution using NLI or attention-based methods
- Implement source deduplication and authority scoring
- Handle freshness decay for time-sensitive citations
- Design the UI rendering pipeline for inline citations
- Address confidence calibration for citation quality
Key Topics to Cover
Natural language inference
Source attribution
Domain authority
Citation rendering
Hallucination detection
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you handle cases where the LLM hallucinates a citation?
- What if multiple sources support the same claim?
- How do you evaluate citation quality at scale?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional Requirements:
- Citation Linking: For every sentence in the LLM-generated text, the system must identify and link to source documents with associated confidence scores.
- **Source...
Capacity Estimation
Assuming Perplexity serves approximately 1 million users daily, with an average of 5 queries per user, we estimate:
- Total Queries: 1 million users * 5 queries/user = 5 million queries/day.
- **...
Submit Your Answer
Markdown supported