📊 Full opportunity report: Search as Code: Perplexity Is Right About the Future — Just Not First to It on ThorstenMeyerAI.com — validation score, market gap, and execution plan.
TL;DR
Perplexity has announced a new approach called Search as Code (SaC), allowing AI systems to build custom search pipelines dynamically. Early case studies show promising accuracy and cost savings, but independent validation and broader benchmarks are still pending.
On June 1, 2026, Perplexity’s research team unveiled a new approach called Search as Code (SaC), claiming it significantly improves AI search performance for complex, multi-step tasks. This development is notable because it addresses fundamental limitations in traditional search methods used by AI agents, potentially transforming how retrieval systems are integrated into AI workflows.
Perplexity’s SaC framework reimagines search as a set of composable primitives—retrieval, filtering, ranking, and rendering—exposed via a Python SDK. Instead of a monolithic search endpoint, the model writes and executes code to assemble custom pipelines tailored to each task, enabling more control and flexibility. This approach is driven by the insight that models are already proficient at reasoning over context but lack the ability to dynamically steer how data is retrieved and processed.
Early results from a case study involving the identification of over 200 high-severity CVEs show 100% accuracy while reducing token usage by 85%, compared to less efficient systems. Perplexity reports that SaC outperforms existing benchmarks, leading on four out of five tests, and matching the best on a fifth. These tests include proprietary benchmarks like WANDR, which shows a 2.5× performance boost over competitors, indicating strong potential for SaC’s effectiveness in practical scenarios.
However, the approach is not without caveats. The benchmark where SaC shows the largest margin is internally developed by Perplexity and has not yet been independently validated. Additionally, the comparison involves different models—GPT-5.5 for SaC and OpenAI, and Opus 4.7 for Anthropic—making it difficult to isolate the architecture’s impact entirely. The idea of using code to orchestrate search is not entirely new; similar concepts have been explored in recent research and industry projects over the past two years, including work by ICML and Anthropic.
Search as Code
Perplexity says agents shouldn’t call a search engine — they should program one, composing atomic primitives into a bespoke pipeline in a sandbox. The thesis is right. It’s also the search-shaped version of an idea the field has been converging on since 2024.
Monolithic search

50 AI Agents Every Developer Must Build: The Complete Guide to Building Scalable, Production-Ready Autonomous Systems with LangChain, LangGraph, and Python
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Programmable primitives
Directionally right, genuinely engineered — the rebuilt-from-atoms search stack is the part rivals can’t cheaply copy. But it’s a strong execution of an industry-wide idea, validated mostly on benchmarks Perplexity ran itself. The moat is the infrastructure and the tuning loops, not the architecture.

Introdução à Programação com Python
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Agent Capabilities
This development suggests a shift toward more flexible, controllable search systems that can be tailored dynamically by AI models, potentially enabling more sophisticated and efficient agent behavior. If validated at scale, SaC could reduce costs, improve accuracy, and expand the range of tasks AI agents can perform autonomously. However, the reliance on proprietary benchmarks and the novelty of the architecture mean broader adoption and validation are still needed to confirm its long-term impact.

Protecting User Privacy in Web Search Utilization (Advances in Information Security, Privacy, and Ethics (Aispe) Book Series)
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search and AI Agent Architectures
The concept of treating search as a programmable API rather than a fixed endpoint has gained traction over the past two years. In 2024, the CodeAct framework demonstrated how models could write executable code to orchestrate search tools, leading to higher success rates. Similarly, Anthropic’s MCP approach, published in late 2025, emphasized turning tools into sandboxed code APIs to reduce context overhead and improve scalability. Perplexity’s SaC builds on these ideas but is distinguished by its re-architected, primitive-level search stack, making it more adaptable and potentially more efficient.
While the core idea is not entirely new, Perplexity claims to have engineered a novel, modular search stack that allows models to reach into and control search operations directly, rather than relying solely on external API calls or fixed pipelines. This represents a significant engineering effort that, if adopted broadly, could influence future AI system design.
“Perplexity’s Search as Code approach is a meaningful step toward more flexible, agent-centric search systems, but its true impact depends on independent validation and real-world deployment.”
— Thorsten Meyer, AI researcher

Indexing-First Search Systems: Architecture, Trust and AI Retrieval
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Broader Adoption Still Pending
While early results are promising, independent replication of the benchmarks, especially proprietary ones like WANDR, has not yet occurred. The comparison involves different models with varying architectures, making it difficult to isolate the impact of SaC itself. Additionally, the long-term scalability, security, and integration challenges remain to be tested in real-world applications.
Independent Testing and Real-World Deployment Expected
Further validation from third-party researchers and broader industry testing are anticipated in the coming months. Perplexity is likely to release more detailed benchmarks and open-source components to facilitate external evaluation. Meanwhile, early adopters may experiment with SaC in pilot projects to assess its practical benefits and limitations, shaping its future evolution.
Key Questions
What is Search as Code (SaC)?
SaC is an approach where search operations are exposed as programmable primitives that AI models can assemble and execute dynamically, rather than relying on fixed search endpoints.
How does SaC improve AI search performance?
By allowing models to write custom retrieval pipelines, SaC enables more precise control, reduces token usage, and improves accuracy in complex tasks like vulnerability analysis.
Is SaC widely adopted yet?
No, it is still in early testing stages. Independent validation and broader industry adoption are expected in the coming months.
How does SaC relate to previous work on code-driven tools?
SaC builds on recent research and industry efforts that use code to orchestrate search and tools, but it uniquely re-architects the search stack into atomic primitives for greater control.
What are the main risks or challenges with SaC?
Validation of benchmark results, security considerations in executing dynamically generated code, and integration into existing systems remain key challenges.
Source: ThorstenMeyerAI.com