Photon: Building a retrieval and ranking engine from scratch
Blog post from Perplexity
Perplexity developed Photon, an in-house Rust-based retrieval and ranking engine, to replace an adapted open-source system that became costly, slow at the tail, and difficult to recover or scale as its index grew. Photon uses compact inverted indexes and per-document “docblob” records, selective decoding, batched cache-aware asynchronous disk reads, and separate index-building and query-serving infrastructure to reduce I/O, improve resource use, and avoid disruptions during updates. Its architecture routes queries through brokers and shard groups for retrieval and multi-stage ranking, while independently built, versioned indexes are warmed with real query logs and deployed gradually. After staged testing and migration, Photon reduced production p99 retrieval-and-ranking latency from roughly 800 ms to 65 ms, eliminated prior index-update latency spikes, used about 20% fewer serving machines, and stored about 2.5 times more data per document. Photon also underpins Perplexity’s new fast Search API preset, which reports 160 ms p50 and 230 ms p95 single-search latency and, across six agentic benchmarks, achieved comparable aggregate task quality to the default preset at an estimated 68% lower total model-and-search cost, although it sacrifices some relevance, answer availability, and broad-search quality for speed-sensitive workflows.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Cost per task | 2 | 130 | 68 | 32 | +103% |
| Vector Search | 1 | 1,674 | 383 | 126 | -30% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.