메뉴
BL
The Decoder 52일 전

퍼플렉시티 '코드로 하는 검색', AI가 직접 파이프라인 작성

IMP
9/10
핵심 요약

퍼플렉시티가 AI 모델이 고정된 검색 API를 호출하는 대신, 직접 파이썬 코드를 작성해 검색 파이프라인을 구축하는 '코드로 하는 검색(Search as Code)' 아키텍처를 발표했습니다. 이를 통해 AI 에이전트는 병렬 검색, 필터링 등을 코드로 제어하여 검색 정확도를 크게 높이고 컨텍스트 낭비를 줄일 수 있습니다. 실제 보안 취약점(CVE) 분석 테스트에서 기존 대비 토큰 사용량을 85% 줄이며 경쟁사 대비 뛰어난 성능을 입증했습니다.

번역된 본문

퍼플렉시티의 '코드로 하는 검색(Search as Code)'은 AI 모델이 고정된 API를 호출하는 대신 자체적인 검색 워크플로를 파이썬 코드로 작성할 수 있게 해줍니다. 이 회사는 더 정확한 결과와 적은 토큰 사용량을 약속합니다.

AI 에이전트가 복잡한 리서치 작업을 수행하는 것을 지켜본 사람이라면 누구나 같은 패턴을 보았을 것입니다. 모델이 쿼리를 작성하면, 검색 API가 결과 목록을 반환하고, 모델은 이를 읽은 후 다음 쿼리를 작성합니다. 이 루프는 종종 여러 번 연속해서 반복됩니다.

퍼플렉시티는 새로운 기술 보고서에서 이를 병목 현상이라고 부릅니다. 오늘날의 검색 엔진은 깔끔한 파란색 링크 목록을 원하는 사람들을 위해 설계되었지만, 몇 분 안에 수백 건의 검색을 실행하려는 AI 에이전트에게는 이 설정이 너무 경직되어 있습니다. 에이전트는 검색어만 조정할 수 있을 뿐, 나머지는 모두 블랙박스입니다.

'코드로 하는 검색(Search as Code, SaC)'은 이러한 역학을 변화시킵니다. API를 호출하는 대신, 모델이 검색을 실행하기 위한 맞춤형 파이썬 스크립트를 작성합니다. 이 스크립트는 안전한 샌드박스에서 실행되며 퍼플렉시티의 검색 백엔드에서 데이터를 가져옵니다. 검색, 필터링, 중복 제거 및 재순위 지정과 같은 기본 작업은 간단한 SDK 기능으로 패키징됩니다.

세 가지 계층: 모델, 샌드박스, SDK 이 아키텍처는 세 가지 계층으로 나뉩니다. 최상단에는 작업을 이해하고 검색 전략을 결정하는 모델이 있습니다. 중간에는 코드가 실행되는 샌드박스가 있습니다. 최하단에는 퍼플렉시티의 검색 엔진을 개별적으로 분해해 조합할 수 있는 기능으로 만드는 '에이전트 검색 SDK(Agentic Search SDK)'가 있습니다.

빠른 질문에는 여전히 표준 검색 API가 사용됩니다. 하지만 까다로운 리서치의 경우 모델이 훨씬 더 깊이 들어갈 수 있습니다. 병렬 쿼리를 실행하고, 프로그래밍 방식으로 노이즈를 필터링하며, 관련 결과만 컨텍스트 창(context window)으로 가져올 수 있습니다.

퍼플렉시티에 따르면 여기서 승리 요인이 나옵니다. 표준 검색 파이프라인은 필터링 로직이 고정되어 있어 에이전트의 컨텍스트 창을 쓸모없는 데이터로 채웁니다. 에이전트가 자체 필터를 작성하면 컨텍스트가 간결해지고, 모델은 긴 리서치 세션 동안 맥락을 잘 유지할 수 있습니다.

CVE 연구로 차이를 입증하다 퍼플렉시티는 이것이 실제 세계에서 어떻게 작동하는지 보여주기 위해 복잡한 사이버 보안 작업으로 테스트했습니다. 에이전트는 2023년에서 2025년 사이에 발표된 200개의 중요한 소프트웨어 취약점(CVE)을 추적해야 했습니다. 각 취약점에 대해 공식 벤더 권고문, 영향을 받는 소프트웨어 및 버그를 수정한 정확한 버전을 찾아야 했으며, 뉴스 기사나 블로그 게시물은 유효하지 않았습니다.

SaC를 통해 모델은 3단계 스크립트를 작성했습니다. 모질라나 구글 같은 특정 벤더들이 보안 공지를 작성하는 방식에 맞춰 병렬 검색을 실행했습니다. 다음으로 자체 검색 결과를 스캔하고 빈틈을 찾아낸 뒤, 타겟팅된 후속 쿼리를 실행했습니다. 마지막으로 스키마를 사용하여 CVE, 제품 및 수정 버전이 모두 일치하는지 확인했습니다.

작업은 성공적이었습니다. 퍼플렉시티에 따르면 에이전트는 표준 파이프라인보다 85% 적은 토큰을 사용하면서도 이 작업을 완벽하게 해냈습니다. 경쟁 시스템은 데이터의 4분의 1도 채 맞추지 못했습니다.

