📊 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, allowing AI models to generate and execute custom retrieval programs. This method significantly improves accuracy and reduces token usage, marking a notable advance in AI search capabilities.
Perplexity has introduced Search as Code (SaC), a new architecture that enables AI models to assemble custom retrieval pipelines on the fly, marking a significant shift from traditional search methods. This development aims to improve accuracy and control in AI-driven search, especially for complex multi-step tasks.
On June 1, 2026, Perplexity’s research team published a detailed explanation of SaC, which reimagines search not as a fixed endpoint but as a set of composable primitives that an AI can orchestrate through generated code. This approach allows models to control retrieval, filtering, and ranking processes dynamically, rather than relying on a monolithic search API.
The core innovation involves exposing the search stack as atomic, programmable components accessible via a Python SDK. The model acts as the control plane, generating code that directs retrieval and filtering in a sandboxed environment, enabling more precise and adaptable search strategies.
Perplexity demonstrated SaC’s effectiveness with a case study on identifying high-severity vulnerabilities (CVEs), achieving 100% accuracy while reducing token usage by 85%, outperforming other systems that scored below 25%. Benchmarks across multiple tests showed SaC leading in four out of five, with notable improvements in efficiency and cost-effectiveness.
While the results are promising, some skepticism remains. The most significant performance gains are reported on a proprietary benchmark (WANDR), which has not been independently validated. Additionally, the comparison involves different models and configurations, complicating direct attribution of improvements solely to SaC. The concept of programmable retrieval pipelines is not entirely new, having been explored in prior academic and industrial research.
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 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 Retrieval Control
This development signals a potential paradigm shift in how AI systems perform search tasks. By enabling models to generate and execute custom retrieval code, SaC offers increased flexibility, precision, and efficiency, especially for complex or multi-step queries. This approach could improve the performance of AI agents in applications ranging from cybersecurity to research automation, reducing reliance on static APIs and enhancing control over information gathering.
However, the approach also raises questions about implementation complexity, standardization, and how quickly other organizations can adopt similar architectures. The ability to build such programmable search pipelines could influence the future design of AI tools and platforms, emphasizing modularity and code-based control.
advanced search engine APIs
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Architectures in AI Development
Traditional search engines and AI-optimized search systems have historically relied on fixed pipelines that accept a query and return a static set of results. This approach sufficed when AI models performed single, isolated queries, but it becomes inefficient for multi-step, autonomous tasks requiring hundreds or thousands of retrieval operations per minute.
In recent years, researchers and companies have explored more flexible architectures. Notably, the CodeAct paper (ICML 2024) formalized the idea that agents should act by writing executable code rather than just calling tool APIs, leading to higher success rates and more adaptable behavior. Similarly, Anthropic’s 2025 research demonstrated the benefits of turning tools into sandboxed code APIs, reducing context size and increasing control.
Perplexity’s SaC builds on these ideas by re-architecting its search stack into atomic primitives, enabling models to generate tailored retrieval programs. While the approach is not entirely novel, the engineering effort to modularize and expose the search process as programmable components is significant and distinguishes it from previous attempts.
“Search as Code represents a meaningful evolution in AI retrieval strategies, offering unprecedented control and efficiency.”
— Thorsten Meyer, AI researcher
AI retrieval pipeline software
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Broader Adoption of Search as Code
While initial results are promising, independent validation of SaC’s benchmarks, especially the proprietary WANDR test, remains pending. The comparative advantage when using different models and configurations introduces uncertainty about the exact contribution of SaC itself. Additionally, the approach builds on prior concepts, and its scalability and ease of adoption across the industry are still unproven.
Further testing and peer review are needed to confirm the robustness and generalizability of these findings.
Next Steps for Industry Adoption and Validation
Perplexity plans to publish more detailed benchmark results and seeks independent verification of SaC’s performance. Industry observers anticipate that other AI developers will experiment with programmable retrieval pipelines, potentially leading to broader adoption if results are confirmed. Additionally, efforts to standardize such architectures could emerge, influencing future search and retrieval frameworks in AI systems.
Monitoring how SaC performs in real-world applications and whether it can be integrated into larger AI ecosystems will be crucial in the coming months.
Key Questions
What is Search as Code (SaC)?
SaC is an architecture that allows AI models to generate and execute custom retrieval pipelines through programmable primitives, enabling more precise and adaptable search processes.
How does SaC improve over traditional search methods?
SaC offers increased control, efficiency, and accuracy by allowing models to orchestrate search steps dynamically, reducing token usage and enabling multi-stage, tailored retrieval strategies.
Is this approach entirely new?
While the concept of programmable retrieval pipelines has been explored previously, Perplexity’s implementation of re-architecting its search stack into atomic primitives is a significant engineering achievement and a notable advancement in this area.
Will other companies adopt Search as Code?
Industry adoption depends on validation of SaC’s performance and ease of integration. If results are confirmed, it is likely that similar architectures will be explored by other AI developers.
What are the main uncertainties remaining?
Independent verification of benchmark results, scalability across different models, and industry-wide adoption are still uncertain at this stage.
Source: ThorstenMeyerAI.com