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.

PRIME GAMING

Play games included with Prime

Start a Prime free trial and play with Amazon Luna on your devices.

Start playing

As an affiliate, we earn on qualifying purchases.

TL;DR

Perplexity has unveiled a new method called Search as Code, allowing AI systems to dynamically build retrieval pipelines. This approach aims to improve accuracy and control in AI search, building on existing ideas but re-architecting the search stack.

Perplexity has launched Search as Code (SaC), a new approach that enables AI systems to construct custom search pipelines on the fly, marking a significant shift in how search is integrated into AI agents. This development aims to address limitations in traditional search methods, especially in complex, multi-step tasks, and is now being shipped as part of Perplexity’s product offerings.

On June 1, 2026, Perplexity’s research team published a detailed argument that the conventional way AI systems use search—treating it as a static endpoint—is fundamentally flawed for agent-based tasks. Instead, they propose SaC, which exposes the core components of the search process—retrieval, filtering, ranking, and assembly—as modular primitives that an AI can manipulate via code. This allows models to dynamically create tailored retrieval pipelines, improving control and efficiency. Perplexity demonstrated SaC’s effectiveness through a case study involving the identification and characterization of over 200 high-severity vulnerabilities (CVEs). Their system achieved 100% accuracy while reducing token usage by 85%, outperforming other systems that scored below 25%. The approach involves a three-stage process: fan-out over vendor advisories, refinement with an LLM, and verification with a schema-bound process. The results suggest that models can write bespoke, multi-stage retrieval programs instead of repeatedly calling a single API endpoint. The company reports that SaC outperforms existing benchmarks on four of five tests, tying on the fifth, and delivers up to 20 points higher than non-SaC systems. Cost-performance analysis indicates even low-reasoning configurations outperform most rivals at lower costs. However, some skepticism remains about the novelty and benchmarking methods, especially since the most significant benchmark (WANDR) was internally developed and not yet independently validated.
At a glance
updateWhen: announced June 1, 2026
The developmentPerplexity announced on June 1, 2026, that it has developed and begun shipping Search as Code, a new approach to AI search that allows 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

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 Agent Control

This development signifies a potential leap forward in how AI systems perform complex retrieval tasks. By enabling models to assemble search pipelines dynamically through code, SaC offers greater control, efficiency, and accuracy, especially for multi-step, high-stakes tasks like vulnerability analysis or large-scale data exploration. This approach could influence future AI architectures, shifting from static APIs to more flexible, programmable search stacks, ultimately enhancing AI’s problem-solving capabilities and reliability.

Amazon

AI retrieval pipeline tools

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 long relied on fixed pipelines that accept a query and return results, a model suited to single-query interactions. Recent innovations, including Perplexity’s own answer engine, have optimized search for AI, but these still treat search as a monolithic endpoint. The idea of turning search into a programmable, modular system dates back at least two years, with foundational work like the CodeAct paper (ICML 2024) and projects from Hugging Face and Cloudflare demonstrating that models perform better when they generate executable code to orchestrate tools and search components. In late 2025, Anthropic published research showing that turning tools into sandboxed code APIs significantly reduces context size and improves agent performance. Perplexity’s SaC is a specific instantiation of this broader pattern, re-architecting its search stack into composable primitives for more flexible control. While the core concept is not entirely new, Perplexity claims its engineering implementation—breaking down the search stack into atomic parts—is a notable innovation.

“Perplexity’s Search as Code represents a meaningful step in giving models the ability to craft bespoke retrieval pipelines, moving beyond static search endpoints.”

— 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.

Unverified Aspects and Benchmark Limitations

While Perplexity reports impressive results, some aspects remain unverified. The most significant benchmark, WANDR, was developed internally and has not undergone independent replication. Additionally, the comparison involves different underlying models (GPT-5.5 for SaC and OpenAI, Opus 4.7 for others), which complicates direct evaluation. The full impact of SaC on real-world applications and its scalability across diverse tasks remains to be seen. Furthermore, the approach’s novelty is partly a re-architecting of existing ideas, which have appeared in prior research, raising questions about the true innovation.

Amazon

custom search pipeline software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps for Adoption and Validation

Further independent validation of SaC’s benchmarks and real-world testing will be critical. Perplexity is expected to expand its deployment, offering SaC as part of its platform and encouraging third-party researchers to replicate results. Future developments may include broader benchmarking, integration into more complex AI workflows, and refinement of the code-based retrieval pipelines. Monitoring how the approach scales and adapts across different domains will determine its long-term impact on AI search architectures.

Amazon

AI search optimization tools

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, customization, and efficiency in complex tasks.

Is SaC a completely new idea?

The concept of turning tools into executable code for AI control has been explored in prior research, but Perplexity’s implementation of re-architecting its search stack into atomic primitives is a notable engineering achievement. The core idea, however, is not entirely new.

What are the limitations of the current benchmarks?

Many benchmarks, including WANDR, are internally developed and have not been independently validated. Differences in underlying models and testing conditions also complicate direct comparisons, so results should be viewed as preliminary.

When will SaC be available for broader use?

Perplexity has begun shipping SaC as part of its product offerings, with wider availability likely following further validation, testing, and integration efforts over the coming months.

Source: ThorstenMeyerAI.com

NFL SEASON / TAI

NFL season / tailgating Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Show HN: Open-Source eInk Bike Computer

A developer has introduced an open-source eInk-based bike computer, highlighting the potential for customizable, energy-efficient cycling devices.

Designed Before The Thing It Runs: The Future Of AI Hardware

Exploring how AI hardware is being rethought from the ground up to meet inference demands, emphasizing thermal limits, memory, and specialization.

DIY Chrome Extensions

New AI-powered platform enables non-developers to create custom Chrome extensions via natural language prompts, simplifying browser automation.

Mac vs GPU Tower for Local LLMs: The Heat-and-Noise Tradeoff

Comparing Mac Studio with Apple Silicon and GPU towers for local large language model inference reveals key heat, noise, and capacity differences affecting choice.