📊 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 developed a new approach called Search as Code, allowing AI systems to create custom retrieval pipelines via code, leading to significant improvements in accuracy and token efficiency. The development builds on prior research, but its practical deployment and benchmarks are still under evaluation.
Perplexity has unveiled Search as Code (SaC), a novel framework that allows AI models to dynamically assemble and execute custom search pipelines by writing code in real-time. This development aims to address the limitations of traditional search systems, especially in multi-step, agent-based tasks, and is now being shipped as part of Perplexity’s offerings.
On June 1, 2026, Perplexity’s research team announced the release of Search as Code, which transforms the way AI systems handle search operations. Instead of relying on fixed search endpoints that accept queries and return static results, SaC exposes the search stack’s components—retrieval, filtering, ranking, and rendering—as atomic, programmable primitives accessible via a Python SDK.
This architecture enables AI models to generate and execute code that orchestrates search processes tailored to specific tasks, allowing for greater control and adaptability. The approach was demonstrated through a case study involving the identification and characterization of over 200 high-severity vulnerabilities. The results showed 100% accuracy and an 85% reduction in token usage compared to traditional systems, with the model writing multi-stage retrieval programs instead of repeatedly calling a single API endpoint.
Perplexity reports that SaC outperforms existing systems on multiple benchmarks, including WANDR, where it achieved a 2.5× improvement over rivals. The system’s design incorporates a three-layer setup: the model as the control plane, a sandbox for execution, and the primitive set of search components. This architecture emphasizes that code is not only orchestrator but also a gap-filler, enabling precise and efficient 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.
AI search pipeline tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications of Search as Code for AI Search Strategies
This development signals a shift toward more flexible, controllable, and efficient AI search systems, especially for complex, multi-step tasks performed by autonomous agents. By enabling models to assemble custom retrieval pipelines, SaC may significantly improve accuracy and reduce operational costs, setting a new standard for AI-driven search architectures.
While the results are promising, the approach’s adoption depends on independent validation of benchmarks, understanding its scalability, and assessing how broadly it can be integrated into existing AI workflows. The concept aligns with prior research advocating code-based tool integration, but Perplexity’s engineering effort to re-architect its search stack is a notable advance.
custom search engine software
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Traditional search systems treat search as a fixed pipeline, which limits flexibility in multi-step, agent-based AI tasks. The idea of using code to orchestrate search processes is not new; prior research, such as the ICML 2024 CodeAct paper, demonstrated that models trained on code outperform those using predefined tool calls. Similarly, Anthropic’s 2025 work on code execution with MCP argued that turning tools into code APIs reduces context overhead and improves performance.
Perplexity’s innovation lies in re-architecting its search stack into atomic primitives, enabling models to write and execute tailored retrieval programs dynamically. This approach builds on the broader trend of integrating code execution into AI workflows, but its specific implementation for search pipelines is a recent and practical evolution.
“Search as Code represents a meaningful step toward more controllable and efficient AI search systems, leveraging code to orchestrate retrieval processes dynamically.”
— Thorsten Meyer, AI researcher
search as code development kit
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Unverified Aspects and Benchmark Reliability
Several aspects of the development remain unconfirmed or uncertain. The most significant is that the benchmark where SaC achieved the largest margin, WANDR, was internally developed by Perplexity, raising questions about independent validation. The results on pre-existing benchmarks are more credible, but the overall generalizability and scalability of SaC are still unproven. Additionally, the comparison involves different models and configurations, which complicates direct attribution of performance gains solely to the SaC architecture.
It is also unclear how well SaC will perform in real-world, large-scale deployments, or how it compares when integrated with other models or systems outside Perplexity’s environment. The long-term operational stability and cost implications are still under assessment.
Next Steps for Validation and Adoption of SaC
Further independent testing and replication of benchmarks like WANDR are needed to confirm SaC’s advantages. Perplexity is expected to publish more detailed results and possibly open-source components of their system, which will facilitate broader evaluation. Industry observers will monitor how quickly other AI providers adopt similar architectures or incorporate code-based search orchestration. Additionally, real-world pilot deployments and scalability tests will determine how practical and impactful SaC can be in commercial AI applications.
Key Questions
What is Search as Code and why is it important?
Search as Code is an approach that enables AI models to generate and execute custom search pipelines by writing code, rather than relying on fixed search endpoints. It allows for more flexible, precise, and efficient retrieval strategies, especially in complex, multi-step tasks performed by autonomous agents.
Has Perplexity proven that Search as Code works in real-world applications?
Perplexity has demonstrated promising results through internal benchmarks and a case study on vulnerability analysis, but independent validation and real-world deployment data are still pending. Its broader effectiveness remains to be confirmed.
How does Search as Code compare to previous AI retrieval methods?
Unlike traditional fixed pipelines or tool-call formats, SaC allows models to write tailored, multi-stage retrieval programs, leading to higher accuracy and token efficiency. It builds on prior research but offers a new, re-architected system for search operations.
What are the main limitations or uncertainties around SaC?
The biggest uncertainties involve the independence and reproducibility of benchmark results, the system’s scalability in large deployments, and how well it generalizes beyond controlled test cases. Further validation is needed.
What happens next for Perplexity’s Search as Code development?
Perplexity is expected to publish more detailed results, open-source components, and conduct real-world tests to validate SaC’s performance. Industry adoption and independent replication will shape its future impact.
Source: ThorstenMeyerAI.com