📊 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 dynamically generate and execute retrieval pipelines. This innovation aims to improve accuracy and control in search for AI agents. For related insights, see Search as Code: Perplexity Is Right About the Future. The development is based on their recent research and product release, but broader validation and independent testing are still pending.
Perplexity has unveiled Search as Code (SaC), a new approach that allows AI models to dynamically construct and execute custom retrieval pipelines. Learn more about Search as Code. This development addresses longstanding limitations in traditional search methods, especially for AI agents executing complex, multi-step tasks. The move signals a significant shift toward more flexible, controllable, and precise search mechanisms powered by AI. You might also be interested in code search tools like Semble.
On June 1, 2026, Perplexity’s research team published a detailed analysis and product update demonstrating how their new Search as Code framework improves search accuracy and efficiency. Unlike conventional search APIs that treat retrieval as a fixed, monolithic process, SaC exposes the core components—retrieval, filtering, ranking, and assembly—as atomic primitives within a Python SDK. This enables AI models to generate code that orchestrates these components in real-time, tailored to each specific task.
The core innovation is that models act as the control plane, writing code that orchestrates the search stack in a sandbox environment. This design allows for flexible, multi-stage retrieval strategies, including parallel fetches, regex filtering, and schema validation, which were difficult or impossible to implement with traditional fixed pipelines. Their case study focused on identifying and characterizing over 200 high-severity CVEs, achieving 100% accuracy while reducing token usage by 85%, compared to less flexible systems.
Perplexity reports that SaC outperforms existing systems on four of five benchmark tests, including DSQA, BrowseComp, WideSearch, and their proprietary WANDR benchmark, tying with OpenAI on one. The benchmarks suggest that SaC delivers higher success rates at lower costs, especially in complex reasoning tasks. The approach is built on the premise that code, being a language models are extensively trained on, can serve as a more effective medium for orchestrating search workflows than predefined tool calls or API endpoints.
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

Agentic AI Builder Blueprint 2026: Build Practical AI Agents, RAG Apps, MCP Workflows, Automation Systems, Evaluation Pipelines, and Production-Ready LLM Tools Step by Step
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.

FOXWELL NT301 OBD2 Scanner Live Data Professional Mechanic OBDII Diagnostic Code Reader Tool for Check Engine Light
【Read Fault Codes】About the read code funtion needs to be in the ignition on state and if the…
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 indicates a potential paradigm shift in how AI systems handle search and information retrieval. By enabling models to generate and execute custom code, SaC offers finer control, adaptability, and efficiency, which are critical for complex, multi-step AI tasks. If validated at scale, this approach could influence the design of future AI agent architectures, making them more autonomous and capable of nuanced information gathering.
However, the innovation also raises questions about reproducibility and independent validation, as some of the benchmark results are based on proprietary or self-designed tests. The broader AI community will need to verify these claims through replication and real-world deployment to assess the true impact of Search as Code.
retrieval pipeline automation software
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Methods in AI Agents
Traditional search systems have relied on fixed pipelines that accept a query and return a set of results, a model inherited from the human era of information retrieval. With the rise of AI agents capable of multi-step reasoning, these static methods have proven insufficient for complex tasks requiring dynamic, context-aware search strategies.
In recent years, research has explored turning search into a programmable API, with frameworks like CodeAct (ICML 2024) and Cloudflare’s Code Mode demonstrating that code-based orchestration improves success rates. Similarly, Anthropic’s MCP (2025) showed that turning tools into sandboxed code APIs reduces context overhead and enhances control. Perplexity’s SaC builds on these ideas by re-architecting its search stack into composable primitives, a move that they claim provides a significant engineering advantage and greater flexibility.
“Search as Code fundamentally transforms how AI models interact with retrieval systems, enabling unprecedented control and precision.”
— Thorsten Meyer, Perplexity Research Lead
AI model retrieval framework
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Reproducibility of SaC Results
It is not yet clear whether the impressive benchmark results will hold up in independent testing or real-world deployments. The key benchmarks, including WANDR, are proprietary or self-authored, and some results are based on single runs rather than multiple trials. The comparison between different models and configurations also leaves some ambiguity about the true performance gains attributable solely to SaC.
Further validation by third-party researchers and broader testing across diverse tasks are needed to confirm the robustness and generalizability of SaC’s approach.
Next Steps in Adoption and External Testing
Perplexity is expected to release more detailed documentation and possibly open-source components of SaC for community testing. External researchers and industry players will likely attempt to replicate the results and explore integrating SaC into their own systems. Future updates may include scaling tests, real-world applications, and broader benchmark comparisons to establish the approach’s efficacy and limitations.
Additionally, the AI community will watch for independent validation, potential standardization of code-based search frameworks, and how SaC influences the design of next-generation AI agents.
Key Questions
What is Search as Code (SaC)?
Search as Code is a framework that allows AI models to generate and execute custom search pipelines by writing code, enabling more flexible and controlled retrieval processes.
How does SaC improve over traditional search methods?
SaC exposes search components as primitives that models can orchestrate dynamically, improving accuracy, reducing token usage, and allowing complex multi-step retrieval strategies.
Are the benchmark results from Perplexity independently verified?
No, the results are based on internal or proprietary benchmarks. Independent validation and real-world testing are still needed to confirm performance claims.
Will SaC be available for external developers?
Perplexity has not yet announced open-sourcing SaC, but future releases and documentation are expected to facilitate external testing and integration.
What are the potential limitations of Search as Code?
Potential challenges include verifying the robustness of generated code, managing security in sandbox environments, and ensuring consistent performance across diverse tasks and models.
Source: ThorstenMeyerAI.com