퍼플렉시티는 SaC가 5개 벤치마크 중 4개에서 OpenAI의 'Responses API'와 Anthropic의 'Managed Agents' 같은 경쟁사를 이겼다고 주장합니다. 가장 큰 격차는 광범위한 리서치 작업을 위한 자체 벤치마크인 'WANDR'에서 나타났으며, 이 벤치마크는 곧 공개할 예정입니다. 물론 자체 보고한 벤치마크는 약간 비판적으로 받아들여야 하지만, 퍼플렉시티의 이전 아키텍처와의 비교는 성능에서 명확하고 엄청난 도약을 보여줍니다.

AI의 운영 계층으로서의 코드 퍼플렉시티는 SaC를 더 큰 트렌드의 일환으로 봅니다. 전통적인 소프트웨어는 결정론적(deterministic) 명령어에 의존합니다. 최첨단 모델은 토큰 공간에 추론을 추가합니다. 가장 유능한 시스템은 둘을 결합합니다. 전략을 위한 모델, 배치 및 필터링을 위한 결정론적 런타임, 그리고 입출력(I/O) 계층으로서의 검색 인프라입니다.

코드로 하는 검색(Search as Code)은 현재 퍼플렉시티 컴퓨터(Computer)와 에이전트 API(Agent API)에 출시되고 있습니다. 이 업그레이드는 두각을 나타내는 문제를 해결할 수 있을 것입니다.

원문 보기
원문 보기 (영어)
Perplexity's "Search as Code" lets AI models write their own search pipelines instead of calling fixed APIs Jonathan Kemper View the LinkedIn Profile of Jonathan Kemper Jun 7, 2026 Nano Banana Pro prompted by THE DECODER Instead of calling a ready-made search API, models in Perplexity's new "Search as Code" architecture write their own search workflows as Python code. The company promises more precise results and lower token usage. Anyone who's watched an AI agent tackle a complex research task has seen the same pattern. The model writes a query, a search API returns a list of results, the model reads them, and then writes the next query. This loop repeats, often many times in a row. Perplexity calls this a bottleneck in a new technical report. Today's search engines were built for humans who want a neat list of blue links, but for an AI agent trying to run hundreds of searches in a few minutes, that setup is too rigid. The agent can only tweak the search term; everything else is a black box. "Search as Code" (SaC) changes that dynamic. Instead of calling the API, the model writes a custom Python script to run the search. The script runs in a secure sandbox, pulling from Perplexity's search backend. Basic operations like retrieving, filtering, deduplicating, and reranking are packaged as simple SDK functions. Three layers: model, sandbox, SDK The architecture breaks down into three layers. At the top sits the model, which understands the task and decides on a search strategy. In the middle is the sandbox where the code runs. At the bottom is the "Agentic Search SDK," which breaks Perplexity's search engine into individual, mix-and-match functions. Standard search APIs are still there for quick questions. But for tough research, the model can go much deeper. It can fire off parallel queries, filter out the noise programmatically, and pull only relevant hits into its context window. According to Perplexity , that's where the win is. Standard search pipelines stuff an agent's context window with junk because the filtering logic is locked in. When the agent writes its own filters, the context stays lean, and the model keeps its bearings across long research sessions. CVE research shows the difference To show how this works in the real world, Perplexity tested it on a messy cybersecurity task. An agent had to track down 200 critical software vulnerabilities (CVEs) published between 2023 and 2025. For each one, it needed to find the official vendor advisory, the affected software, and the exact version that patched the bug. News articles or blog posts didn't count. With SaC, the model wrote a three-stage script. It ran parallel searches tailored to how specific vendors like Mozilla or Google format their security bulletins. Next, it scanned its own findings, spotted the gaps, and ran targeted follow-up queries. Finally, it used a schema to verify that the CVE, product, and fix version all lined up. It worked. Perplexity says the agent nailed the task while using 85 percent fewer tokens than its standard pipeline. Competing systems got less than a quarter of the data right. Perplexity claims SaC beat rivals like OpenAI's Responses API and Anthropic's Managed Agents on four out of five benchmarks. The biggest gap was on "WANDR," Perplexity's own benchmark for broad research tasks, which it plans to release soon. Of course, take self-reported benchmarks with a grain of salt, but the comparison against Perplexity's own older architecture shows a clear, massive leap in performance. Code as the operational layer for AI Perplexity frames SaC as part of a bigger trend. Traditional software relies on deterministic instructions. Frontier models add reasoning in token space. The most capable systems combine both: models for strategy, deterministic runtimes for batching and filtering, and search infrastructure as an I/O layer. Search as Code is rolling out now in Perplexity Computer and the Agent API. This upgrade could solve a glaring issue with current AI search. A recent study found that popular search agents often cheat on benchmarks like BrowseComp. Instead of scanning the live web, they simply pull answers from their training data and use search to confirm what they already know . When tested on a new benchmark with fresh facts, every single system saw its score plunge by 25 to 40 points. But those systems were all using standard search tools. A separate survey paper suggests that writing code is becoming the default way agents interact with the world. It describes code as a new operational layer for agents and argues that the surrounding infrastructure of tools, sandboxes, and verification mechanisms is becoming the real bottleneck for autonomous systems. AI News Without the Hype – Curated by Humans Subscribe to THE DECODER for ad-free reading, a weekly AI newsletter, our exclusive "AI Radar" frontier report six times a year, full archive access, and access to our comment section. Subscribe now --> Read on for the full picture. Subscribe for hype-free coverage. Access to all THE DECODER articles. Read without distractions – no Google ads. Access to comments and community discussions. Weekly AI newsletter. 6 times a year: “AI Radar” – deep dives on key AI topics. Up to 25 % off on KI Pro online events. Access to our full ten-year archive. Get the latest AI news from The Decoder. Subscribe to The Decoder -->