📊 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 method called Search as Code (SaC), allowing AI systems to build custom retrieval pipelines dynamically. This approach outperforms traditional search methods in accuracy and cost-efficiency, though some claims require independent validation.
On June 1, 2026, Perplexity’s research team revealed a new approach called Search as Code (SaC), which fundamentally changes how AI systems perform search tasks. This development allows AI models to dynamically assemble retrieval pipelines in code, leading to significant improvements in accuracy and efficiency. The announcement signals a shift toward more flexible, programmable search architectures in the agent era, with potential implications for large-scale AI applications.
Perplexity’s SaC architecture replaces the traditional search paradigm—where a fixed pipeline returns a static result set—with a modular, programmable approach. It exposes retrieval, filtering, ranking, and rendering as atomic primitives within a Python SDK, which models can control and assemble in real-time. This enables AI agents to tailor search strategies to specific tasks, improving control and precision.
The company demonstrated SaC’s effectiveness through a case study focused on identifying and characterizing over 200 high-severity vulnerabilities (CVEs). The system achieved 100% accuracy while reducing token usage by 85%. In benchmark tests, SaC outperformed existing systems on multiple metrics, including a 2.5× improvement on the WANDR dataset, and led in four out of five tests. Cost-performance analysis showed even low-reasoning models benefited from the approach.
While the results are promising, some claims, such as the benchmarks and model comparisons, are based on internal or proprietary tests that have not yet been independently verified. The approach builds on prior work in code-based agent architectures, with similar ideas appearing in academic papers and industry implementations over the past two years.
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

50 AI Agents Every Developer Must Build: The Complete Guide to Building Scalable, Production-Ready Autonomous Systems with LangChain, LangGraph, and Python
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.

Pro Tools Perpetual License NEW 1-year software download with updates + support for a year
Full version, permanent License of Avid Pro Tools. Includes 1-Year of software updates and upgrades.
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
The introduction of SaC by Perplexity marks a significant step toward more flexible and controllable AI search systems. By enabling models to compose retrieval pipelines programmatically, this approach could lead to more accurate, cost-efficient, and adaptable AI agents capable of handling complex, multi-step tasks. It also signals a broader trend of moving from static, API-based search towards dynamic, code-driven retrieval architectures, potentially reshaping how AI systems interact with data sources and knowledge bases.
However, the approach’s novelty is partly an evolution of existing ideas, with similar concepts appearing in academic research and other industry projects. The real-world impact will depend on how widely and effectively this architecture is adopted and validated outside of Perplexity’s internal tests.
Python SDK for search customization
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Architectures in AI Development
The concept of using code to orchestrate AI tools and retrieval processes has been emerging over the past two years. Notably, the CodeAct paper (ICML 2024) formalized the idea that agents should generate executable code for their operations, leading to higher success rates. Similarly, in November 2025, Anthropic introduced MCP, which also advocates turning tools into sandboxed code APIs to reduce context load and improve scalability.
Perplexity’s recent innovation lies in re-architecting its search stack into atomic primitives, allowing models to directly control and customize retrieval pipelines dynamically. While the general idea is not entirely new, the engineering effort to rebuild the search stack into composable parts is notable and represents a practical advancement.
“Perplexity’s Search as Code approach fundamentally shifts how AI models interact with search systems, enabling dynamic, task-specific retrieval pipelines.”
— Thorsten Meyer, AI researcher
AI retrieval pipeline builder
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and External Verification of SaC Results
While Perplexity reports impressive benchmark results, some claims, such as the 2.5× performance gain on WANDR and the CVE case study, are based on internal tests and proprietary benchmarks. Independent verification and replication of these results are not yet available, raising questions about their generalizability and robustness. Additionally, comparisons involving different models and configurations introduce some uncertainty about the precise benefits attributable solely to SaC.
Upcoming Validation and Broader Adoption of Search as Code
Next steps include independent replication of Perplexity’s benchmark results, broader testing across diverse tasks, and potential integration into commercial AI products. The company may also publish detailed technical documentation and open-source components to facilitate wider adoption. Monitoring how the approach performs outside of controlled experiments will be crucial for assessing its long-term impact.
Key Questions
What is Search as Code (SaC)?
SaC is an architecture where AI models assemble retrieval, filtering, and ranking pipelines dynamically in code, enabling more flexible and precise search strategies.
How does SaC improve over traditional search methods?
It allows models to control and customize the search process in real-time, leading to higher accuracy, lower token usage, and better handling of complex tasks.
Are the benchmark results from Perplexity independently verified?
No, the results are based on internal tests and proprietary benchmarks. Independent validation is still pending.
Is this approach widely adopted yet?
No, it is a recent development announced by Perplexity, and broader industry adoption will depend on further validation and integration efforts.
Does SaC build on existing research?
Yes, similar ideas have been explored in academic papers and other industry projects over the past two years, but Perplexity’s engineering of its search stack is a notable advancement.
Source: ThorstenMeyerAI.com