📊 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 introduced Search as Code (SaC), allowing AI systems to build custom retrieval pipelines dynamically. This approach shows promising results in accuracy and cost, but independent validation and broader comparison are still needed.
On June 1, 2026, Perplexity’s research team unveiled a new approach called Search as Code (SaC), claiming it significantly improves AI search performance by enabling models to assemble custom retrieval pipelines dynamically, rather than relying on fixed search endpoints. This development aims to address limitations in traditional search systems, especially for complex, multi-step AI tasks. For more context on how search systems are evolving, see Search as Code: Perplexity Is Right About the Future — Just Not First to It.
The core innovation of SaC is to treat search components—retrieval, filtering, ranking, and rendering—as atomic primitives accessible via a Python SDK. The AI model acts as the control plane, generating code that orchestrates these primitives in real-time within a secure sandbox. This contrasts with conventional search APIs, which operate as monolithic, fixed pipelines, limiting flexibility for multi-step, high-volume retrieval tasks.
Perplexity demonstrated SaC’s capabilities through a case study involving 200+ high-severity CVEs. Their system achieved 100% accuracy while reducing token usage by 85%, outperforming other tested systems that scored below 25%. The approach involves a three-stage process: fan-out over vendor advisories, refinement via an LLM, and a schema-bound verifier to ensure precision. Benchmarks across multiple tests (DSQA, BrowseComp, WideSearch, WANDR, HLE) showed SaC leading in four out of five, with performance gains up to 2.5× over competitors.
However, some claims warrant caution. The most significant benchmark—WANDR—was internally developed by Perplexity, raising questions about independent validation. Additionally, the comparison models use different underlying models, complicating direct performance attribution. The conceptual basis of SaC is not entirely new; similar ideas have been proposed in academic papers and industry efforts over the past two years, emphasizing code-based tool integration for agents.
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

Upgraded Pipe Center Finder, Measure Pipe Diameter, Pipefitter Tools With Centering Head, Measure Pipe Diameter Over 0.5" & up With 4" Y-Type Base and Adjustable Dial Bubble Protractor
Effortlessly Find Pipe Centers:This tool is perfect for pipefitters and welders to set center lines, determine angles, locate…
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.
Python SDK for search components
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Retrieval Strategies
This development signals a shift towards more flexible, programmable search architectures that could enable AI systems to perform complex, multi-step retrieval tasks more accurately and efficiently. If validated externally, SaC could influence how future AI agents are designed, moving away from rigid search endpoints to dynamic, code-driven pipelines. It also underscores the importance of integrating code execution into AI workflows, potentially leading to more robust and adaptable systems.

PC-TECH Compatible with Windows 10 Professional 64 Bit USB With Key. Factory fresh, Recover, Repair and Restore. Key code and USB install Included. Fix PC, Laptop and Desktop. Free Technical Support
Fresh USB Install With Key code Included
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Background on Search and Agent Architectures
Traditional search systems treat retrieval as a simple query-response process, which sufficed for single-query tasks but falters in multi-step, high-volume scenarios. Recent academic and industry efforts have explored turning tool calls into executable code within AI workflows, with papers like ICML 2024’s CodeAct and Anthropic’s MCP highlighting the benefits of code-based tool integration. Perplexity’s innovation lies in re-architecting its search stack into composable primitives, a step beyond merely wrapping external APIs, aiming for more granular control and efficiency in search operations.
“Perplexity’s Search as Code demonstrates a meaningful evolution in how AI can dynamically assemble retrieval pipelines, but independent validation remains essential.”
— Thorsten Meyer, AI researcher

RAG-Driven Generative AI: Build custom retrieval augmented generation pipelines with LlamaIndex, Deep Lake, and Pinecone
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Broader Benchmark Confirmation Needed
While initial results are promising, independent replication of the benchmarks, especially the internally developed WANDR test, has not yet been reported. The performance comparison involves different underlying models, which complicates direct attribution of improvements solely to SaC. Additionally, the full impact of SaC on diverse real-world tasks remains to be seen, as broader testing and peer review are still pending.
Upcoming Validation and Industry Adoption Trials
External researchers and industry players are likely to attempt independent replication of Perplexity’s benchmarks. Further development of SaC’s tooling and integration into broader AI systems is expected, alongside potential collaborations for standardized testing. Monitoring how SaC performs in varied real-world applications will be critical to assessing its long-term impact on AI search strategies.
Key Questions
What is Search as Code (SaC)?
SaC is a framework where AI models generate and execute code to assemble customized search pipelines from modular primitives, enabling more flexible and precise retrieval operations.
How does SaC improve over traditional search methods?
It allows models to dynamically control retrieval, filtering, and ranking processes, reducing token usage and increasing accuracy in complex, multi-step tasks.
Has SaC been independently validated?
No, independent validation of the benchmarks, especially the internally developed ones, has not yet been reported. Caution is advised until further testing is completed.
Is this approach entirely new?
While the concept of turning tool calls into executable code is not new, Perplexity’s specific re-architecture of its search stack into composable primitives is a significant engineering advancement.
What are the potential risks or limitations?
The main concerns include reliance on internal benchmarks, model comparison inconsistencies, and untested performance in diverse real-world scenarios.
Source: ThorstenMeyerAI.com