📊 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 create tailored retrieval pipelines. This method aims to improve accuracy and control in search-based AI tasks. While promising, some claims require further independent validation.
Perplexity has introduced a new architecture called Search as Code (SaC), which transforms how AI systems perform retrieval tasks. This development aims to address limitations in traditional search methods by enabling models to assemble custom retrieval pipelines dynamically, improving accuracy and control for complex AI tasks. The announcement highlights a significant shift in search technology, emphasizing the importance of flexible, code-driven retrieval strategies for AI agents.
On June 1, 2026, Perplexity’s research team published a detailed proposal for Search as Code (SaC), a new approach to AI search that moves away from fixed, monolithic search endpoints. Instead, SaC exposes the components of the search process—retrieval, filtering, ranking, and assembly—as atomic primitives within a Python SDK. This allows AI models to generate and execute code that constructs tailored retrieval pipelines on the fly, providing greater control and adaptability.
The core idea is that traditional search systems, which accept a query and return a static set of results, are inadequate for AI agents executing multi-step, high-frequency retrieval tasks. SaC addresses this by enabling models to orchestrate search operations dynamically, improving efficiency and precision. Perplexity demonstrated this approach through a case study involving the identification of over 200 high-severity vulnerabilities, achieving 100% accuracy while reducing token usage by 85%. These results suggest significant improvements in retrieval performance and cost-efficiency compared to existing systems.
While the announcement claims that SaC outperforms previous benchmarks and offers a new standard for AI search, some aspects remain unverified. For example, the most significant performance gains are reported on a proprietary benchmark called WANDR, which has not yet been independently validated. Additionally, comparisons involve different models and configurations, complicating direct attribution of improvements solely to SaC. Critics note that the idea of using code for AI-driven retrieval is not entirely new, citing prior work such as the CodeAct framework and recent publications by other organizations.
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
Python SDK for AI retrieval pipelines
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.
AI search pipeline development tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Retrieval Control
The introduction of Search as Code represents a meaningful evolution in how AI systems perform search tasks. By enabling models to generate executable code that constructs custom retrieval pipelines, this approach offers enhanced control, flexibility, and potential for higher accuracy in complex tasks. For AI developers and organizations, SaC could lead to more efficient, cost-effective retrieval systems capable of handling multi-step, high-volume operations. However, the full impact depends on independent validation of the benchmarks and the adoption of this architecture in broader contexts.
custom search engine development kit
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Architectures and Prior Work
Traditional search systems have relied on fixed pipelines that accept a query and return a static set of results, a model inherited from the human information era. Recent innovations, including AI-optimized search engines like Perplexity’s 2022 answer engine, have improved relevance but still operate within rigid frameworks. The concept of using code to orchestrate retrieval processes has been explored before, notably in the 2024 ICML paper CodeAct and by organizations like Hugging Face and Cloudflare, which developed frameworks for executing search operations via code. In November 2025, Anthropic published work on high-performance tool integration through sandboxed code execution, echoing the principles behind SaC. Perplexity’s contribution lies in re-architecting its own search stack into atomic primitives, a technical achievement that allows deeper customization and control for AI agents.
“Perplexity’s Search as Code approach is a significant step toward giving AI models the ability to dynamically assemble retrieval pipelines, which could revolutionize high-scale AI tasks.”
— Thorsten Meyer, AI researcher
AI retrieval system components
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Unverified Claims and Need for Independent Validation
While Perplexity reports impressive results, including 100% accuracy on a proprietary CVE benchmark and leading scores on several tests, these findings are based on internal experiments and specific benchmarks not yet independently verified. The most significant performance gains are on WANDR, a benchmark created by Perplexity, which has not been published or validated externally. Additionally, comparisons involve different models and configurations, raising questions about the direct impact of SaC. Critics also point out that the core concept of using code for AI retrieval has been explored previously, and the novelty of Perplexity’s approach may be overstated.
Independent Testing and Broader Adoption of SaC
Next steps include independent replication of Perplexity’s benchmarks and broader testing of SaC across different models and applications. Open-source implementations or third-party evaluations will be crucial for validating the claimed performance improvements. Additionally, industry adoption will depend on how easily SaC can be integrated into existing AI workflows and whether its benefits outweigh the development effort involved. Perplexity is expected to release more technical details and possibly open-source components to facilitate external validation and adoption in the coming months.
Key Questions
What is Search as Code (SaC)?
Search as Code is an approach where AI models generate and execute code to construct custom retrieval pipelines, replacing static search endpoints with dynamic, programmable search processes.
How does SaC improve AI search performance?
SaC allows models to assemble tailored, multi-stage retrieval programs that can adapt to complex tasks, increasing accuracy and efficiency while reducing token usage and costs.
Is SaC a completely new idea?
No, the concept of using code to orchestrate AI tool and search operations has been explored before, notably in recent research and frameworks like CodeAct and by organizations such as Cloudflare and Anthropic.
What are the main uncertainties about SaC?
Key uncertainties include the independent validation of reported benchmarks, the generalizability of results beyond proprietary tests, and how easily SaC can be adopted in different AI systems.
When will we see broader adoption of SaC?
Broader adoption depends on external validation, technical integration efforts, and whether the demonstrated benefits justify the development and deployment costs. This is expected to unfold over the coming months.
Source: ThorstenMeyerAI.com