📊 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 announced a new approach called Search as Code, allowing AI systems to build custom retrieval pipelines dynamically. This development aims to enhance accuracy and efficiency in large-scale AI tasks, though it builds on prior concepts and faces validation challenges.

Perplexity has unveiled a new approach called Search as Code, which transforms how AI systems perform search by allowing models to assemble custom retrieval pipelines in real time. This innovation aims to improve accuracy and control in complex AI tasks, marking a significant shift from traditional search methods.On June 1, 2026, Perplexity’s research team published a detailed proposal advocating for Search as Code, a method that treats search as a set of atomic primitives that an AI can assemble into tailored retrieval programs. This approach addresses limitations in traditional search pipelines, which are rigid and not suited for multi-step, high-volume retrieval tasks common in agent-based AI systems. The core idea is to expose retrieval, filtering, ranking, and rendering as modular components within a Python SDK, enabling the model to generate and execute code to orchestrate these components dynamically. The team demonstrated this concept with a case study focused on identifying and characterizing over 200 high-severity CVEs, achieving 100% accuracy while reducing token usage by 85%. The system outperformed existing methods on several benchmark tests, including WANDR, where it delivered a 2.5× improvement over competitors. These results suggest that Search as Code can significantly enhance the precision and efficiency of AI-driven search tasks. However, the development is not without skepticism. Critics point out that similar ideas, such as code-based tool invocation in AI agents, have been explored previously in academic papers and industry projects. Moreover, some benchmarks used to demonstrate success are internally developed by Perplexity, raising questions about independent validation. The comparison models also vary in their underlying architectures, complicating direct performance assessments.
At a glance
reportWhen: announced June 1, 2026
The developmentPerplexity’s research team published on June 1, 2026, proposing Search as Code as a new method to improve AI search capabilities by enabling models to assemble retrieval 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
50 AI Agents Every Developer Must Build: The Complete Guide to Building Scalable, Production-Ready Autonomous Systems with LangChain, LangGraph, and Python

50 AI Agents Every Developer Must Build: The Complete Guide to Building Scalable, Production-Ready Autonomous Systems with LangChain, LangGraph, and Python

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
Mastering AI Agent Development with OpenAI Agents SDK: From Fundamentals to Enterprise-Scale Agent Systems

Mastering AI Agent Development with OpenAI Agents SDK: From Fundamentals to Enterprise-Scale Agent Systems

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Implications for AI Search and Agent Control

This development signals a potential paradigm shift in how AI systems perform search, moving from static, monolithic endpoints to dynamic, code-driven pipelines. If validated broadly, Search as Code could enable more flexible, accurate, and scalable AI agents capable of handling complex, multi-step tasks with greater control. It also indicates that the trend toward integrating coding and reasoning into AI workflows is gaining momentum, which could influence future research, product design, and industry standards in AI search technology.
4.6L & 5.4L Ford Engines: How to Rebuild - Revised Edition (Workbench)

4.6L & 5.4L Ford Engines: How to Rebuild – Revised Edition (Workbench)

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Evolution of Search and Agent Architectures

Traditional search systems have relied on fixed pipelines that accept a query and return a set of results, a paradigm suited to earlier, single-query interactions. With the rise of AI agents capable of multi-step reasoning, this model has become limiting. Prior efforts, including OpenAI’s early answer engines and academic work like the CodeAct paper (ICML 2024), have explored turning tool invocation into executable code to improve flexibility and success rates. In November 2025, Anthropic demonstrated high context reduction by turning tools into sandboxed code APIs, supporting the idea that code execution is more effective than static tool calls. Perplexity’s innovation lies in re-architecting its search stack into atomic primitives, enabling the model to generate customized retrieval programs. This approach builds directly on prior concepts but emphasizes engineering that allows the search stack itself to be dynamically assembled and executed, rather than merely calling external APIs.

“Perplexity’s Search as Code fundamentally shifts how AI systems can control their retrieval processes, making them more adaptable and precise.”

— Thorsten Meyer, AI researcher

Securing the Model Context Protocol: Defend agentic AI systems from supply chain, runtime, and code execution threats

Securing the Model Context Protocol: Defend agentic AI systems from supply chain, runtime, and code execution threats

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Validation and Broader Adoption Challenges

It remains unclear how well Search as Code will perform across diverse, real-world applications outside of Perplexity’s internal benchmarks. Independent replication of the results, especially on externally developed benchmarks, has not yet been reported. There is also uncertainty regarding how easily other organizations can implement similar architectures, given the engineering complexity involved. Additionally, comparisons between different models and benchmarks are complicated by variations in underlying architectures and training data, which could influence performance claims.

Independent Testing and Industry Adoption Expectations

Further validation by external researchers and industry players is expected to test the robustness of Search as Code across varied tasks and datasets. Perplexity may release more detailed benchmark results and open-source components to facilitate replication. Additionally, industry adoption hinges on whether other organizations can replicate the engineering effort and whether the approach proves scalable in production environments. Watch for upcoming conferences and publications where these developments will be scrutinized and validated further.

Key Questions

What is Search as Code?

Search as Code is an approach where AI models dynamically assemble search pipelines using modular primitives, allowing for more flexible and precise retrieval processes.

It enables models to generate and execute custom retrieval programs, improving accuracy, control, and efficiency, especially in complex multi-step tasks.

Is this approach already proven in real-world applications?

While initial results are promising, validation outside of Perplexity’s benchmarks and broader industry adoption are still pending.

What are the main challenges ahead?

Independent validation, engineering complexity, and scalability in diverse environments remain key hurdles to widespread deployment.

Will other companies adopt Search as Code?

Potentially, if further validation confirms its benefits and if engineering challenges can be addressed at scale.

Source: ThorstenMeyerAI.com

You May Also Like

Xbox Game Pass Tiers [2026]: Ultimate Wins at $22.99

Microsoft introduces new Xbox Game Pass tiers in 2026, with the Ultimate plan now priced at $22.99, offering expanded features and value.

Why is Doordash not working? DoorDash down for many Sunday

Many users report DoorDash service disruptions on Sunday, with the platform experiencing widespread outages. The cause is currently unclear.

Relationships signal monitor: Who Is Lionel Messi’s Wife? All About His Childhood Sweetheart, Antonela Roccuzzo

Confirmed: Lionel Messi is married to Antonela Roccuzzo, his childhood sweetheart. This article explores their relationship and his early life.

Stardew Dev Says Haunted Chocolatier Is Because Of Self-Torture

The creator of Stardew Valley explains that Haunted Chocolatier’s development was influenced by personal struggles and self-torture.