graph TD Q[User query] --> C[Query classification] C --> R[Multi-source retrieval] R --> B[Custom search + Brave + Bing] B --> D[Deduplication + reranking] D --> S[LLM synthesis] S --> A[Inline numbered citations] A --> U[User reads or asks follow-up] U --> Q
The pipeline:
- Query classification. The system decides whether the query needs web retrieval, academic sources, or a direct model answer.
- Retrieval. Perplexity queries multiple backends (its own index, Brave Search, Bing) and collects candidate URLs with snippets.
- Reranking. Candidates are deduplicated and reranked by relevance to the query intent.
- Synthesis. The LLM composes an answer constrained to the retrieved passages, inserting citation markers [1], [2], ... as it writes.
- Attribution. Each marker maps to a
search_resultsitem with URL, title, and snippet. The user can click to verify.