AI Interviews · Question

System design: design Perplexity Discover (reported as a title only).

System design question reported at Perplexity (2026). Sources, confidence and an answer card.

Researched · updated

eng-018 AI Engineer RAG & retrieval quality System design Low confidence
On this page

What they’re really asking

If you only remember one thing, say this in the first minute: “This isn’t an agent; it’s a scheduled content pipeline with one model call per story. Code pulls in articles, removes duplicates and groups articles about the same event into a story. One model call writes a summary of each story, citing its sources, and code checks the citations. A normal recommender ranks stories per user, and summaries are cached, because each one is written once and read by many. So cost grows with the number of stories, not the number of readers.”

The rest of this page explains each part of that answer.

Discover is Perplexity’s news feed. Coverage of its 2024 launch describes it as “tailored to individual user interests and languages” (AlternativeTo, 2024-09-16).

The question fits this family poorly: it is a content pipeline with AI summaries, not an agent. Saying so, and then designing the workflow, is itself the signal this family tests. The family’s core question is always the same: which steps are plain code, which are a single model call, and which need an agent?

What makes this different from a normal news feed

You may have built a feed before: ingest items, rank them per user, cache the results. All of that still applies.

The new part is the summary. A large language model (LLM) writes a short page about each story from several articles. That is useful, but a model can be confidently wrong: it can state something none of the sources say, or attribute a quote to the wrong outlet. This is called hallucination. In news, a wrong summary is a public mistake.

The other new part is cost. Each model call is billed by the token (roughly ¾ of a word), so you want to call the model as few times as possible. The key insight: a summary depends on the story, not on the reader. Write it once and serve it to everyone.

This question is reported only as a title on a login-gated aggregator (1point3acresaggregator), so the first move is to ask what is in scope.

Clarify first

  • What does an item contain? A headline, an AI-written summary, source links? Assume a summary page with cited sources per story.
  • Freshness? How fast must a breaking story appear? Assume within 30 minutes.
  • Personalization? Topics a user picks, or ranking from behavior? Assume both.
  • Scale? Assume millions of readers and a few thousand stories a day.
  • Who is accountable for a wrong summary? Assume editorial rules exist.

Say it like this: “Before I design anything, I’d say this isn’t really an agent problem. It’s a pipeline with one model step. Let me confirm what’s in scope.”

Answer

Words you need first

  • Embedding: a list of numbers that represents the meaning of a text. Two articles about the same event have embeddings that are close together, so you can detect near-duplicates by comparing them.
  • Cluster: a group of articles about the same event, which becomes one story.
  • Agent: a loop in which the model chooses its own next action. This design doesn’t need one, because every step is known in advance.

The pipeline

News sources and feeds
   │  (poll on a schedule)
   ▼
1. Ingest (code) ── parse, dedupe near-identical articles with embeddings
   │
   ▼
2. Cluster (code) ── group articles about the same event into a story; update as articles arrive
   │
   ▼
3. Summarize (one LLM call per story version) ── only from the cluster's articles, each sentence cited
   │   code: does every cited span exist in its source?
   ▼
4. Safety and quality (code + model) ── source allowlist, sensitive-topic classifier,
   │                                    article text treated as untrusted input
   ▼
5. Rank and personalize (classic recommender, no LLM) ── freshness, quality, user topics, engagement
   │
   ▼
6. Serve (edge cache) ── a summary is fixed per story version

It is a scheduled workflow with one LLM step per story, generated once and read by many.

  1. Ingest (code). Poll news sources and feeds on a schedule. Parse them. Remove near-identical articles using embeddings.
  2. Cluster (code). Group articles about the same event into a story. Update clusters as new articles arrive.
  3. Summarize (one LLM call per story, regenerated when the story changes materially). The summary is built only from the cluster’s articles, and each sentence cites a source. A check in code confirms the cited passages exist in the sources.
  4. Safety and quality (code plus model). A source allowlist, a classifier for topics that need extra care, and treating article text as untrusted input. An article can contain hidden instructions (“ignore your rules and…”), and a model may follow them. This is called prompt injection.
  5. Rank and personalize (a classic recommender). Score candidate stories by freshness and quality, then per user by topics and engagement. This part needs no LLM.
  6. Serve (cache). Summaries are fixed per story version, so they cache at the edge.

Say it like this: “Generation happens once per story version. Serving is a cache hit. So the model bill grows with stories, not readers.”

Follow one story

At 07:40 a large cloud provider has an outage (an illustrative example).

ClockWhat happensWhat to say in the interview
07:40The first 3 articles arrive. Embeddings show 2 are near-copies of one wire report; 1 is dropped.”Dedupe before you spend tokens.”
07:45The 2 articles form a new story cluster.”A story, not an article, is the unit of work.”
07:47Summary v1 is written, each sentence cited. One cited quote isn’t in its source, so that sentence is removed.”Citations are checked in code.”
07:50Ranked into feeds for users who follow cloud topics; served from cache.”Ranking is a normal recommender.”
09:3012 more articles arrive, including the provider’s statement. Summary v2 is written.”Regenerate only on a material change.”
all dayMillions of reads hit the cache.”Readers don’t create model calls.”

What it costs

At an assumed 3,000 stories a day, each summarized about 3 times as it develops, generation costs about $189 a day, however many people read it.

The arithmetic behind the numbers
  • Cost per day = stories × regenerations × tokens per summary call × price.
  • Assumed 3,000 stories × 3 regenerations = 9,000 calls. Each call: 8,000 input tokens at $2 per 1M plus 500 output tokens at $10 per 1M (Claude Sonnet 5 list price, fetched 2026-10-11) = $0.016 + $0.005 = $0.021.
  • 9,000 × $0.021 ≈ $189 a day, regardless of reader count.

How you evaluate it

Three kinds of check:

  • Faithfulness: does the summary say only what the sources say? Check it on a sample with an LLM judge (a second model call that grades the summary against the sources), plus human review.
  • Citation validity: does every cited passage exist and support its sentence?
  • Ranking metrics: click-through and time spent reading, per group of users.

Senior vs Staff

Discover-style feed

Senior

  • Designs ingest, clustering, cited summaries and ranking as a pipeline with one LLM step.

Staff

  • Separates generation cost (per story) from serving cost (per reader), owns the editorial and faithfulness policy, and treats source text as attacker-controlled.

In plain words: a Senior answer builds the pipeline. A Staff answer also sees that cost is set by stories rather than readers, owns the policy for what a wrong summary means, and treats every article as possibly hostile.

Small-team version

The small-company version is an internal digest. It summarizes the week’s customer tickets, competitor news or release notes for a team. It is a cron job, one model call per cluster, and a Slack post.

Build it in days. Spend the effort on the faithfulness check, and on what happens when a summary is wrong: who sees it, and how it gets corrected.

Pitfalls

  • Designing an autonomous agent for a fixed pipeline. Every step is known in advance, so an agent adds cost and failure points for no benefit.
  • Generating per reader instead of per story. The model bill then grows with millions of readers instead of thousands of stories.
  • Summaries without checkable citations. You can’t tell a faithful summary from a made-up one.
  • Trusting article text as instructions. Anyone who can publish an article could then steer your summaries.

Go deeper

Family

Agent or workflow? Designing multi-step LLM automation

Automate an internal process with LLMs: put each step in plain code, one model call or a capped agent loop, check what the model produces, run it so it survives restarts, and add more agents only when it pays.

Other questions in this family