📊 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 announced a new approach called Search as Code, allowing AI models to build custom search pipelines dynamically. This innovation aims to improve accuracy and control in retrieval tasks, marking a significant shift from traditional search methods.
Perplexity has unveiled a new framework called Search as Code (SaC), designed to transform how AI systems perform search tasks by enabling models to assemble retrieval pipelines dynamically. This development aims to address limitations in traditional search approaches, especially for complex, multi-step AI agent operations.
The core idea behind SaC is to move away from treating search as a fixed API or endpoint, instead exposing search components—retrieval, filtering, ranking, and rendering—as atomic, programmable primitives. These primitives are accessible via a Python SDK, allowing models to generate and execute code that customizes search pipelines on the fly.
Perplexity demonstrated SaC’s potential through a case study involving the identification and characterization of over 200 high-severity vulnerabilities (CVEs). They reported 100% accuracy and an 85% reduction in token usage compared to traditional methods, outperforming other systems significantly. The approach involves a three-stage process: fan-out over vendor-specific templates, targeted refinements via language models, and a schema-bound verifier to ensure precision.
Benchmark tests across multiple datasets also favored SaC, with the system leading in four out of five tests, and achieving a 2.5× improvement over competitors on the WANDR benchmark. These results suggest that the approach offers both higher accuracy and cost efficiency, especially in complex retrieval scenarios.
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 50 ft. No Spill Clean & Fill w Hook & 24" Extended Length Gravel Tube Bundle
The Python 50 ft. No Spill Clean & Fill w/ Python Hook & 24" Extended Length Gravel Tube…
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.

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.
Implications for AI Search and Retrieval Control
This development signals a shift toward more flexible, controllable search architectures for AI agents, enabling them to perform complex, multi-step retrieval tasks with higher precision. It challenges the traditional search paradigm, which relies on fixed pipelines and limits the model’s ability to tailor search strategies dynamically.
By exposing search components as programmable primitives, SaC allows models to adapt retrieval strategies in real-time, potentially improving performance in applications like cybersecurity, legal research, or scientific discovery. It also aligns with broader trends toward code-based control of AI systems, emphasizing transparency and customizability.

World's Best Artist
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search Architectures for AI Agents
The idea of replacing static search APIs with code-driven retrieval methods is not entirely new. Similar concepts have been explored in academic research, such as the CodeAct framework (ICML 2024) and the work by Anthropic on MCP (November 2025). These approaches leverage the natural coding ability of large language models to dynamically orchestrate retrieval and filtering processes, achieving higher success rates in complex tasks.
Perplexity’s innovation lies in re-architecting its own search stack into atomic, composable primitives, a move that requires significant engineering effort and represents a step beyond merely wrapping external APIs. While the conceptual foundation is established, practical implementation at scale remains an ongoing challenge for the industry.
“Search as Code transforms the retrieval process from a monolithic endpoint into a flexible, programmable pipeline, enabling models to tailor search strategies dynamically.”
— Thorsten Meyer, AI researcher at Perplexity
programmable search engine components
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Unverified Claims and Benchmark Limitations
Some results, particularly the WANDR benchmark improvements, are based on proprietary tests that have not yet been independently replicated. The benchmarks where SaC shows the largest gains are either self-authored or not fully published, raising questions about reproducibility. Additionally, the comparison involves different models (GPT-5.5 versus Opus 4.7), which complicates direct attribution of performance gains solely to SaC.
Further validation from independent research and wider industry testing is needed to confirm these claims and assess scalability across diverse applications.
Next Steps for Industry Adoption and Validation
Expect further independent testing and peer review of Perplexity’s SaC approach, especially regarding the proprietary benchmarks. Industry players may begin experimenting with code-based search pipelines, either inspired by SaC or developing similar architectures. Perplexity is likely to release more detailed technical documentation and open-source components to facilitate broader adoption.
Monitoring how these techniques perform in real-world, multi-domain scenarios will be critical to understanding their practical impact and limitations.
Key Questions
What is Search as Code (SaC)?
SaC is an approach that transforms traditional search into a programmable, modular process, allowing AI models to assemble and execute custom retrieval pipelines dynamically using code.
How does SaC improve over traditional search methods?
SaC offers greater control, flexibility, and efficiency by enabling models to tailor search strategies in real-time, reducing token usage and increasing accuracy in complex retrieval tasks.
Is this approach widely validated yet?
Not fully. While initial results are promising, independent replication and testing across diverse applications are still pending to confirm its effectiveness and scalability.
Will other companies adopt similar architectures?
It’s likely. The concept aligns with broader trends toward code-driven AI control, and industry players are exploring similar ideas, though implementation at scale remains challenging.
What are the main challenges ahead?
Scaling the architecture, ensuring reproducibility of benchmark results, and integrating these systems into existing workflows are key hurdles for wider adoption.
Source: ThorstenMeyerAI.com