Scaling an AI-Powered Search and Research Assistant from Prototype to Production

perplexity_ai · Tech · 2023 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: AI-powered search and research assistant

Perplexity needed to turn LLM-backed search from an internal Slack bot into a production research assistant that could answer live questions, cite sources, iterate quickly, and control cost and latency.

Constraints:

Architecture

Perplexity began as an internal Slack bot for company-building and enterprise-search questions, then added Bing search and summarization to answer live questions. The product evolved into a search/research assistant that orchestrates live search indices, LLMs, citation ranking, conversational context, generative UI clarification, fine-tuned GPT-3.5, file upload, and custom Llama inference infrastructure.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["User research interface"] --> B["Search orchestration layer"]
  A --> F["Generative UI clarifier"]
  B --> C["Live search index"]
  C --> G["Citation ranking layer"]
  G --> B
  B --> D["LLM answer generator"]
  D --> E["Fine-tuned GPT-3.5 Copilot model"]
  E --> F
  D --> H["Custom Llama inference stack"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
User research interface Web, Slack, Discord, and Copilot surfaces where users ask research questions. Search orchestration layer, Generative UI clarifier
Search orchestration layer Coordinates live search, source selection, LLM prompts, citation rendering, and conversational state. Live search index, LLM answer generator, Citation ranking layer
Live search index Search source, initially including Bing, used to answer current questions. Search orchestration layer, Citation ranking layer
LLM answer generator Generates grounded answers from selected search/file context. Fine-tuned GPT-3.5 Copilot model, Custom Llama inference stack
Fine-tuned GPT-3.5 Copilot model Lower-cost, lower-latency model tuned to approximate GPT-4-like Copilot behavior. Generative UI clarifier, LLM answer generator
Generative UI clarifier Dynamically asks multiple-choice or single-choice clarifying questions for research workflows. User research interface, Fine-tuned GPT-3.5 Copilot model
Citation ranking layer Selects and scores sources so answers are backed by relevant links. Search orchestration layer, Live search index
Custom Llama inference stack Self-served Llama infrastructure optimized for tokens per second and time to first token. LLM answer generator

Data flow

User questions enter the assistant, which retrieves live search results or file context, ranks and selects sources, asks clarifying questions for Copilot when needed, sends grounded context to an LLM or fine-tuned model, renders an answer with citations, and feeds user/product observations back into iteration on models, ranking, and inference latency.

3 supporting quotes
“you need to plug it into a search index and and then my co-founder Dennis is our CTO like he's just like casually says I added some Bing search and summarization”transcript, stated
“orchestrating different components search index llm conversational rendering the answer multimodal it's not easy it takes a lot of work”transcript, stated
“comes back to you as some clarifying questions and then like gives you the answer”transcript, stated

Why this architecture

Perplexity's central claim is that useful AI search requires orchestration: models must be grounded in real data, citations must match answers, UI must adapt to research tasks, and inference must be fast enough for consumer use.

3 supporting quotes
“you need to get plug into real data uh or else you can't trust the answer of uh chatbot that's just the language model”transcript, stated
“it's very important it's very easy to like say oh yeah we connected to all these plugins we connected to all these apis data providers”transcript, stated
“devil is in the details”transcript, stated

Models used: GPT-3.5 · fine-tuned GPT-3.5 · GPT-4 · Llama · Claude 2

Scale

Alternatives considered (roads not taken)

Pure chatbot without live search

Rejected because: Answers cannot be trusted for live or data-grounded questions without a search index.

“or else you can't trust the answer of uh chatbot that's just the language model so you need to plug it into a search index”transcript, stated

Fully autonomous AutoGPT-style agent

Rejected because: The team believed autonomy was not ready and designed Copilot to work with the user through clarifying questions.

“our thesis was that like autonomy is not like there yet we still want like these agents to work along with us”transcript, stated

Use GPT-4 for Copilot by default

Rejected because: Fine-tuned GPT-3.5 gave much better speed and user experience while approaching GPT-4 perceived quality.

“GPD 3.5 is much faster and just directly just gets to the core point”transcript, stated

Rely only on provider-hosted models

Rejected because: The team wanted custom inference control and launched self-served Llama models with best-in-class latency claims.

“we are trying to serve our own models too and with that in mind we first launched uh llama models as part of perplexity Labs”transcript, stated

Patterns

rag-retrieval (retrieval)

Perplexity grounds LLM answers in live search indexes and files rather than relying on model memory.

“I added some Bing search and summarization and then um we were able to ask like real live questions”transcript, stated

tool-use-orchestration (agent-architecture)

The product orchestrates search, LLMs, citations, file upload, generative UI, and custom inference infrastructure.

“orchestrating different components search index llm conversational rendering the answer multimodal it's not easy it takes a lot of work”transcript, stated

fine-tuning-adaptation (model-ops)

Perplexity fine-tuned GPT-3.5 to make Copilot faster and cheaper while keeping quality close to GPT-4.

“we made it even faster recently with open AIS gbd 3.5 fine tuning API”transcript, stated

latency-optimization (optimization)

The team optimized model choice and custom Llama serving around throughput, latency, and time to first token.

“the volume of search requests we serve every day makes a ton of difference to us and it also in terms of speed you can see the throughput here and the latency here”transcript, stated

human-in-the-loop-gate (agent-architecture)

Copilot asks clarifying questions and works with users instead of attempting full autonomy.

“we still want like these agents to work along with us so we designed a product that way”transcript, stated

Tradeoffs

Copilot interaction model

Chose clarifying-question generative UI over fully autonomous AutoGPT-style behavior.

Rationale: The team judged full autonomy immature and chose a companion workflow that works with the user.

“autonomy is not like there yet we still want like these agents to work along with us”transcript, stated

Copilot model optimization

Chose fine-tuned GPT-3.5 over default GPT-4 for every Copilot request.

Rationale: Fine-tuned GPT-3.5 improved speed and directness while users usually could not tell it apart from GPT-4.

“80 of the time the user is unable to say like which model is which and eight percent it's like they think the fine-tuned model is better”transcript, stated

Product strategy versus incumbents

Chose keep iterating on platform, flywheel, and infrastructure over assuming a large incumbent launch ended the market.

Rationale: The team believed better product iteration would compound despite Microsoft/Bing pressure.

“it's not just about one launch you got to keep on iterating and keep on improving and users will eventually realize like the better product”transcript, stated

Gotchas (what bit them)

LLMs alone cannot answer live factual questions reliably.

Root cause: A language model needs real data and current search context.

Resolution: Add Bing/live search and summarization, then build orchestration around search plus LLMs.

“you need to get plug into real data uh or else you can't trust the answer of uh chatbot that's just the language model”transcript, stated

Latency made early answers feel broken.

Root cause: Initial answer generation took seven or eight seconds.

Resolution: Iterate on product and inference until the experience became almost instantaneous.

“the latency was so bad it was like it would take seven seconds or eight seconds to get the answer and now if you use our product it's like almost instantaneous”transcript, stated

API/plugin demos can fail at inference time.

Root cause: Announcing connections to APIs or data providers is easier than orchestrating the correct call reliably.

Resolution: Treat orchestration and citation quality as core product engineering work.

“when you try it like it does something unreliable at inference time right so that's why like we are being more careful here”transcript, stated

Evaluation

Perplexity compared user preference for fine-tuned models, monitored speed/throughput/latency, and referenced external evaluations on perceived utility and citation F1.

Metrics: user indistinguishability between fine-tuned GPT-3.5 and GPT-4 · throughput · latency · time to first token · perceived utility · citation F1

“one is perceived utility and the other is the citation F1 score F1 score is just a weighted average of precision and recall”transcript, stated
“we publish our metrics and like you can actually see the tokens per second time to First token everything”transcript, stated

Outcomes

The case emphasizes rapid company/product timelines, high daily search-request volume, and latency-sensitive consumer use on mobile and weak networks.

“we incorporated on August 3rd uh and then like on September 27th we had this slack bot”transcript, stated
“the volume of search requests we serve every day makes a ton of difference to us”transcript, stated