📊 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 (SaC), allowing AI systems to dynamically assemble search pipelines. While promising, the concept builds on existing ideas, and independent validation is pending.
On June 1, 2026, Perplexity announced the release of Search as Code (SaC), a new framework designed to overhaul how AI systems perform search. This development aims to enable AI agents to dynamically assemble custom retrieval pipelines, moving beyond traditional search models that treat search as a fixed, monolithic process. The announcement underscores Perplexity’s push to improve control, efficiency, and accuracy in AI-driven search operations, which is vital for complex multi-step tasks.
Perplexity’s SaC approach reimagines the search stack as a set of composable primitives—retrieval, filtering, ranking, and rendering—that are accessible via a Python SDK. This allows AI models to generate and execute code that precisely controls how search results are retrieved and processed, rather than relying on static endpoints. The company demonstrated SaC’s effectiveness through a case study involving the identification of over 200 high-severity vulnerabilities, achieving 100% accuracy and reducing token usage by 85% compared to traditional methods.
In benchmark tests, SaC outperformed existing systems on multiple datasets, including the company’s own WANDR benchmark, where it achieved a 2.5× improvement over competitors. These results suggest that SaC enables more efficient, accurate, and adaptable search strategies by allowing AI to craft bespoke retrieval pipelines on the fly. However, the company notes that some of these benchmarks, such as WANDR, are proprietary and have not been independently validated.
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

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
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.
Python SDK for search customization
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications of Search as Code for AI Search Strategies
This development is significant because it addresses a core limitation of current search systems: the rigidity of fixed pipelines that cannot adapt to complex, multi-step tasks performed by AI agents. By enabling models to generate and execute custom retrieval code, SaC could lead to more precise, context-aware search operations, improving AI’s ability to handle nuanced queries and large-scale information retrieval. It also signals a shift towards more modular, controllable AI architectures that can be tailored to specific use cases, potentially transforming how AI systems interact with data sources.

A Simple Guide to Retrieval Augmented Generation
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search and the Rise of Code-Driven Retrieval
Traditional search systems, inherited from the human era, rely on fixed pipelines that accept a query and return a set of results. Recent advances, including AI-optimized search engines like Perplexity’s own answer engine, have improved relevance but still depend on monolithic endpoints. The idea of using code to orchestrate search operations has been explored in academic research and smaller projects, such as the ICML 2024 CodeAct paper, which demonstrated that models trained on code perform better at executing complex retrieval tasks. Prior efforts like Hugging Face’s smolagents and Cloudflare’s Code Mode have laid the groundwork for turning search tools into programmable APIs. Perplexity’s innovation is to re-architect its entire search stack into atomic primitives, allowing AI models to generate tailored code pipelines, rather than relying on external APIs or static configurations.
“Search as Code fundamentally shifts control from fixed endpoints to dynamic, model-generated pipelines, unlocking new levels of precision and adaptability.”
— Thorsten Meyer, AI researcher at Perplexity

ANCEL AD310 Classic Enhanced Universal OBD II Scanner Car Engine Fault Code Reader CAN Diagnostic Scan Tool, Read and Clear Error Codes for 1996 or Newer OBD2 Protocol Vehicle (Black)
CEL Doctor: The ANCEL AD310 is one of the best-selling OBD II scanners on the market and is…
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Independent Testing of Search as Code
While Perplexity reports promising benchmark results, some key claims—such as the 2.5× improvement on WANDR—are based on proprietary benchmarks that have not yet been independently validated. The broader applicability of SaC across different models and real-world scenarios remains to be seen, and some aspects, like state management and multi-turn execution, are still under investigation. Additionally, the approach builds on prior academic work, indicating that SaC is not entirely novel but an engineering advancement in an existing conceptual framework.
Future Validation, Adoption, and Open Benchmarking
Moving forward, independent researchers and industry players will likely scrutinize Perplexity’s claims through replication and testing on open datasets. The company plans to release more detailed technical documentation and possibly open-source components of SaC to facilitate broader adoption and validation. Watch for updates on how SaC performs in diverse environments, its integration into other AI systems, and whether competitors adopt similar programmable search architectures. Further, validation on external benchmarks will be crucial to establish SaC’s effectiveness beyond proprietary tests.
Key Questions
What is Search as Code (SaC)?
SaC is a framework that allows AI systems to generate and execute custom search pipelines by assembling composable primitives—retrieval, filtering, ranking, and rendering—via code, rather than relying on fixed search endpoints.
How does SaC improve search for AI agents?
It enables AI models to control how search results are retrieved and processed dynamically, leading to more precise, context-aware, and efficient retrieval strategies, especially for complex multi-step tasks.
Are the benchmark results from Perplexity independently verified?
No, the reported results are based on proprietary benchmarks, and independent validation is still pending. Caution is advised when interpreting these claims.
Is SaC a completely new idea?
No, the concept of turning tools into code APIs for better control has been explored in prior research and projects. Perplexity’s contribution is in re-architecting its search stack into atomic primitives for the first time at this scale.
What are the next steps for SaC?
Perplexity plans to release more technical details, promote independent testing, and explore broader adoption. Validation on external benchmarks will be key to confirming its effectiveness.
Source: ThorstenMeyerAI.com