📊 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 unveiled a new approach called Search as Code, allowing AI models to dynamically create and execute custom search pipelines. While the concept is promising and shows strong results in tests, it builds on prior work and faces questions about independent validation and model comparison consistency.
Perplexity has introduced a new framework called Search as Code (SaC), designed to enable AI systems to assemble custom retrieval pipelines dynamically. This development aims to overcome the limitations of traditional search methods, especially for AI agents executing complex, multi-step tasks. The announcement, made on June 1, 2026, highlights a significant shift in how search infrastructure can be leveraged for AI reasoning, emphasizing composability, control, and efficiency.
Perplexity’s Search as Code approach involves breaking down the search process into atomic, programmable primitives accessible via a Python SDK. This allows an AI model to generate code that orchestrates retrieval, filtering, ranking, and assembly of search results in a tailored manner, rather than relying on a monolithic search endpoint. The system is built around three core layers: the model as the control plane, a sandbox for deterministic execution, and the primitive set for search operations.
The company demonstrated SaC’s effectiveness through a case study targeting high-severity CVEs. The system achieved 100% accuracy while reducing token usage by 85%, significantly outperforming traditional systems that scored below 25%. In various benchmark tests, SaC led in four out of five metrics, tying with OpenAI on the fifth, and showed a 2.5× improvement on the WANDR benchmark. These results suggest that dynamically writing retrieval code can enhance both precision and efficiency in complex search tasks.
Perplexity emphasizes that SaC is not merely a wrapper around existing APIs but a re-architecture of the search stack into composable, executable parts. This allows models to fetch and process information more flexibly, filling gaps where traditional search syntax or fixed pipelines fall short. The approach leverages code as both an orchestrator and a gap-filler, enabling more nuanced control over retrieval strategies.
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 search 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.

Bendable Flexible Magnetic Pickup Tool, 24'' Four Claw Grabber Tool, Accurate Pick Up In Narrow Space for Engine Bay/Home Sink/Drain/Earring/Keys/Metal Objects (Magnetic orientation)
【Narrow Space Pickups Saviour】: SARDVISA grabber tool has an orientable tube body and four steel claws can be…
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Reasoning
The introduction of Search as Code signals a potential paradigm shift in AI search capabilities. By empowering models to generate and execute custom retrieval pipelines, it enhances their ability to handle complex, multi-step tasks with higher accuracy and efficiency. This approach could influence future AI systems, making them more adaptable and capable of nuanced reasoning based on dynamically assembled information streams. However, the novelty of SaC is partly built on prior concepts, and independent validation of the benchmarks remains pending, which tempers immediate claims of breakthrough.

National Geographic 4-Cylinder Engine Building Kit – 175+ Piece Working Model with Moving Parts, Clear Visible Engine Model, STEM Building Toy with Tools & Learning Guide for Kids
BUILD YOUR OWN ENGINE – Assemble a clear 4-cylinder engine model kit with 175+ durable pieces. A fun…
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search and Agent Technologies
Prior to this announcement, search in AI systems largely relied on fixed pipelines and tool call formats, which limited control and efficiency in multi-turn, complex tasks. The idea of writing executable code to orchestrate retrieval was formalized in recent research papers like ICML 2024’s CodeAct and Anthropic’s MCP framework, both advocating for turning tools into code APIs within sandboxes. Perplexity’s innovation is in re-architecting its own search stack into composable primitives, a move that requires significant engineering effort and is less easily replicated than external API wrappers. While the core concept of code-driven search is not new, applying it at this scale within a search stack is a noteworthy development.
“Perplexity’s approach to re-architecting search into composable primitives is a significant engineering achievement, though the conceptual groundwork has been laid by prior research.”
— Thorsten Meyer, AI researcher

Learning Motor Skills: From Algorithms to Robot Experiments (Springer Tracts in Advanced Robotics, 97)
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Benchmark Reliability Concerns
While the results presented are promising, several aspects remain uncertain. The benchmark where SaC showed the largest advantage, WANDR, was created by Perplexity and has not yet undergone independent replication. The comparison between models running on different architectures (GPT-5.5 versus Opus 4.7) complicates direct evaluation. Additionally, the approach builds on prior work that predates Perplexity’s announcement, raising questions about the novelty and independent validation of the claimed improvements. The true scalability and generalizability of SaC are still to be confirmed through external testing.
Independent Testing and Broader Adoption
Next steps include independent replication of the benchmark results, especially WANDR, and further evaluation of SaC’s performance across diverse tasks and models. Industry and academic groups will likely scrutinize the approach, testing its robustness and scalability outside Perplexity’s environment. Further research may explore integrating SaC principles into existing search stacks or developing open-source implementations to facilitate broader adoption. The evolution of agent architectures incorporating executable code for retrieval remains an active area of development.
Key Questions
How does Search as Code differ from traditional search methods?
Search as Code enables AI systems to generate and execute custom retrieval pipelines using programmable primitives, rather than relying on fixed, monolithic search endpoints. This allows more control, flexibility, and efficiency, especially for complex tasks.
Is Perplexity the first to propose executable code for search?
No, the concept has been explored in prior research such as ICML 2024’s CodeAct and Anthropic’s MCP. Perplexity’s contribution is in re-architecting its own search stack into composable, executable primitives.
What are the main limitations or uncertainties about SaC?
Key uncertainties include the lack of independent validation of benchmark results, the comparability of models on different architectures, and whether the approach scales effectively across diverse tasks and environments.
Will this approach be adopted widely in the industry?
It is too early to tell. Independent testing, further research, and practical implementation will determine if Search as Code becomes a standard in AI search and reasoning systems.
Source: ThorstenMeyerAI.com