📊 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 developed a new method called Search as Code (SaC), allowing AI agents to assemble retrieval pipelines dynamically. This approach shows promising results in accuracy and efficiency, but some claims require independent validation.
Perplexity has unveiled a new framework called Search as Code (SaC) that enables AI agents to assemble custom retrieval pipelines dynamically, addressing limitations of traditional search methods. This development aims to improve accuracy and control in complex, multi-step tasks, highlighting a significant shift in AI search architecture.
On June 1, 2026, Perplexity’s research team published details of SaC, proposing a fundamental change: instead of treating search as a fixed API that returns static results, they suggest exposing the search stack as modular primitives that an AI can assemble into tailored pipelines. This involves three layers: the model as the control plane, a sandbox for deterministic execution, and a primitive set called the Agentic Search SDK.
The core idea is that models can generate code to orchestrate retrieval, filtering, and ranking, rather than relying on monolithic endpoints. This approach allows for more flexible, precise control over search processes, especially for complex, multi-stage tasks.
Perplexity demonstrated SaC’s potential using a case study involving the identification and characterization of over 200 high-severity vulnerabilities. They reported 100% accuracy and an 85% reduction in token usage compared to traditional systems. In benchmark tests, SaC outperformed competitors on four out of five tests, including the new WANDR benchmark, where it achieved a 2.5× advantage. These results suggest that SaC can improve both the effectiveness and efficiency of AI-driven search.
However, some skepticism remains about the novelty and replicability of these claims, particularly since the most significant benchmark results are based on proprietary tests not yet independently verified. Differences in underlying models and the fact that the core idea—building retrieval pipelines via code—is not new, also temper the enthusiasm.
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
AI retrieval pipeline development tools
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.
search as code software
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Retrieval Control
This development could significantly enhance the ability of AI systems to perform complex, multi-step retrieval tasks with higher accuracy and efficiency. By allowing models to generate customized pipelines, SaC offers a way to overcome the rigidity of traditional search APIs, enabling more precise control and adaptability in real-time applications. If validated, this approach may influence future AI architectures, shifting the paradigm toward more modular, code-driven retrieval systems.
custom search engine API
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Architectures in AI
The concept of turning tools into code APIs for better AI control has been explored by multiple researchers over recent years. The formalization of this idea appeared in the ICML 2024 paper by Wang et al., which demonstrated that code-based orchestration yields higher success rates than fixed tool calls. Cloudflare and Hugging Face have also developed frameworks that leverage code execution for better agent performance.
Perplexity’s recent announcement builds on this trend, but the key innovation lies in re-architecting its entire search stack into atomic primitives, a move that requires significant engineering effort. While the idea is not entirely new, the implementation at this scale is notable and represents a potential leap forward in search system design.
“The core thesis of Search as Code is correct, but the framing may overstate how novel this approach truly is. Still, the engineering effort to re-architect search stacks into primitives is significant.”
— Thorsten Meyer, AI researcher
AI primitive set SDK
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Replication of Benchmark Results
Many of SaC’s most impressive results are based on proprietary benchmarks, such as WANDR, which have not yet been independently verified. The broader applicability and consistency of these findings remain to be confirmed through external testing and replication.
Additionally, differences in underlying models and the lack of a fully controlled comparison introduce uncertainties about the specific advantages of SaC over existing methods.
Independent Testing and Broader Adoption
Expect ongoing validation efforts from third-party researchers to verify SaC’s performance claims. Further development will likely focus on integrating SaC into broader AI systems, refining the framework, and exploring its application across diverse domains. Monitoring how industry and academia adopt and adapt this approach will be key to understanding its long-term impact.
Key Questions
How does Search as Code differ from traditional search methods?
SaC enables AI models to generate code that dynamically assembles retrieval pipelines, rather than relying on fixed, monolithic search APIs. This allows for more flexible, precise control over search processes.
Is SaC a completely new idea?
The concept of turning tools into code APIs for better AI control has been explored before, but Perplexity’s implementation of re-architecting its entire search stack into primitives is a significant engineering achievement. The core idea is not entirely new, but its application here is notable.
What are the potential limitations of SaC?
Current limitations include reliance on proprietary benchmarks, lack of independent validation, and possible challenges in scaling or generalizing the approach across different domains and models.
When will we see broader adoption of Search as Code?
Wider adoption depends on validation from third-party researchers, integration into existing AI systems, and demonstration of consistent performance improvements. It may take months to years for widespread integration.
Source: ThorstenMeyerAI.com