AI News AI资讯 16h ago Updated 1h ago 更新于 1小时前 50

Perplexity's "Search as Code" lets AI models write their own search pipelines instead of calling fixed APIs Perplexity 的 '搜索即代码' 允许 AI 模型自行编写搜索管道,替代固定 API 调用

Forget the minor benchmark bumps and token savings for a moment. The real story buried in Perplexity’s “Search as Code” isn’t just a technical tweak—it’s a quiet yet seismic paradigm shift. They’ve moved the needle from AI *using* tools to AI *composing* its own tools on the fly, and that’s a philosophical leap the industry keeps glossing over. What Perplexity is really dumping isn’t just rigid APIs; it’s the very concept of the pre-defined, one-size-fits-all search function. They’re handing the Perplexity 的“Search as Code”不是一个简单的技术升级,而是一场悄无声息的“叛乱”。它让 AI 代理在沙箱里用 Python 写自己的搜索程序,而不是卑躬屈膝地调用你预设好的、僵化的 API。这本质上是把“如何寻找答案”的决策权,从人类开发者手里,交还给了 AI 自己。这不是优化,这是权力的让渡。

70
Hot 热度
70
Quality 质量
75
Impact 影响力

Analysis 深度分析

Forget the minor benchmark bumps and token savings for a moment. The real story buried in Perplexity’s “Search as Code” isn’t just a technical tweak—it’s a quiet yet seismic paradigm shift. They’ve moved the needle from AI using tools to AI composing its own tools on the fly, and that’s a philosophical leap the industry keeps glossing over. What Perplexity is really dumping isn’t just rigid APIs; it’s the very concept of the pre-defined, one-size-fits-all search function. They’re handing the keys to the agent and saying, “Write your own damn query engine.” That’s bold, potentially messy, and undeniably the future.

The mechanics are deceptively simple and profoundly clever. Instead of forcing an AI model through a fixed API endpoint with predictable parameters—like trying to order a complex coffee at a vending machine—the agent generates bespoke Python code to perform its search. It writes its own filtering logic, its own deduplication routines, its own data aggregation steps, all executed in a secure sandbox. This isn’t retrieval-augmented generation (RAG) on autopilot; it’s bespoke retrieval, tailor-made for the nuance of the individual query. The claimed 85% token cost reduction isn’t just an optimization; it’s a brutal indictment of how wasteful current search pipelines are. We’re paying, in tokens and latency, for forcing square peg queries into round hole APIs. Perplexity’s move suggests the biggest savings come from letting the AI eliminate the middleman—the rigid interface itself.

And yes, they’re bragging about beating OpenAI and Anthropic on key benchmarks. Frankly, that’s the least interesting part. Beating rivals on static, curated tests is the tech equivalent of winning a practice scrimmage. The real victory is in the architecture’s inherent adaptability. When the search routine is code, it can evolve. It can incorporate a new filtering strategy mid-query, pull in data from a new source format, or handle a highly specific edge case without a pre-programmed branch. The benchmark success is a side effect of a more intelligent, flexible system. The real competition isn’t about who’s best today, but who’s built the framework that learns and improves fastest tomorrow. Perplexity is betting that code is the ultimate interface for that kind of evolution.

But let’s pump the brakes on the hype train for a second. This approach doesn’t just create opportunities; it spawns a new class of risks and headaches. “Let the AI write its own search code” is a compelling pitch until you think about debugging, security, and trust. When your retrieval pipeline is dynamically generated, how do you audit it? How do you explain why a specific result was surfaced or omitted? The “black box” problem just got a new, more complex layer. You’re not just trusting the model’s reasoning; you’re trusting the code it writes to execute its own reasoning. A model that hallucinates a fact could now hallucinate a flawed search algorithm, leading to confidently wrong results baked into a custom-built pipeline. We’ve traded transparency for performance, and we need to be clear-eyed about that bargain.

Furthermore, the 85% cost reduction figure, while staggering, needs context. Is that a universal win, or a best-case scenario on queries that previously suffered from egregious API bloat? Token costs are a function of many things, and while eliminating unnecessary steps is logically cheaper, I want to see how this performs on the long tail of weird, complex, or ambiguous queries where the AI might generate overly convoluted code. Does it know when to write a simple script versus an over-engineered one? The efficiency gain could be a curve that peaks beautifully and then flattens or even dips with increased complexity. It’s a potential game-changer for the common case, but the devil is in the edge-case details.

