📊 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 systems to dynamically construct retrieval pipelines. This approach outperforms traditional search models in accuracy and cost-efficiency, though some claims require further validation.
Perplexity has unveiled Search as Code (SaC), a new framework that allows AI models to assemble custom search pipelines dynamically, marking a shift from traditional search methods. This development aims to improve accuracy and efficiency in complex, multi-step search tasks, positioning Perplexity as a leader in AI search innovation.
On June 1, 2026, Perplexity’s research team published a detailed proposal for Search as Code, arguing that conventional search systems are inadequate for agent-driven AI tasks requiring hundreds or thousands of retrieval operations per minute. SaC transforms the search stack into a set of composable primitives accessible via a Python SDK, enabling AI models to generate and execute code that orchestrates search, filtering, and ranking processes in real time.
Perplexity demonstrated SaC’s capabilities through a case study involving the identification of over 200 high-severity vulnerabilities (CVEs). The system achieved 100% accuracy while reducing token usage by 85%, significantly outperforming existing systems that scored under 25%. The approach involves a three-stage process: broad fan-out over vendor advisories, targeted refinement via language models, and a schema-bound verifier to ensure precision.
Benchmark results show SaC leading in four out of five tests, including WANDR, where it outperformed competitors by 2.5 times. The company reports that SaC’s cost-performance ratio surpasses other models, especially in low-reasoning configurations, indicating potential for scalable, cost-effective AI search solutions.
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 search pipeline 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.
Python SDK for search customization
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Control
This development signals a potential paradigm shift in AI search systems, emphasizing flexibility and control over retrieval pipelines. By enabling models to generate and execute tailored search code, SaC could dramatically improve accuracy and efficiency in complex tasks, impacting industries relying on large-scale information retrieval. However, the approach’s reliance on re-architected search stacks and the novelty of the methodology mean widespread adoption will depend on further validation and replication.
AI retrieval pipeline software
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search and AI Agent Capabilities
Traditional search systems were designed for human queries, returning static result sets. Recent advances, including Perplexity’s answer engine and similar efforts by other companies, have moved toward AI-optimized search. The concept of using code to orchestrate search routines was formalized earlier this year through research like the CodeAct paper (ICML 2024) and projects like Hugging Face’s smolagents. Anthropic also published similar ideas in late 2025, emphasizing the benefits of sandboxed, code-based tool execution for agents. Perplexity’s innovation lies in re-architecting its search stack into atomic primitives, a significant engineering effort that sets it apart from external API wrappers.
“Perplexity’s Search as Code represents a meaningful step toward giving AI models more control over retrieval processes, with promising results in accuracy and cost efficiency.”
— Thorsten Meyer, AI researcher
search as code development kit
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Independent Replication of Results
While Perplexity reports strong benchmark results, some claims—particularly the WANDR benchmark where SaC scores highest—are based on proprietary or self-designed tests that have not yet been independently verified. The comparison involving different models and the novelty of the benchmarks introduce questions about reproducibility and generalizability. Additionally, the broader industry has yet to adopt or validate the approach at scale, leaving some uncertainty about its practical impact.
Further Testing and Industry Adoption
Expect independent researchers and industry players to attempt replication of SaC’s results, especially on established benchmarks. Perplexity may also expand its testing to include more diverse tasks and datasets. Meanwhile, the company is likely to enhance its SDK and demonstrate real-world applications, potentially influencing the development of future AI search systems and agent architectures.
Key Questions
What is Search as Code (SaC)?
SaC is an approach where AI models generate and execute custom search pipelines by assembling composable primitives, allowing for more flexible and controlled retrieval processes.
How does SaC improve over traditional search methods?
It enables models to tailor search strategies dynamically, reducing token usage, increasing accuracy, and handling complex multi-step retrieval tasks more effectively.
Are these results confirmed and replicable?
While initial results are promising, some benchmarks are proprietary or self-designed. Independent validation and replication are needed to confirm SaC’s broad effectiveness.
Will SaC be adopted widely in the industry?
Industry adoption depends on further validation, ease of integration, and demonstrated benefits in real-world applications. It remains an emerging approach at this stage.
How is SaC related to previous research on code-based agents?
SaC builds on earlier work that formalized using code to orchestrate search and tool execution, but its engineering effort to re-architect the search stack is a novel contribution.
Source: ThorstenMeyerAI.com