📊 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 Search as Code (SaC), a new approach that allows AI systems to assemble custom search pipelines using modular primitives. This innovation aims to improve retrieval accuracy and efficiency for AI agents, marking a significant step forward. However, some claims are based on proprietary benchmarks, and broader validation is pending.

Perplexity has introduced Search as Code (SaC), a new architecture that enables AI agents to assemble custom retrieval pipelines by writing code, rather than relying on fixed search endpoints. This development aims to address limitations in traditional search systems, especially for complex, multi-step AI tasks, and could significantly enhance retrieval accuracy and efficiency.

On June 1, 2026, Perplexity’s research team published a detailed explanation of SaC, arguing that traditional search methods are ill-suited for agent-based AI workflows that require hundreds or thousands of retrieval operations per minute. SaC exposes core search functions—retrieval, filtering, ranking, and rendering—as atomic, composable primitives within a Python SDK, allowing models to generate and execute code to tailor search pipelines dynamically.

The approach involves three layers: the language model as the control plane, a sandbox for deterministic execution, and the primitive set of retrieval functions. This design enables models to fetch, filter, and assemble data more flexibly, filling gaps where predefined APIs fall short. Their case study on identifying high-severity vulnerabilities reported 100% accuracy while reducing token usage by 85%, outperforming other systems by a wide margin.

Perplexity reports SaC leading on four out of five benchmarks, tying for first on a fifth, and delivering up to 2.5× better results on their proprietary WANDR benchmark. The system’s cost-performance ratio also favors lower-cost configurations, suggesting practical advantages for deployment.

At a glance
updateWhen: announced June 1, 2026
The developmentPerplexity announced the release of Search as Code (SaC), a new architecture allowing AI agents to dynamically construct retrieval pipelines, claiming improved performance and control.
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
JCTLIYXG Multi Surface Pipe Profiling Tool, Pipe Cutting Template Multi Functional Shape Duplicator, Lightweight and Wear-Resistant Fiberglass Material for Tiles Floors DIY Pro Plumbing (0-6" Pipes)

JCTLIYXG Multi Surface Pipe Profiling Tool, Pipe Cutting Template Multi Functional Shape Duplicator, Lightweight and Wear-Resistant Fiberglass Material for Tiles Floors DIY Pro Plumbing (0-6" Pipes)

Multi-Surface Shaping with Precision: Achieve accurate pipeline shaping and surface shaping at any angle. This pipe profile tool…

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

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Potential Impact of Search as Code on AI Search Strategies

This development signals a shift toward more flexible, programmable search architectures that give AI systems greater control over data retrieval processes. If validated broadly, SaC could enable AI agents to perform complex, multi-step information gathering tasks more accurately and efficiently, impacting fields from cybersecurity to research automation. However, the reliance on proprietary benchmarks and the overlap with prior ideas in the field mean broader adoption and validation are needed before the full impact is clear.

Pro Tools Perpetual License NEW 1-year software download with updates + support for a year

Pro Tools Perpetual License NEW 1-year software download with updates + support for a year

Full version, permanent License of Avid Pro Tools. Includes 1-Year of software updates and upgrades.

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Previous Advances and the Evolution Toward Programmable Search

The concept of treating tools and retrieval functions as programmable components has been explored by other researchers, such as the CodeAct framework (ICML 2024) and Anthropic’s MCP system (November 2025). These approaches emphasize turning tools into executable code within sandboxed environments, achieving significant reductions in context size and improvements in success rates. Perplexity’s innovation lies in re-architecting its own search stack into atomic primitives, a complex engineering feat that sets it apart from simply wrapping external APIs.

While the core idea of code-driven tool invocation is not new, applying it specifically to search infrastructure at this scale and complexity represents a notable advancement. Nonetheless, claims about performance are primarily based on internal benchmarks and proprietary data, which warrants cautious interpretation.

“Perplexity’s Search as Code could fundamentally change how AI systems retrieve and process information, offering unprecedented control and efficiency.”

— Thorsten Meyer, AI researcher

Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents

Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Validation and Broader Adoption of Search as Code

Most of the performance claims are based on proprietary benchmarks developed by Perplexity, such as WANDR, which has not been independently validated. The comparison models also vary in the underlying AI models used, complicating direct assessment. Additionally, the concept of programmable search is not new, and prior work has demonstrated similar principles, raising questions about the novelty and incremental value of SaC. Broader industry adoption and real-world testing remain pending, making the long-term impact uncertain.

Next Steps for Validation and Industry Adoption

Independent researchers and industry peers are likely to attempt replicating Perplexity’s benchmarks to verify performance claims. Broader testing in real-world applications will determine how effectively SaC scales and integrates into existing AI workflows. Perplexity may also release more detailed technical documentation and open benchmarks to facilitate external validation. The broader AI community will watch for how this approach influences future search architectures and agent design strategies.

Key Questions

What is Search as Code (SaC)?

SaC is an architecture that allows AI systems to assemble custom search pipelines by writing and executing code, rather than relying on fixed search endpoints. It exposes core search functions as modular primitives that can be combined dynamically.

How does SaC improve over traditional search methods?

SaC provides greater control, flexibility, and efficiency by enabling models to tailor retrieval pipelines on the fly, reducing token usage and increasing accuracy in complex tasks.

Are the performance claims independently verified?

No, most claims are based on proprietary benchmarks developed by Perplexity. External validation and real-world testing are still pending.

Is this idea entirely new?

The concept of turning tools into executable code for AI is not new, with prior work by CodeAct and Anthropic. SaC’s novelty lies in applying these principles specifically to search infrastructure at scale.

What are the potential risks or downsides?

Risks include reliance on proprietary benchmarks, limited independent validation, and potential implementation complexity that could hinder widespread adoption.

Source: ThorstenMeyerAI.com

This content is for general information only and is not financial, tax or legal advice. Consult a qualified professional for decisions about your money.
You May Also Like

7 Best PC Processors for Prime Day Deals in 2026

Explore the best PC processor deals for Prime Day 2026, including AMD and Intel options, with insights on value, performance, and upgrade paths.

7 Best PC Tablets for Prime Day Deals in 2026

Discover the best PC tablets on Prime Day 2026, including deals on Samsung Galaxy Tab S9, Surface Pro 11, iPad 9th Gen, and more, with buying tips.

7 Best LCD Monitor Prime Day Deals for Gaming, Work, and Travel in 2026

Discover the best LCD monitor deals for gaming, work, and travel during Prime Day 2026, including top picks like LG, AOC, and GIGABYTE models.

7 Best PC Motherboards for Prime Day Deals in 2026

Discover the best PC motherboard deals for Prime Day 2026, including options for AM4 and AM5 platforms, with detailed insights on features and value.