Rethinking search as code generation

research.perplexity.ai
June 2, 2026
23 min read
47/100
Summary
Search is evolving from monolithic services to programmable primitives to enhance AI systems. As frontier models advance, they require access to fresh, accurate, and well-curated knowledge, making search a foundational component for drawing conclusions and performing actions in AI products.
Key Takeaways
- Perplexity introduced a new search architecture called Search as Code (SaC), which allows AI agents to access and control search primitives directly within their harnesses.
- Traditional search systems are becoming outdated as users demand more complex, end-to-end task completion from AI agents, requiring a shift from monolithic architectures to more flexible, programmable search components.
- The new architecture enables AI models to exert fine-grained control over search processes, enhancing their ability to retrieve and process information effectively.
- Perplexity's search stack currently serves thousands of queries per second and is continuously optimized through self-improvement loops to better meet user needs.
Coverage & discussions
Hacker News · research.perplexity.ai
Community discussions
Historical count: 5 · 5 saved in sample · Historical sample
Analysis ready
Community Sentiment
Positives
- The proposed approach could significantly enhance coding agents' efficiency by enabling a more structured search strategy, potentially reducing the number of iterations needed.
- Integrating a multi-stage search pipeline may streamline the process, allowing coding agents to fan out searches and filter results more effectively.
Concerns
- There are concerns about the model's ability to understand complex codebases, which may hinder its effectiveness in generating accurate search queries.
- The potential for customer support issues arises from the generated code not always executing queries optimally, which could lead to user frustration.
Related Articles

Schema Harness Achieves ~99% on Arc‑AGI‑3 Public
Jul 16, 2026

Composition Shouldn't be this Hard
Apr 24, 2026

Prime Agent: A self-improving RLM agent
Aug 5, 2026
The Agentic AI Handbook: Production-Ready Patterns
Jan 21, 2026

Why Software Factories Fail (or: harness engineering is not enough)
Jul 23, 2026