📊 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 systems to dynamically build search pipelines. While promising, some claims rely on proprietary benchmarks and are not yet independently verified.
Perplexity has introduced a new approach called Search as Code (SaC), claiming it can significantly improve AI search capabilities by allowing models to assemble custom retrieval pipelines in real-time. This development could reshape how AI agents perform complex, multi-step retrieval tasks, making them more adaptable and precise, which is why it matters for the future of AI-assisted search and automation.
On June 1, 2026, Perplexity’s research team published a paper detailing Search as Code, a method that re-architects the search stack into composable, atomic primitives accessible via a Python SDK. Unlike traditional search, which treats retrieval as a fixed, monolithic process, SaC exposes retrieval, filtering, ranking, and rendering as building blocks that models can manipulate directly through generated code.
According to Perplexity, this approach allows AI models to dynamically tailor search pipelines to each task, leading to higher accuracy and efficiency. Their case study on identifying high-severity vulnerabilities reported 100% accuracy while reducing token usage by 85%, compared to less flexible systems. Benchmark tests further suggest SaC outperforms existing solutions on multiple metrics, including the WANDR benchmark where it achieved 2.5 times better results than competitors.
However, some skepticism remains. The most significant benchmark where SaC excels, WANDR, was developed internally by Perplexity and has not been independently validated. Additionally, the comparison involves different models, with some running on GPT-5.5 and others on different versions, complicating direct comparisons. Critics note that the core idea of using code to orchestrate search is not new, citing prior work like the CodeAct framework and recent publications by Anthropic, which have demonstrated similar principles.
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.
programmable search engine API
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Potential Impact on AI Search and Retrieval
This development could significantly enhance the flexibility and scalability of AI search systems, enabling models to perform complex, multi-step retrieval tasks with higher accuracy and lower cost. If validated independently, SaC could influence the design of future AI agents, making them more adaptable and capable of handling real-world, large-scale information retrieval challenges. However, the reliance on proprietary benchmarks and the conceptual overlap with prior work suggest that broader validation is necessary before widespread adoption.
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 Agents
Traditional search methods treat retrieval as a fixed pipeline, which becomes inefficient when AI agents need to execute numerous, complex queries during multi-hour tasks. Prior efforts, including OpenAI’s answer engines and Anthropic’s MCP, have explored turning tools into executable code within sandbox environments to improve scalability and control. The idea that models should generate code to orchestrate search and retrieval was formalized in recent research like the ICML 2024 CodeAct paper, emphasizing the advantages of code-based over tool-call formats. Perplexity’s innovation lies in re-architecting its entire search stack into atomic primitives, a significant engineering achievement that enables more granular control.
“Perplexity’s Search as Code represents a meaningful step toward more flexible, programmable AI retrieval systems, but its claims should be independently verified.”
— Thorsten Meyer, AI researcher
AI retrieval pipeline tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Independent Replication Needed
Many of the benchmark results, including the prominent WANDR test, have not been independently verified. The comparisons involve different models and proprietary datasets, raising questions about generalizability. Additionally, some claims about novelty overlap with prior research, and the full impact of SaC remains to be seen as more testing and validation are conducted by third parties.
Broader Validation and Adoption of Search as Code
Expect independent researchers and industry players to attempt replication of Perplexity’s benchmarks and evaluate SaC in diverse real-world scenarios. Further development may include extending the approach to other search domains and integrating it into broader AI systems. Continued scrutiny and validation will determine whether SaC becomes a standard in AI search architecture or remains a promising but niche innovation.
Key Questions
What is Search as Code and how does it differ from traditional search?
Search as Code (SaC) is an approach where AI models generate and execute code to assemble custom retrieval pipelines dynamically, as opposed to using fixed, monolithic search APIs. This allows more flexible, task-specific search strategies.
Has Perplexity’s SaC been independently validated?
No, most of the benchmark results and claims are proprietary, and independent validation is still pending. Caution is advised until third-party testing confirms the findings.
How does SaC compare to prior work on code-driven retrieval?
The concept of using code to orchestrate search is not new; prior frameworks like CodeAct and recent research by Anthropic have demonstrated similar ideas. Perplexity’s contribution is in re-architecting its search stack into atomic primitives, which is a significant engineering step.
What are the potential benefits of SaC for AI applications?
If validated, SaC could enable more accurate, efficient, and adaptable AI search systems capable of handling complex multi-step retrieval tasks at scale.
What are the next steps for this technology?
Independent researchers will likely attempt to replicate results, evaluate performance in diverse settings, and explore integration into broader AI systems. Validation will determine its adoption in the field.
Source: ThorstenMeyerAI.com