Perplexity cuts token costs 85% by letting models write their own search code
perplexity introduced search as code, an architecture where models write custom python search pipelines instead of calling fixed apis. this promises 85% lower token usage and better data precision for complex research agents.
perplexity detailed its new search as code architecture, which replaces standard api calls with model-generated python scripts that execute in a secure sandbox. by using an agentic search sdk, models can perform custom retrieval, filtering, and reranking to keep context windows lean and improve result accuracy. the company demonstrated this on a cybersecurity task tracking 200 vulnerabilities, where the agent used 85% fewer tokens and outperformed standard pipelines. this approach challenges the dominant fixed api paradigm, suggesting that giving models programmatic control over search logic may be more efficient than universal, black-box tools.