📊 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 (SaC), allowing AI systems to dynamically build search pipelines. Early tests show high accuracy and token efficiency, but independent validation and broader adoption are still pending.

Perplexity’s research team announced on June 1, 2026, the launch of Search as Code (SaC), a new framework that allows AI models to assemble custom search pipelines dynamically. This development aims to address the limitations of traditional search methods in agent-driven AI tasks, potentially transforming how retrieval systems are integrated into AI workflows.

SaC redefines search architecture by exposing retrieval, filtering, ranking, and rendering components as atomic primitives within a Python SDK. The AI model acts as the control layer, writing and executing code to orchestrate these components in real time. This approach contrasts with conventional monolithic search APIs, which treat search as a fixed, one-size-fits-all process.

In initial testing, Perplexity applied SaC to a cybersecurity vulnerability identification task, achieving 100% accuracy and reducing token usage by 85%, outperforming existing systems that scored below 25%. The methodology involves a three-stage process: broad fan-out over vendor advisories, targeted refinements via language models, and schema-bound verification to ensure precise results. These results suggest SaC enables more efficient and adaptable search strategies, especially for complex, multi-step tasks.

While the results are promising, the company emphasizes that these are early findings based on single runs and proprietary benchmarks. They acknowledge that independent validation and broader testing are necessary before the approach can be widely adopted or considered conclusive.

At a glance
reportWhen: announced June 1, 2026
The developmentPerplexity unveiled Search as Code, a new method for AI search that improves flexibility and performance, marking a significant step in agent-based AI systems.
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 retrieval pipeline tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Implications for AI Search and Agent Capabilities

The introduction of Search as Code by Perplexity signals a shift toward more flexible, programmable retrieval systems within AI agents. If validated broadly, this could lead to more efficient, accurate, and adaptable AI workflows, especially in domains requiring complex multi-step searches. The approach aligns with ongoing trends toward integrating code execution within language models, potentially enabling AI to better control its information-gathering processes and improve decision-making.

However, the development also raises questions about the replicability of results, the need for independent validation, and how quickly other players might adopt similar architectures. The move toward programmable search primitives could influence future AI system designs, emphasizing modularity and control over static APIs.

Amazon

custom search engine development kit

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background on Search Architectures and Agent Evolution

Traditional search systems, inherited from human information retrieval, rely on fixed pipelines that accept a query and return a set of results. AI-optimized search, like Perplexity’s 2022 answer engine, improved upon this but still depended on monolithic endpoints that limited control over retrieval processes. As AI agents evolved to perform multi-hour, multi-step tasks, the need for more dynamic, controllable search mechanisms became apparent.

Prior work, such as the CodeAct framework (ICML 2024) and Cloudflare’s Code Mode, demonstrated that turning tools into executable code significantly improves success rates and efficiency. Anthropic’s MCP (November 2025) further illustrated that embedding tools as code APIs reduces context size and enhances agent scalability. Perplexity’s SaC builds on these insights but applies them specifically to search, re-architecting the entire stack into composable primitives.

“Perplexity’s Search as Code approach is a meaningful step toward more flexible, controllable AI retrieval systems, but independent validation remains essential.”

— Thorsten Meyer, AI researcher

Amazon

search as code software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Validation and Adoption Challenges for Search as Code

While early results are promising, the approach’s robustness across diverse tasks and environments remains unconfirmed. Independent replication of the benchmarks, especially the proprietary WANDR test, is pending. Additionally, the impact of different model architectures and the scalability of SaC in real-world applications are still uncertain. The company acknowledges these limitations and emphasizes that broader validation is necessary before widespread adoption.

Next Steps for Validation and Industry Adoption

Future efforts will focus on independent testing of SaC’s benchmarks, expanding to real-world scenarios, and evaluating scalability. Perplexity plans to release more detailed technical documentation and open the framework for external experimentation. Industry observers will watch for adoption by other AI developers and integration into broader AI toolchains, which could influence the future landscape of AI search systems.

Key Questions

What is Search as Code and how does it differ from traditional search?

Search as Code (SaC) allows AI models to assemble and execute custom retrieval pipelines dynamically, rather than relying on fixed search APIs. This enables more flexible, task-specific search strategies.

Are the initial results of SaC reliable?

The results are promising but based on early tests and proprietary benchmarks. Independent validation is needed to confirm robustness across diverse tasks.

Will other AI companies adopt Search as Code?

It is uncertain. While the concept aligns with existing trends toward programmable tools, widespread adoption depends on validation, scalability, and integration challenges.

What are the main benefits of SaC?

SaC offers improved accuracy, reduced token usage, and greater control over search processes, which can enhance complex AI tasks and multi-step workflows.

What are the potential limitations or risks?

Key uncertainties include the approach’s scalability, performance consistency across different models and tasks, and the need for independent validation to avoid overreliance on proprietary benchmarks.

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 Co-Founder’s Black Hole — A Structural Read on Jack Clark’s Automated AI R&D Essay

Jack Clark predicts a >60% chance of fully autonomous AI research by 2028, raising concerns about institutional readiness amid converging technical signals.

7 Best Graphics Card Prime Day Deals for PC Upgrades in 2026

Discover the best graphics card deals for PC upgrades during Prime Day 2026, including performance, value, and fit considerations for gamers and upgraders.

The bridge. Why the AI buildout runs on a nuclear story and a gas reality.

Exploring the gap between nuclear commitments and the current reliance on gas for AI data centers, highlighting timeline mismatches and environmental impacts.

The United Kingdom: The Pragmatist’s Hedge

Analyzing the UK’s balanced, flexible welfare and labor policies post-Brexit amid economic shifts and AI developments.