AIThis post was created with the assistance of artificial intelligence (AI).

📊 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, which allows AI models to dynamically build retrieval pipelines. This innovation aims to improve accuracy and efficiency in complex AI tasks, positioning Perplexity ahead of competitors. However, some claims remain unverified, and broader validation is pending.

On June 1, 2026, Perplexity’s research team announced a new approach called Search as Code (SaC), aimed at revolutionizing how AI systems perform search in the agent era. This development allows models to construct customized retrieval pipelines dynamically, moving beyond traditional fixed search endpoints. The announcement highlights a significant step forward in AI search capabilities, directly impacting the future of large language model applications.

Perplexity’s Search as Code approach redefines search by treating it as a set of composable primitives that AI models can assemble into tailored retrieval programs. This contrasts with conventional search methods, which rely on monolithic endpoints that limit control and flexibility. The new architecture exposes retrieval, ranking, filtering, and rendering as atomic building blocks within a Python SDK, enabling models to generate and execute code that orchestrates search processes in real-time.

The company claims that this method achieves 100% accuracy in a case study involving identifying and characterizing over 200 high-severity CVEs, while reducing token usage by 85%. Benchmark tests across multiple datasets show SaC outperforming other systems, including OpenAI’s models, on several key metrics. The strategy involves a three-stage process: fan-out over vendor advisories, targeted refinements via language models, and schema-bound verification to ensure precision. These results suggest a substantial efficiency and accuracy boost over existing search techniques.

While the approach is promising, critics note that the core idea of turning tools into executable code is not entirely new, having been formalized in prior research such as the ICML 2024 CodeAct paper and recent industry implementations like Cloudflare’s Code Mode. The main innovation, according to Perplexity, is their re-architecture of the search stack into atomic primitives, which is a significant engineering achievement. However, some benchmarks and comparisons are based on proprietary or unpublished data, raising questions about independent validation.

At a glance
reportWhen: announced June 1, 2026
The developmentPerplexity unveiled Search as Code, a new method enabling AI systems to assemble custom search pipelines in real-time, fundamentally changing search for AI agents.
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

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

Implications for AI Search and Retrieval Efficiency

This development signals a potential paradigm shift in how AI systems perform search tasks, emphasizing customization, control, and efficiency. By enabling models to construct retrieval pipelines dynamically, Perplexity’s approach could lead to more accurate, resource-efficient, and adaptable AI applications across industries. If validated broadly, this could influence the design of future AI architectures, making search more flexible and scalable for complex, multi-step tasks.

reBot B601-DM Assembled Robotic Arm Kit with Gripper, 6+1 DoF Open-Source Robot Arm, Python SDK and ROS1/ROS2 Compatible for AI Robotics, STEM Education, Research and Development

reBot B601-DM Assembled Robotic Arm Kit with Gripper, 6+1 DoF Open-Source Robot Arm, Python SDK and ROS1/ROS2 Compatible for AI Robotics, STEM Education, Research and Development

  • Pre-assembled Robotic Arm: Includes gripper for quick setup
  • Open-Source Design: Access to hardware and software resources
  • Supports AI Robotics Development: Compatible with Python SDK and ROS

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Evolution of Search Techniques in AI Systems

Traditional search methods, inherited from human-centric information retrieval, treat search as a fixed process that returns a static set of results. Early AI-optimized search engines, including those developed by Perplexity, improved upon this but still relied on monolithic endpoints. The idea of turning tools into code-structured APIs has been explored in recent research and industry projects, emphasizing the importance of flexible, executable search pipelines. Prior work, such as the CodeAct paper and Cloudflare’s Code Mode, laid the groundwork for turning search and tool invocation into programmable, sandboxed routines. Perplexity’s recent announcement builds on this trend, re-architecting the search stack itself into composable primitives, which is a notable engineering advance.

“Perplexity’s Search as Code represents a significant step toward more controllable and efficient AI search pipelines.”

— Thorsten Meyer, AI researcher

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

  • Effortless Pipe Center Finding: Locate pipe centers and measure angles
  • User-Friendly Operation: Loosen, place, tap to mark points
  • Precise Adjustable Protractor: Includes 4-inch Y-head with bubble protractor

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Unverified Claims and Validation Challenges

Many of Perplexity’s performance claims, including the 100% accuracy in CVE identification and benchmark results, are based on proprietary or unpublished data. The biggest benchmark, WANDR, was created by Perplexity itself, raising questions about independent validation. The comparison across different models uses varying underlying architectures, which complicates direct attribution of improvements solely to SaC. Additionally, the broader applicability and scalability of the approach remain to be tested outside controlled experiments.

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.

Next Steps for Validation and Adoption

Independent researchers and industry peers are likely to scrutinize Perplexity’s benchmarks and attempt replication of results. Broader adoption of Search as Code will depend on external validation, integration into other systems, and demonstration across diverse real-world tasks. Perplexity may also release more detailed technical documentation and open benchmarks to foster validation. Future developments could include expanding the primitives, refining the SDK, and applying the approach to more complex multi-modal or multi-step AI applications.

The AI Search Revolution: Adaptive SEO in the Age of AI

The AI Search Revolution: Adaptive SEO in the Age of AI

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

How does Search as Code differ from traditional search methods?

Search as Code allows AI models to assemble and execute custom retrieval pipelines dynamically, rather than relying on fixed, monolithic search endpoints. This provides greater control, flexibility, and potential for accuracy in complex tasks.

Is Perplexity’s performance claim independently verified?

No, most of the performance data is based on proprietary benchmarks and internal experiments. Independent validation is still pending.

Will this approach be adopted by other AI systems?

Potentially, if external validation confirms its effectiveness. The concept of turning tools into executable code is already gaining traction in the industry.

What are the main technical innovations in Search as Code?

The primary innovation is re-architecting the search stack into atomic, composable primitives that models can assemble into tailored retrieval pipelines in real-time.

What remains uncertain about this development?

Key uncertainties include the generalizability of the results, the scalability of the approach, and its performance outside controlled benchmarks.

Source: ThorstenMeyerAI.com

You May Also Like

The Future Of AI: ByteDance’s 10 Trillion Parameter Model And Massive GPU Cluster

ByteDance reportedly plans to train a 10 trillion-parameter AI model using 30,000 GPUs, but no official confirmation has been made yet.

Muse Spark 1.1

Meta has published the evaluation report for Muse Spark 1.1, detailing its capabilities and performance. The update marks a significant step in AI model development.

Opus 4.8 and the New Test for AI Coding Agents: Honesty Under Pressure

Thorsten Meyer AI examines Opus 4.8 as a reliability release for coding agents, centered on uncertainty, audits and silent failures.

RHEO · fluid lab

Thorsten Meyer AI published RHEO · fluid lab, a browser experiment whose controls let readers stir simulated fluid and toggle a deck.