Perplexity has introduced a new search architecture called 'Search as Code' that lets AI models create their own search pipelines instead of relying on fixed APIs. The company claims this approach improves precision and reduces token usage. The system enables models to generate custom Python scripts that run in a secure sandbox environment, accessing Perplexity's search backend through a set of SDK functions. This allows for more flexible and efficient search operations compared to traditional methods.

The architecture is structured into three layers: the model, which determines the search strategy; the sandbox, where the code executes; and the Agentic Search SDK, which provides modular functions for search operations. This setup allows models to perform complex tasks like parallel queries, filtering, and data verification. Perplexity tested the system on a cybersecurity task involving 200 critical software vulnerabilities, where the model successfully completed the task using 85% fewer tokens than the standard pipeline.

In the source text, Perplexity highlights the advantages of its new approach, particularly in research scenarios where standard search pipelines often include irrelevant data. The company claims that Search as Code outperforms existing systems on most benchmarks, including its own 'WANDR' benchmark for broad research tasks. The system is now available in Perplexity Computer and the Agent API, marking a step toward more efficient AI search operations.

Source: thedecoder