📊 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 method called Search as Code (SaC) that allows AI models to build custom search pipelines dynamically. This approach aims to improve accuracy and efficiency in complex, multi-step retrieval tasks. The development is significant but faces questions about independent validation and broader applicability.
Perplexity has introduced a new search architecture called Search as Code (SaC), which allows AI models to dynamically assemble custom search pipelines instead of relying on fixed search endpoints. This development aims to address limitations in traditional search methods when used in complex, multi-step AI tasks, marking a significant shift in how search is integrated into AI systems.
Perplexity’s SaC approach exposes the internal components of the search stack—retrieval, filtering, ranking, and rendering—as atomic, programmable primitives accessible via a Python SDK. The AI model acts as the control layer, generating code to orchestrate these primitives in real-time, enabling more flexible, task-specific search strategies. This method contrasts with conventional search APIs that treat search as a monolithic service, limiting control and customization.
In a case study focused on identifying and characterizing over 200 high-severity software vulnerabilities, SaC achieved 100% accuracy while reducing token usage by 85%, outperforming other systems that scored under 25%. The system employed a three-stage process: broad fan-out over vendor advisories, targeted refinements via an LLM, and a schema-bound verifier to ensure precision. These results suggest that code-driven search pipelines can significantly improve both accuracy and efficiency in complex retrieval tasks.
Perplexity reports that SaC outperforms most existing benchmarks, leading in four out of five tests, and matches OpenAI on the fifth, with a notable 2.5× margin on the WANDR benchmark. The approach also demonstrates lower cost at similar or better performance levels, indicating potential operational advantages for AI applications requiring extensive search capabilities.
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

Data Science on AWS: Implementing End-to-End, Continuous AI and Machine Learning 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.
Python SDK for search automation
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Implications for AI Search and Retrieval Strategies
This development signals a potential paradigm shift in how AI systems perform search, moving from static, fixed pipelines to dynamic, code-based retrieval strategies. By enabling models to write and execute custom search code, SaC could improve accuracy and efficiency in complex, multi-step tasks such as software vulnerability analysis, legal research, or scientific discovery. This approach also aligns with broader trends toward more autonomous, adaptable AI agents that can tailor their search processes to specific problems.
However, the approach’s reliance on internal re-architecture and programmable primitives raises questions about its replicability and scalability across different platforms and models. If validated independently, SaC could influence future AI system design, pushing toward more flexible and controllable search architectures. Its success may also accelerate the adoption of code-centric methods in other AI toolchains, potentially transforming the landscape of AI-driven information retrieval.

Pro Tools Perpetual License NEW 1-year software download with updates + support for a year
Full version, permanent License of Avid Pro Tools. Includes 1-Year of software updates and upgrades.
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Evolution of Search in AI and Agent Architectures
Traditional search systems, inherited from human-designed web search engines, treat search as a fixed pipeline: accept a query, process through predefined stages, and return results. This model proved effective for static information retrieval but falters in complex AI tasks requiring multiple, iterative retrievals. Since 2022, companies like Perplexity have pioneered AI-optimized search engines that incorporate reasoning, but these systems still rely heavily on monolithic APIs.
The concept of using code to orchestrate search processes is not new. The CodeAct framework (ICML 2024) and Cloudflare’s Code Mode have demonstrated that turning tools into executable code improves success rates and control. Similarly, Anthropic’s MCP (November 2025) showed that embedding tools as sandboxed code reduces context load and improves scalability. Perplexity’s SaC builds on these ideas by re-architecting its search stack into atomic, programmable primitives, enabling the model to generate tailored retrieval pipelines in real-time.
“Search as Code fundamentally changes how AI models can control and customize their retrieval strategies, offering a new level of flexibility and precision.”
— Thorsten Meyer, AI researcher at Perplexity

24" Magnetic Pickup Tool with 4-Claw Grabber -Flexible Retrieval Tool for Metal Objects in Tight Spaces (Engine, Sink, Drains, Jewelry)
Precision Design: 0.4" to 1.38" adjustable claw span Orientable 24" alloy shaft for tight spaces
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Validation and Broader Applicability of SaC
It remains unclear whether SaC’s impressive results can be independently replicated outside Perplexity’s internal environment. The key benchmark where SaC achieved the largest margin, WANDR, has not yet been published or peer-reviewed, raising questions about its generalizability. Additionally, the comparison involves different models and configurations, complicating direct performance assessments. The scalability of this approach across diverse AI platforms and tasks is also still uncertain, as the method requires significant internal re-architecture of the search stack.
Independent Testing and Industry Adoption
Next steps include independent replication of SaC’s benchmarks and broader testing across different AI models and tasks. External validation will determine whether SaC’s approach can become a standard in AI search architectures. Additionally, industry players may experiment with integrating code-driven search pipelines into their systems, potentially leading to new standards for flexible, agent-oriented retrieval strategies. Monitoring how Perplexity and competitors develop these ideas will be key in assessing the future landscape of AI search technology.
Key Questions
What is Search as Code (SaC)?
SaC is an approach where AI models generate and execute custom search pipelines by assembling primitive components of the search stack in code, enabling more flexible and precise retrieval strategies.
How does SaC improve over traditional search methods?
SaC allows models to control and customize each stage of the search process dynamically, reducing token usage, increasing accuracy, and enabling complex, multi-step retrieval tasks that fixed APIs struggle with.
Has SaC been independently validated?
As of now, the results are based on Perplexity’s internal tests and proprietary benchmarks. External validation and replication are still needed to confirm its effectiveness broadly.
Will SaC replace existing search APIs?
It is too early to say. SaC represents a promising direction that could complement or eventually replace traditional search methods in AI systems, pending further validation and development.
What are the potential limitations of SaC?
The approach requires significant internal re-architecture and may face challenges in scalability, generalizability, and integration across different AI platforms and models.
Source: ThorstenMeyerAI.com