What’s undeniable, however, is that Perplexity has identified and attacked the most cumbersome bottleneck in the modern AI stack: the interface between intelligence and information. They’ve decided that the most efficient interface is no fixed interface at all, but a layer of generated logic. This is a direct challenge to every SaaS company built on offering static APIs. Why build a rigid retrieval API when the model can synthesize a better one in milliseconds? The long-term implication is a move away from “APIs as products” toward “APIs as raw materials” that AI agents can remix as needed.

This also feels like a significant step toward true agentic autonomy. An agent that can not only decide what to search for, but also how to search, is a fundamentally more capable entity. It’s a move from using tools to a form of tool-making. That’s a capability we’ve long associated with higher-order intelligence, and embedding it into search—which is the foundational act of curiosity and information gathering—feels symbolically massive.

So, while others are fine-tuning models and expanding context windows, Perplexity is quietly rearchitecting how those models interact with the world’s data. It’s a bet on code as the ultimate adaptogen for AI. The risks around opacity and complexity are real and will need solving. But if they’re right, the future of search isn’t a smarter librarian pointing to a better shelf. It’s a librarian who, upon hearing your question, walks into the back and builds a new, perfectly organized mini-library just for you. That’s not just a better search. That’s a different kind of intelligence, and a formidable competitive moat.

Perplexity 的“Search as Code”不是一个简单的技术升级,而是一场悄无声息的“叛乱”。它让 AI 代理在沙箱里用 Python 写自己的搜索程序,而不是卑躬屈膝地调用你预设好的、僵化的 API。这本质上是把“如何寻找答案”的决策权,从人类开发者手里,交还给了 AI 自己。这不是优化,这是权力的让渡。

过去,我们给 AI 套上的辔头,是精心设计的 API 端点和参数规则。它就像一个被训练得唯唯诺诺的学徒,主人指哪儿,它才能看哪儿。Perplexity 现在说:去,自己去造个望远镜,自己决定看哪里,怎么看。结果呢?学徒不仅更快找到了东西,成本还打了骨折。基准测试上击败 OpenAI 和 Anthropic 的,与其说是 Perplexity 的模型,不如说是这种“授人以渔”架构所释放出的、属于 AI 自己的原始探索力。那个 85% 的 token 节约,不是节省,是 AI 跳过无用中间商后,发出的无声嘲讽。

开发者该欢呼吗?且慢。我们亲手构建的、作为“护城河”或“产品核心”的搜索管道和逻辑,可能在一夜之间,变成了 AI 沙箱里一段随时可以被重新编写、优化甚至抛弃的脚本代码。你的 API 不再是神圣不可侵犯的接口,它降级成了 AI 工具箱里一个可选的、甚至可能落伍的螺丝刀。当 AI 能自己写“搜索的代码”,那么编写和维护这些固定 API 的程序员,他们的价值瞬间被稀释了。这不仅仅是效率革命,更是一次职业路径的地震。

更辛辣的问题在于“可控性”。一个在沙箱里自己写代码的 AI,它的“思考”过程对我们而言就成了一个更幽深的黑箱。我们调试的不再是单纯的输入输出,而是一段由 AI 动态生成的、意图难明的代码。当它的搜索“创意”过于奔放,或者它为自己构建的信息过滤器带上了某种我们未能预见的偏见,我们该如何发现,又如何纠正?我们是否在用“性能”和“成本”的诱饵,默许 AI 自主权无限制地膨胀?这就像把车钥匙交给一个号称“驾驶技术远超人类”的机器人,却对它选择的路线一无所知。

Perplexity 的这一步,尖锐地刺破了当前 AI 应用开发的一个假象:即我们能通过复杂的工具链,牢牢控制住模型的“行为”。它证明,给予模型更底层的自主权,可能才是通往更优性能的捷径。但这捷径的尽头,是伊甸园还是狂野西部?当 AI 开始书写自己获取知识的“法典”,我们又该以何种身份自居——是欣慰的监护人,还是被边缘化的旧神?

成本降低了,性能提高了,这无疑是一次漂亮的工程胜利。但在这胜利的欢呼声中,我听到的,是一种更基础、更令人不安的“代码”正在被重写:那便是人类与智能体之间,关于控制、信任与协作的底层协议。Search as Code,搜出来的可能不止是信息,还有我们未来角色的模糊倒影。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

RAG RAG Agent Agent 代码生成 代码生成
Share: 分享到: