📊 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 announced a new method called Search as Code, allowing AI systems to dynamically build search pipelines in code. Early results show significant improvements, but some claims require further validation. This could reshape AI search strategies.
Perplexity has unveiled a new approach called Search as Code (SaC), which transforms how AI systems perform search tasks by enabling models to assemble custom retrieval pipelines dynamically. This development aims to address limitations in traditional search methods, especially for complex, multi-step AI agent workflows. The announcement highlights potential improvements in accuracy and efficiency, positioning SaC as a significant evolution in AI search technology.
Perplexity’s research team published their findings on June 1, 2026, proposing SaC as a solution to the rigidity of conventional search systems. Instead of treating search as a static API that returns a fixed set of results, SaC exposes the search stack’s core components—retrieval, ranking, filtering, and rendering—as modular primitives accessible via a Python SDK. This allows AI models to generate and execute code that customizes search pipelines on the fly, tailored to specific tasks.
The core architecture involves three layers: the model as the control mechanism generating code, a sandbox environment for deterministic execution, and the primitive set of search components. This setup enables models to fine-tune search processes, fill gaps with code, and improve control over retrieval strategies. A case study on identifying over 200 high-severity vulnerabilities demonstrated SaC’s potential, achieving 100% accuracy while reducing token usage by 85%, compared to less efficient traditional systems.
On benchmark tests, Perplexity reports SaC outperforming or tying with leading systems in four out of five tests, including DSQA, BrowseComp, WideSearch, and WANDR, with notable speed and cost benefits. These results suggest that SaC can deliver higher precision at lower operational costs, especially in complex search scenarios.
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 development kit
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.
Potential Impact of Search as Code on AI Search Strategies
This development matters because it could significantly improve the efficiency and accuracy of AI systems performing complex search tasks. By enabling models to generate tailored search pipelines, SaC addresses control limitations inherent in traditional search APIs, making AI agents more adaptable and capable of handling multi-step, high-stakes retrieval operations.
While the approach shows promising results, its adoption could lead to more sophisticated AI applications, including better security analysis, data retrieval, and decision-making processes. However, the claims are based on proprietary benchmarks, and independent validation is still pending, which tempers immediate adoption and highlights the importance of further testing.
AI retrieval and ranking tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Techniques in AI and Recent Innovations
The concept of using code to orchestrate AI tool interactions is not entirely new. The idea was formalized in the 2024 ICML paper on CodeAct, which demonstrated that models performing code execution outperform those relying solely on tool calls. Similarly, in late 2025, Anthropic published work on loading tools into sandboxed code environments, reducing context size and improving scalability.
Perplexity’s innovation lies in re-architecting its search stack into atomic primitives, enabling more flexible, code-based control over search processes. While the core idea of turning tools into executable code is established, the specific application to search pipelines marks a notable engineering achievement, though the conceptual foundation predates the company’s announcement.
“Perplexity’s Search as Code represents a meaningful step toward more controllable and efficient AI search systems.”
— Thorsten Meyer, AI researcher
modular search engine components
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Independent Replication of SaC Results
While Perplexity reports impressive benchmark results, these are based on proprietary tests and internal benchmarks such as WANDR, which has not yet been independently validated. The performance gains, especially in the WANDR benchmark, require replication by third parties to confirm their robustness and generalizability. Additionally, the comparison involves different models and configurations, making it difficult to isolate the effect of SaC definitively.
Further uncertainties include the scalability of SaC in real-world, large-scale deployments and its compatibility with other AI frameworks. The company has acknowledged some limitations, such as the use of single runs rather than multiple trials, and the need for broader testing remains.
Next Steps for Validation and Broader Adoption of SaC
Expect independent researchers and industry labs to attempt replicating Perplexity’s benchmark results, especially WANDR, in the coming months. Perplexity is likely to release more detailed technical documentation and open-source components to facilitate external validation. Adoption in real-world applications will depend on further testing, integration with existing AI systems, and demonstration of scalability at enterprise levels.
Additionally, competitors and collaborators may explore similar code-based search architectures, which could accelerate innovation in this space. The broader AI community will be watching whether SaC’s promising early results translate into widespread, practical improvements in AI search capabilities.
Key Questions
What is Search as Code (SaC)?
SaC is an approach where AI models generate and execute code to assemble custom search pipelines dynamically, rather than relying on fixed search APIs. This allows for greater control and efficiency in complex retrieval tasks.
Are the benchmark results from Perplexity independently verified?
No, the results are based on Perplexity’s internal tests and proprietary benchmarks like WANDR. Independent validation is still pending, so the performance claims should be viewed cautiously.
How does SaC differ from previous code-based AI tool approaches?
While the idea of turning tools into executable code is not new, SaC specifically re-architects the search stack into modular primitives, enabling models to build tailored retrieval pipelines in real-time, which is a novel application in this context.
What are the main limitations or uncertainties around SaC?
The main uncertainties involve validation, scalability, and real-world deployment. The current results are promising but require independent testing to confirm robustness and generalizability.
What will happen next in the development of Search as Code?
Expect further independent testing, detailed technical disclosures from Perplexity, and potential adoption in larger-scale AI applications. The field may also see similar innovations inspired by SaC’s approach.
Source: ThorstenMeyerAI.com