📊 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 agents to assemble retrieval pipelines dynamically. This approach shows promising results in accuracy and efficiency, but some claims require independent validation.

Perplexity has unveiled a new framework called Search as Code (SaC) that enables AI agents to assemble custom retrieval pipelines dynamically, addressing limitations of traditional search methods. This development aims to improve accuracy and control in complex, multi-step tasks, highlighting a significant shift in AI search architecture.

On June 1, 2026, Perplexity’s research team published details of SaC, proposing a fundamental change: instead of treating search as a fixed API that returns static results, they suggest exposing the search stack as modular primitives that an AI can assemble into tailored pipelines. This involves three layers: the model as the control plane, a sandbox for deterministic execution, and a primitive set called the Agentic Search SDK.

The core idea is that models can generate code to orchestrate retrieval, filtering, and ranking, rather than relying on monolithic endpoints. This approach allows for more flexible, precise control over search processes, especially for complex, multi-stage tasks.

Perplexity demonstrated SaC’s potential using a case study involving the identification and characterization of over 200 high-severity vulnerabilities. They reported 100% accuracy and an 85% reduction in token usage compared to traditional systems. In benchmark tests, SaC outperformed competitors on four out of five tests, including the new WANDR benchmark, where it achieved a 2.5× advantage. These results suggest that SaC can improve both the effectiveness and efficiency of AI-driven search.

However, some skepticism remains about the novelty and replicability of these claims, particularly since the most significant benchmark results are based on proprietary tests not yet independently verified. Differences in underlying models and the fact that the core idea—building retrieval pipelines via code—is not new, also temper the enthusiasm.

At a glance
reportWhen: announced June 1, 2026, implementation…
The developmentPerplexity announced on June 1, 2026, the release of Search as Code, a novel framework that transforms how AI systems perform search and retrieval tasks.
Search as Code — Perplexity SaC, in context
■ The old contract
One fixed pipeline. The model tweaks query params and consumes whatever comes back — through the context window, every time.
model → query(params)
engine → fixed pipeline
return → full result set
repeat ×N serial round-trips
⚠ every intermediate result routed through model context
▲ Search as Code
Amazon

AI retrieval pipeline development tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Programmable primitives

The model writes code that orchestrates atomic search ops — fan-out, dedupe, verify — keeping bulk data out of the token stream.
sdk.search.web_many(queries)
filter()
dedupe()
sdk.llm.extract_many(schema)
verified records
✓ only the useful tokens reach the model
100%
CVE case-study accuracy (SaC run)
−85%
Token use vs baseline 288.7K → 42.9K
<25%
Score for the rival systems tested
2.5×
SaC lead on Perplexity’s own WANDR bench
A convergent idea, not a cold start
“Let the model write code instead of emitting tool calls” has been building for two years. SaC is the search-specific instantiation.
2024
CodeAct
Wang et al. · ICML
2024–25
smolagents
Hugging Face
2025
Code Mode
Cloudflare
Nov 2025
Code exec + MCP
Anthropic
Jun 2026
Search as Code
Perplexity
The take

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.

Sources: Perplexity Research, “Rethinking Search as Code Generation” (Jun 1 2026); CodeAct (Wang et al., ICML 2024); HF smolagents; Cloudflare Code Mode; Anthropic “Code execution with MCP” (Nov 2025). Figures as reported by Perplexity.
thorstenmeyerai.com
Amazon

search as code software

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 could significantly enhance the ability of AI systems to perform complex, multi-step retrieval tasks with higher accuracy and efficiency. By allowing models to generate customized pipelines, SaC offers a way to overcome the rigidity of traditional search APIs, enabling more precise control and adaptability in real-time applications. If validated, this approach may influence future AI architectures, shifting the paradigm toward more modular, code-driven retrieval systems.

Amazon

custom search engine API

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Evolution of Search Architectures in AI

The concept of turning tools into code APIs for better AI control has been explored by multiple researchers over recent years. The formalization of this idea appeared in the ICML 2024 paper by Wang et al., which demonstrated that code-based orchestration yields higher success rates than fixed tool calls. Cloudflare and Hugging Face have also developed frameworks that leverage code execution for better agent performance.

Perplexity’s recent announcement builds on this trend, but the key innovation lies in re-architecting its entire search stack into atomic primitives, a move that requires significant engineering effort. While the idea is not entirely new, the implementation at this scale is notable and represents a potential leap forward in search system design.

“The core thesis of Search as Code is correct, but the framing may overstate how novel this approach truly is. Still, the engineering effort to re-architect search stacks into primitives is significant.”

— Thorsten Meyer, AI researcher

Amazon

AI primitive set SDK

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Validation and Replication of Benchmark Results

Many of SaC’s most impressive results are based on proprietary benchmarks, such as WANDR, which have not yet been independently verified. The broader applicability and consistency of these findings remain to be confirmed through external testing and replication.

Additionally, differences in underlying models and the lack of a fully controlled comparison introduce uncertainties about the specific advantages of SaC over existing methods.

Independent Testing and Broader Adoption

Expect ongoing validation efforts from third-party researchers to verify SaC’s performance claims. Further development will likely focus on integrating SaC into broader AI systems, refining the framework, and exploring its application across diverse domains. Monitoring how industry and academia adopt and adapt this approach will be key to understanding its long-term impact.

Key Questions

How does Search as Code differ from traditional search methods?

SaC enables AI models to generate code that dynamically assembles retrieval pipelines, rather than relying on fixed, monolithic search APIs. This allows for more flexible, precise control over search processes.

Is SaC a completely new idea?

The concept of turning tools into code APIs for better AI control has been explored before, but Perplexity’s implementation of re-architecting its entire search stack into primitives is a significant engineering achievement. The core idea is not entirely new, but its application here is notable.

What are the potential limitations of SaC?

Current limitations include reliance on proprietary benchmarks, lack of independent validation, and possible challenges in scaling or generalizing the approach across different domains and models.

When will we see broader adoption of Search as Code?

Wider adoption depends on validation from third-party researchers, integration into existing AI systems, and demonstration of consistent performance improvements. It may take months to years for widespread integration.

Source: ThorstenMeyerAI.com

You May Also Like

Build vs Buy a Prebuilt AI Workstation

Exploring the advantages and disadvantages of building versus buying prebuilt AI workstations in 2026, with insights on costs, speed, and control.

The 27% Problem: Why Google Wrote a $750M Check to Catch Anthropic

Google commits $750 million to boost enterprise AI dominance, aiming to surpass Anthropic’s 40% market share amid shifting industry dynamics.

Some Reasons Why Google Had Such A Bad Day

Google faced multiple challenges today, including technical issues and negative publicity, impacting its services and reputation. Here’s what is known now.

The United Kingdom: The Pragmatist’s Hedge

Analyzing the UK’s flexible, moderate policy approach after Brexit, focusing on welfare, labor, and AI regulation, and its implications for the future.