Rethinking Search as Code Generation
3 hours ago
- #Code Generation
- #AI Search
- #Agentic Systems
- Search is evolving from monolithic services to programmable primitives to meet AI agents' needs for fresh, accurate knowledge.
- Traditional search pipelines are outdated for AI agents, which require flexible, task-specific retrieval strategies and can invoke thousands of operations quickly.
- Perplexity's Search as Code (SaC) architecture exposes search stack components as SDK primitives, allowing models to assemble custom pipelines via code generation in secure sandboxes.
- SaC addresses rigidity in traditional search, such as coarse context, failure to leverage domain knowledge, and inefficient control flow, by giving models fine-grained control.
- The architecture consists of models as the control plane, compute sandboxes for execution, and an Agentic Search SDK with atomized search primitives.
- Evaluation shows SaC outperforms other systems on benchmarks like DSQA, BrowseComp, WideSearch, and WANDR, with significant cost-performance advantages.
- SaC represents a hybrid computing architecture combining token-space reasoning with deterministic runtimes, enhancing efficiency and capability in AI-driven tasks.