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, 2025
Software 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
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. 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 Problems
Sample Answer
Attribution Pipeline

After generation, decompose the LLM output into individual claims (sentence or clause level). For each claim, run NLI against the retrieved passages t...

Source Ranking

Rank cited sources by: domain authority (based on a pre-computed domain reputation index), content freshness (publication date with exponential decay)...


Submit Your Answer
Markdown supported

Related Questions