📊 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 published a new approach called Search as Code, allowing AI systems to construct custom retrieval pipelines dynamically. This development aims to improve large language model performance in multi-step tasks, positioning Perplexity as a leader in search innovation, though the concept is not entirely new.
Perplexity has unveiled a new approach called Search as Code (SaC), allowing AI systems to dynamically assemble search pipelines through code, a move that aims to address limitations in traditional search methods for agent-based AI. This development positions Perplexity as a leader in search innovation, though the core idea has been explored elsewhere.
The core of Search as Code involves replacing the traditional search API with a modular stack of primitives—retrieval, filtering, ranking, and rendering—that the AI model can control and customize in real-time via code. This approach is implemented through a Python SDK, which exposes these primitives as atomic building blocks, enabling the model to generate and execute code that orchestrates search operations.
Perplexity demonstrated SaC’s effectiveness with a case study on identifying and characterizing over 200 high-severity CVEs, achieving 100% accuracy while reducing token usage by 85%, from 288,700 tokens to 42,900. The system’s strategy involved a three-stage process: fan-out over vendor advisories, targeted refinement via an LLM, and a schema-bound verifier to ensure precision. These results suggest that SaC can outperform traditional endpoints by writing bespoke, multi-stage retrieval programs.
Benchmark tests across multiple datasets showed SaC leading on four out of five tests, tying on the fifth, and outperforming other systems by up to 2.5 times on specific tasks. Cost-performance analysis indicated that even lower-reasoning configurations outperformed most rivals at lower costs. However, some results, including the WANDR benchmark, are based on proprietary data not yet independently verified.
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.
Monolithic search
Python SDK for search pipelines
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Programmable primitives
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.

Agentic AI Builder Blueprint 2026: Build Practical AI Agents, RAG Apps, MCP Workflows, Automation Systems, Evaluation Pipelines, and Production-Ready LLM Tools Step by Step
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 signifies a shift in how AI systems handle search, moving from static, monolithic endpoints to flexible, programmable pipelines. By enabling models to generate and execute code that orchestrates search primitives, Perplexity aims to improve control, accuracy, and efficiency in complex, multi-step tasks. This approach could influence future AI architectures, emphasizing adaptability and precise control over retrieval processes, which are critical for scaling agent-based AI applications.

Mastering Tool Calling with Multi-Component Prompting (MCP): Build Modular, Intelligent AI Agents with Real-World Tool Integration, API Function Calling, and Scalable Workflow Automation
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Strategies in AI Agents
The idea of turning tools into executable code for AI agents is not new. The concept was formalized in the 2024 CodeAct paper, which demonstrated higher success rates by integrating code execution into agent workflows. Similarly, in late 2025, Anthropic published research on MCP, emphasizing the benefits of sandboxed code execution and high context reduction. Perplexity’s innovation lies in re-architecting its search stack into atomic primitives, a complex engineering feat that many competitors have yet to replicate. While the core idea of programmable tools is established, the specific implementation of Search as Code in search systems represents a significant technical advancement.
“Perplexity’s Search as Code is a meaningful evolution in how AI systems can control and customize search pipelines dynamically.”
— Thorsten Meyer, AI researcher

LLMs in Enterprise: Design strategies, patterns, and best practices for large language model development
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Independent Validation and Benchmark Transparency
Many of SaC’s key results, including the WANDR benchmark, are based on proprietary data and have not yet been independently verified. The largest performance margin was demonstrated on a benchmark created by Perplexity itself, raising questions about reproducibility. Additionally, comparisons involving different models and architectures are not fully controlled, leaving some uncertainty about the precise advantages of SaC over existing methods.
Next Steps in Validation and Adoption
Expect independent researchers to attempt replication of SaC’s results, particularly on the proprietary benchmarks. Perplexity may release more detailed technical documentation and open-source components to facilitate validation. Meanwhile, industry observers will watch for broader adoption of programmable search pipelines and integration into existing AI systems, potentially setting new standards for control and efficiency in agent architectures.
Key Questions
How is Search as Code different from traditional search methods?
SaC replaces fixed search endpoints with a modular stack of primitives that the AI can control and assemble via generated code, enabling more flexible, precise, and efficient retrieval strategies.
Is SaC a completely new idea?
The concept of turning tools into executable code for AI control is not new; SaC is a specific implementation that re-architects the search stack into atomic primitives, which is a notable engineering achievement.
Will SaC work with all AI models?
Currently, Perplexity’s implementation uses GPT-5.5, and effectiveness may depend on the model’s reasoning capabilities. Broader applicability will depend on further testing and integration.
What are the main limitations of SaC so far?
Results are still preliminary, with some benchmarks proprietary and unverified independently. The approach also requires sophisticated engineering and may face challenges scaling across diverse tasks.
How might SaC influence future AI development?
SaC could lead to more controllable, efficient, and accurate AI systems by enabling models to generate tailored search pipelines, impacting agent design and retrieval strategies across the industry.
Source: ThorstenMeyerAI.com