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’s research team announced a new approach called Search as Code, allowing AI systems to build custom retrieval pipelines dynamically. Early results show high accuracy and token efficiency, though some claims require independent validation.

Perplexity’s research team announced a new approach called Search as Code (SaC) on June 1, 2026, which aims to fundamentally change how AI systems perform search tasks. This development allows AI models to assemble custom search pipelines dynamically in code, rather than relying on fixed search endpoints. The innovation is significant because it addresses limitations in control and flexibility that hinder large-scale, multi-step AI tasks, making it highly relevant for advancing autonomous AI agents.

Perplexity’s SaC approach exposes core search functions—retrieval, filtering, ranking, and rendering—as atomic components within a Python SDK. The AI model acts as the control layer, generating code to orchestrate these components in real-time. This design enables more precise and adaptable search strategies, especially in complex multi-step tasks requiring hundreds or thousands of retrieval operations per minute.

The company demonstrated SaC’s capabilities through a case study involving the identification and characterization of over 200 high-severity software vulnerabilities. You can learn more about code search tools that improve efficiency. The results showed 100% accuracy while reducing token usage by 85%, compared to other systems. These findings suggest that SaC can significantly improve both the efficiency and accuracy of large-scale search tasks, although the company notes that some benchmarks and claims are preliminary and require further validation. For related insights, see Search as Code.

At a glance
reportWhen: announced June 1, 2026
The developmentPerplexity has launched a new architecture called Search as Code, which transforms search into a programmable, modular process for AI agents, claiming improved performance.
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

Python SDK for search pipelines

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

AI search pipeline tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Implications for AI Search and Autonomous Agents

This development marks a shift toward more flexible, programmable search architectures that could enable AI agents to perform complex, multi-step information retrieval tasks more effectively. If validated at scale, SaC could influence how AI systems are built for enterprise, research, and automation applications, reducing costs and improving accuracy in critical tasks like security vulnerability analysis and data synthesis.

Amazon

programmable search engine software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Evolution of Search Architectures in AI

Traditional search systems treat search as a static query-response process, which limits control in multi-step, autonomous AI workflows. The concept of turning search into programmable code builds on prior ideas from recent research, such as CodeAct (ICML 2024) and work by Anthropic (November 2025), which argued that loading search tools into sandboxed code improves success rates and reduces context usage. Perplexity’s innovation lies in re-architecting its own search stack into atomic primitives, enabling the model to orchestrate search dynamically, rather than relying on external APIs or fixed pipelines.

While the approach is not entirely new—similar ideas have been explored in academic and industry research—the specific implementation and claimed performance gains by Perplexity are notable. However, some benchmarks used to demonstrate SaC’s effectiveness are proprietary or unverified independently, raising questions about the generalizability of results.

“Transforming search into a programmable, modular process could be a game-changer for autonomous AI agents, provided the claims hold up under broader testing.”

— Thorsten Meyer, AI researcher

Amazon

custom search retrieval tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Unverified Benchmarks and Validation Challenges

While Perplexity reports impressive results, some benchmarks—such as WANDR—are proprietary and have not been independently replicated. The comparison across different models and hardware configurations introduces uncertainty about the true performance gains. Additionally, the approach’s novelty overlaps with prior research, and the full impact of SaC remains to be validated in broader, real-world scenarios.

It is also unclear how well SaC will scale outside of controlled experiments, or how it performs in diverse application domains beyond security vulnerability analysis.

Next Steps for Validation and Adoption

Further independent testing and peer review are needed to confirm SaC’s effectiveness and scalability. Perplexity is likely to publish more detailed benchmark results and open-source components for community validation. Adoption in real-world applications will depend on how well SaC integrates with existing AI systems and whether it can demonstrate consistent improvements across diverse tasks.

Industry observers will watch for validation studies, broader benchmarks, and potential integration into commercial AI platforms over the coming months.

Key Questions

How does Search as Code differ from traditional search methods?

Instead of fixed search endpoints, SaC enables AI models to generate and execute custom search pipelines dynamically, giving greater control and flexibility in complex, multi-step tasks.

What are the main claimed benefits of SaC?

SaC claims to improve accuracy to 100% in specific tasks, reduce token usage significantly, and enable more adaptable search strategies for AI agents.

Are the performance results from Perplexity independently verified?

No, most benchmarks are proprietary or preliminary. Independent validation is needed to confirm the performance gains claimed by Perplexity.

Is this approach entirely new?

The idea of turning search into programmable code has been explored in academic research and by other companies. Perplexity’s contribution is in re-architecting its own search stack into atomic primitives, which is a notable engineering achievement.

What are the risks or limitations of SaC?

Potential limitations include reliance on specific benchmarks, uncertain scalability outside controlled experiments, and the need for broader validation across different domains and models.

Source: ThorstenMeyerAI.com

You May Also Like

The queue. Why the grid, not the chip, is the binding constraint on AI.

Thorsten Meyer AI frames grid access, not chips, as the tighter limit on AI expansion, with details still limited.

Building for the future

Cloudflare announces a global reduction of over 1,100 employees to prioritize AI development and future growth, emphasizing transparency and support for departing staff.

Building ML framework with Rust and Category Theory

A new draft explores using Rust and category theory to develop a structured, type-safe tiny ML system, blending mathematics and engineering.