📊 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 launched a new approach called Search as Code (SaC), allowing AI systems to build custom retrieval pipelines. While promising, the concept is not entirely new, and some claims require independent validation. This development could reshape how AI handles complex search tasks.

Perplexity has introduced a new framework called Search as Code (SaC), asserting it can dramatically improve AI search capabilities by allowing models to assemble custom retrieval pipelines on the fly. This approach aims to address limitations in traditional search methods, especially for complex, multi-step tasks, making it a significant development in AI search technology.

Perplexity’s SaC framework exposes the components of the search stack—retrieval, ranking, filtering, and rendering—as atomic, composable primitives accessible via a Python SDK. The AI model acts as the control plane, generating code that orchestrates these primitives within a secure sandbox environment. This design enables the model to tailor search pipelines dynamically, rather than relying on fixed, monolithic search endpoints.

In a case study focused on identifying and characterizing over 200 high-severity vulnerabilities, SaC achieved 100% accuracy while reducing token usage by 85%, outperforming other systems that scored below 25%. The system’s strategy involved multi-stage retrieval, refinement, and verification, demonstrating the potential for bespoke, efficient search pipelines. Broader benchmark tests showed SaC leading on four out of five tests, with significant performance gains over previous systems, including a 2.5× improvement on the WANDR benchmark.

However, the approach is not entirely novel; similar ideas have been explored in recent research, such as the CodeAct framework (ICML 2024) and Anthropic’s MCP (November 2025). Critics note that some of the benchmarks used to demonstrate SaC’s superiority are proprietary or self-created, warranting independent validation before widespread adoption.

At a glance
updateWhen: announced June 1, 2026
The developmentOn June 1, 2026, Perplexity announced its new Search as Code framework, claiming significant improvements in search accuracy and efficiency by enabling AI models to assemble search pipelines dynamically.
Search as Code — Perplexity SaC, in context
AI Dispatch · Infrastructure

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.

■ 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 search 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

Python SDK for search primitives

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Implications for AI Search and Retrieval Strategies

The introduction of Search as Code represents a shift toward more flexible, programmable search architectures, enabling AI models to control and customize retrieval processes. If validated at scale, this could lead to more accurate, efficient, and adaptable AI systems, especially for complex, multi-step tasks that current monolithic search APIs struggle with. The approach also highlights a broader trend of integrating code execution into AI workflows, potentially transforming how AI agents interact with information sources.

Nonetheless, the claims’ reliance on proprietary benchmarks and the overlap with existing research suggest that the full impact remains uncertain until further independent testing confirms the results. Still, this development underscores the importance of rethinking traditional search paradigms in the era of autonomous AI agents.

Amazon

AI retrieval and ranking software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Evolution of Search and Agent Technologies

Traditional search systems have relied on fixed pipelines designed for human queries, which are ill-suited for AI agents executing complex, multi-step tasks. The concept of treating search as a programmable API or code-based tool has been explored in recent research, such as the CodeAct framework (ICML 2024) and Anthropic’s MCP (November 2025).

Perplexity’s recent announcement builds on this trend by re-architecting its search stack into atomic primitives, allowing models to generate and execute custom retrieval pipelines dynamically. While the engineering effort is significant, the core idea aligns with ongoing research advocating for more flexible, code-driven AI workflows.

“Perplexity’s Search as Code is a meaningful step toward more adaptable AI retrieval systems, but the core idea is not entirely new. The real innovation lies in their engineering effort to re-architect their search stack into composable primitives.”

— Thorsten Meyer, AI researcher

Amazon

complex search task automation tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Validation and Independent Replication Pending

Many of the benchmark results, including the significant performance improvements, are based on proprietary or self-created tests. Independent validation by third parties is needed to confirm the claims, especially given the overlap with existing research frameworks. It is also unclear how well SaC will perform across a broader range of real-world tasks and datasets.

Upcoming Validation and Broader Adoption Tests

Expect further independent testing of Perplexity’s SaC approach by researchers and industry analysts. Additional benchmarks and real-world deployments will help assess its scalability and robustness. Perplexity may also release more detailed technical documentation and open benchmarks to facilitate external validation, shaping the future adoption of programmable search architectures in AI systems.

Key Questions

How is Search as Code different from traditional search methods?

SaC allows AI models to assemble and execute custom search pipelines dynamically using code, rather than relying on fixed, monolithic search endpoints. This enables more flexible, task-specific retrieval strategies.

Is Search as Code a completely new idea?

No, similar concepts have been explored in recent research, such as CodeAct (ICML 2024) and Anthropic’s MCP (2025). SaC’s main contribution is the engineering effort to re-architect the search stack into composable primitives.

Will SaC work well across all types of search tasks?

It is still uncertain. While initial results are promising, independent validation and testing across diverse real-world scenarios are needed to confirm its effectiveness broadly.

What are the potential risks or limitations of SaC?

Potential challenges include increased system complexity, security considerations for executing generated code, and the need for extensive engineering to adapt existing search infrastructure.

When can we expect wider adoption of Search as Code?

Wider adoption depends on validation of the results, integration efforts, and industry acceptance. It may take months or years before SaC becomes a standard approach in AI search systems.

Source: ThorstenMeyerAI.com

You May Also Like

Intel Introduces ‘Crescent Island’ Inference GPU

Executive SummaryIntel’s new Crescent Island GPU targets inference workloads with Xe3P architecture…

The Bubble Is Not in Valuations: It’s in the Productivity Gap

New research shows AI’s productivity gains are smaller than expected, revealing a gap between market expectations and reality, affecting valuations and strategies.

Low‑Precision Math for AI: FP8, FP6, and FP4 in Practice

Probing the practical benefits and challenges of FP8, FP6, and FP4 in AI reveals how low-precision math can revolutionize deployment—if you navigate the trade-offs carefully.

The Defender’s Counter-Cascade.

On May 11, 2026, Google disclosed the first confirmed use of an AI-built zero-day exploit. The event highlights the deployment gap in AI security defenses.