AIThis post was created with the assistance of artificial intelligence (AI).

📊 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.

At a glance
reportWhen: announced June 1, 2026
The developmentPerplexity announced a new Search as Code framework on June 1, 2026, aiming to transform AI search capabilities by enabling dynamic, code-based retrieval pipelines.
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

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

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.

Upgraded Pipe Center Finder Measure 0.5"& up with 4" Y-Type Pipe Diameter

Upgraded Pipe Center Finder Measure 0.5"& up with 4" Y-Type Pipe Diameter

  • Effortless Pipe Center Finding: Locate pipe centers and angles easily
  • Simple Operation: Loosen, position, tap to mark
  • Adjustable Bubble Protractor: 4-inch Y-type head with dial

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

Amazon

Python SDK for search components

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.

Free Fling File Transfer Software for Windows [PC Download]

Free Fling File Transfer Software for Windows [PC Download]

  • User-Friendly FTP Interface: Intuitive and easy to use
  • Reliable Site Maintenance: Ensures stable FTP connections
  • Automation & Synchronization: Streamlines file transfers

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

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.

Hands-On Agentic AI with LangChain, RAG, and Ollama:: Build Modular Local AI Agents, Retrieval Pipelines, Tool-Using Workflows, and Production-Ready Applications

Hands-On Agentic AI with LangChain, RAG, and Ollama:: Build Modular Local AI Agents, Retrieval Pipelines, Tool-Using Workflows, and Production-Ready Applications

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

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

You May Also Like

Irish Datacenters Now Guzzle 23% Of The Country’s Electricity

Irish data centers now account for 23% of the country’s electricity use, raising concerns over energy sustainability and environmental impact.

Reddit stock drops 6% after Meta launches standalone app for online forums / Reddit’s stock is now down almost 40% this year despite a strengthening online ad business

Reddit stock declines nearly 6% amid concerns that Meta’s new Forum app could challenge Reddit’s dominance in online forums.

Satellite breakthrough enables accurate panel-scale temperature mapping for solar farms

Chinese researchers develop a satellite-based model to accurately measure photovoltaic panel temperatures at large scale, improving performance analysis.

Cloudflare Flagship

Cloudflare introduces Flagship, a native feature flag management service integrated with Workers, enabling safer, controlled feature rollouts across applications.