Design a Real-Time AI Search Answer Engine

Last updated: September 4, 2025

Quick Overview

Build a system that answers questions about events that happened 30 minutes ago. Cover real-time web crawling, event detection, source prioritization, cache invalidation, and LLM integration.

Perplexity
System Design
Software Engineer
Perplexity
September 4, 2025
Software Engineer
System Design Round
System Design
Hard

12

4

3,567 solved


Build a system that answers questions about events that happened 30 minutes ago. Cover real-time web crawling, event detection, source prioritization, cache invalidation, and LLM integration.

This is the canonical Perplexity system design question. It tests the full stack of AI-powered search from crawling to generation.

What the Interviewer Expects
  • Design a real-time web crawling pipeline with freshness guarantees
  • Implement hybrid retrieval combining BM25 and dense embeddings
  • Address the freshness versus quality trade-off with concrete strategies
  • Design the LLM integration layer with streaming token delivery
  • Discuss cache invalidation for time-sensitive queries
Key Topics to Cover
Real-time web crawling
RAG pipeline architecture
Cache invalidation
LLM serving
Source freshness ranking
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 detect when a cached answer is stale?
  • What is your strategy for sources that are paywalled?
  • How do you handle contradictory sources?
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
Requirements

Functional Requirements

  1. Real-Time Web Crawling: Continuously crawl the web to detect events that happened within the last 30 minutes.
  2. Event Detection: Identify and extract relevant e...
Capacity Estimation

Assuming Perplexity expects to handle up to 1 million queries per day:

  • Peak Load: 12 queries per second.
  • Crawling Frequency: Let's assume we crawl 10,000 pages every minute to identify new...

Submit Your Answer
Markdown supported

Related Questions