Search as Code: Perplexity Is Right About the Future — Just Not First to It

📊 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 systems to dynamically construct retrieval pipelines. This approach outperforms traditional search models in accuracy and cost-efficiency, though some claims require further validation.

Perplexity has unveiled Search as Code (SaC), a new framework that allows AI models to assemble custom search pipelines dynamically, marking a shift from traditional search methods. This development aims to improve accuracy and efficiency in complex, multi-step search tasks, positioning Perplexity as a leader in AI search innovation.

On June 1, 2026, Perplexity’s research team published a detailed proposal for Search as Code, arguing that conventional search systems are inadequate for agent-driven AI tasks requiring hundreds or thousands of retrieval operations per minute. SaC transforms the search stack into a set of composable primitives accessible via a Python SDK, enabling AI models to generate and execute code that orchestrates search, filtering, and ranking processes in real time.

Perplexity demonstrated SaC’s capabilities through a case study involving the identification of over 200 high-severity vulnerabilities (CVEs). The system achieved 100% accuracy while reducing token usage by 85%, significantly outperforming existing systems that scored under 25%. The approach involves a three-stage process: broad fan-out over vendor advisories, targeted refinement via language models, and a schema-bound verifier to ensure precision.

Benchmark results show SaC leading in four out of five tests, including WANDR, where it outperformed competitors by 2.5 times. The company reports that SaC’s cost-performance ratio surpasses other models, especially in low-reasoning configurations, indicating potential for scalable, cost-effective AI search solutions.

At a glance
reportWhen: announced June 1, 2026
The developmentOn June 1, 2026, Perplexity announced its new Search as Code framework, claiming significant improvements in AI search 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
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

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

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 customization

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Implications for AI Search and Control

This development signals a potential paradigm shift in AI search systems, emphasizing flexibility and control over retrieval pipelines. By enabling models to generate and execute tailored search code, SaC could dramatically improve accuracy and efficiency in complex tasks, impacting industries relying on large-scale information retrieval. However, the approach’s reliance on re-architected search stacks and the novelty of the methodology mean widespread adoption will depend on further validation and replication.

RAG-Driven Generative AI: Build custom retrieval augmented generation pipelines with LlamaIndex, Deep Lake, and Pinecone

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.

Evolution of Search and AI Agent Capabilities

Traditional search systems were designed for human queries, returning static result sets. Recent advances, including Perplexity’s answer engine and similar efforts by other companies, have moved toward AI-optimized search. The concept of using code to orchestrate search routines was formalized earlier this year through research like the CodeAct paper (ICML 2024) and projects like Hugging Face’s smolagents. Anthropic also published similar ideas in late 2025, emphasizing the benefits of sandboxed, code-based tool execution for agents. Perplexity’s innovation lies in re-architecting its search stack into atomic primitives, a significant engineering effort that sets it apart from external API wrappers.

“Perplexity’s Search as Code represents a meaningful step toward giving AI models more control over retrieval processes, with promising results in accuracy and cost efficiency.”

— Thorsten Meyer, AI researcher

ELEGOO UNO Project Basic Starter Kit with Tutorial and UNO R3 Compatible with Arduino IDE

ELEGOO UNO Project Basic Starter Kit with Tutorial and UNO R3 Compatible with Arduino IDE

The cheapest and most basic electronic components kit for Arduino beginner

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Validation and Independent Replication of Results

While Perplexity reports strong benchmark results, some claims—particularly the WANDR benchmark where SaC scores highest—are based on proprietary or self-designed tests that have not yet been independently verified. The comparison involving different models and the novelty of the benchmarks introduce questions about reproducibility and generalizability. Additionally, the broader industry has yet to adopt or validate the approach at scale, leaving some uncertainty about its practical impact.

Further Testing and Industry Adoption

Expect independent researchers and industry players to attempt replication of SaC’s results, especially on established benchmarks. Perplexity may also expand its testing to include more diverse tasks and datasets. Meanwhile, the company is likely to enhance its SDK and demonstrate real-world applications, potentially influencing the development of future AI search systems and agent architectures.

Key Questions

What is Search as Code (SaC)?

SaC is an approach where AI models generate and execute custom search pipelines by assembling composable primitives, allowing for more flexible and controlled retrieval processes.

How does SaC improve over traditional search methods?

It enables models to tailor search strategies dynamically, reducing token usage, increasing accuracy, and handling complex multi-step retrieval tasks more effectively.

Are these results confirmed and replicable?

While initial results are promising, some benchmarks are proprietary or self-designed. Independent validation and replication are needed to confirm SaC’s broad effectiveness.

Will SaC be adopted widely in the industry?

Industry adoption depends on further validation, ease of integration, and demonstrated benefits in real-world applications. It remains an emerging approach at this stage.

SaC builds on earlier work that formalized using code to orchestrate search and tool execution, but its engineering effort to re-architect the search stack is a novel contribution.

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

The $800m Pull-Out by Bitcoin Whales Might Signal a Coming Pullback

A substantial $800 million withdrawal by Bitcoin whales could indicate impending market shifts—what does this mean for the cryptocurrency’s future trajectory?

Bitcoin Jumps on US Reserve Blueprint

The recent U.S. crypto strategic reserve announcement has propelled Bitcoin past $91,000; what could this mean for the future of digital currencies?

XRP ETF Approval Triggers Rally: Impact on Crypto Markets

The potential approval of an XRP ETF could ignite a significant rally, transforming the crypto markets in ways you won’t want to miss.

The Open Interest in Bitcoin Is Surging With a Wealth of New Positions.

The surge in Bitcoin’s open interest hints at potential volatility, leaving traders wondering what dramatic shifts might lie ahead.