AI News

MIT 與 Asari AI 推出 EnCompass:可靠 AI 代理(AI agents)的範式轉移

自主 AI 代理(Autonomous AI agents)的開發長期以來一直受到一個持久挑戰的阻礙:複合錯誤問題。隨著大型語言模型(LLMs)執行複雜的多步工作流,單次幻覺(hallucination)或邏輯失誤都可能使整個過程偏離軌道,導致長時間運行的代理在關鍵企業任務中變得不可靠。在下週宣布的一項重大突破中,來自 MIT 計算機科學與人工智慧實驗室(CSAIL)和新創公司 Asari AI 的研究人員展示了 EnCompass,這是一個旨在透過從根本上重新想像代理執行程式碼的方式,來解決這一可靠性危機的新穎框架。

EnCompass 在 NeurIPS 2025 會議上發表,並在一篇廣泛討論的論文中進行了詳細闡述,該框架將「推論時間搜索(inference-time search)」的概念引入至代理程式編寫中。藉由將代理的核心邏輯與用於搜索正確結果的策略解耦,該框架允許開發者實現複雜的錯誤恢復機制——例如回溯和並行探索——而無需重寫其整個代碼庫。

挑戰:「程式控制」代理的脆弱性

要理解 EnCompass 的重要性,必須首先了解現代 AI 代理的架構。許多企業級代理運行在「程式控制(program-in-control)」模型上,開發者定義一個特定的工作流(例如「翻譯這段程式碼」、「分析這份財務報告」、「生成一個假設」),並調用 LLM 來執行特定的子任務。

雖然功能強大,但這些系統非常脆弱。LLM 具有非決定性;它們可能在前一刻提供精闢的答案,而在下一刻產生幻覺。在涉及數十個步驟的工作流中,發生致命錯誤的機率趨近於必然。傳統上,開發者試圖透過編寫大量的「膠水程式碼(glue code)」來緩解這種情況——手動循環、重試邏輯和條件檢查以捕獲錯誤。然而,這種方法通常會導致代碼庫臃腫且難以管理,錯誤處理邏輯甚至超過了實際的任務邏輯。

EnCompass 透過將代理的執行視為一個搜索問題而非線性路徑來解決此問題。 框架並非寄望於模型在每一步都正確,而是承認「正確」的路徑隱藏在可能性樹中,並提供了高效導航該樹的工具。

將邏輯與搜索解耦:PAN 模型

EnCompass 的核心在於一項名為**概率天使非決定論(Probabilistic Angelic Nondeterminism)(PAN)**的理論創新。這種編程模型允許開發者將「要做什麼」(代理應執行的步驟序列)與「如何做」(用於導航這些步驟的策略)分開編寫。

在實踐中,這是透過 Python 裝飾器 @encompass.compile 實現的。當開發者使用此裝飾器包裹其代理函數時,EnCompass 會將工作流編譯為一個搜索空間。程式碼中查詢 LLM 的點被視為「分支點」——執行可以分叉的道路分歧點。

這種分離提供了深遠的好處:

  • 模組化: 開發者可以透過更改單個參數來更改搜索策略(從簡單取樣切換到複雜的樹搜索),而無需觸動工作流程式碼。
  • 整潔性: 核心邏輯保持可讀並專注於任務,去除了複雜的重試循環。
  • 強大功能: 以前難以手動實現的高級搜索演算法在預設情況下變得觸手可及。

技術深入探討:回溯與並行執行

EnCompass 框架 賦予了代理模仿人類解決問題的能力。當人類專家遇到死胡同時,他們會回溯到之前的假設並嘗試不同的方法。EnCompass 使 AI 代理能夠以程式化的方式執行相同的操作。

該框架開箱即用地支持多種搜索策略,允許開發者根據使用場景優化速度、成本或準確性。

表格:EnCompass 支持的搜索策略

策略 描述 最佳使用場景
束搜索(Beam Search) 並行探索多條有希望的路徑,在每一步僅保留前 k 個候選者。 需要在廣度與速度之間取得平衡的高風險任務。
蒙地卡羅樹搜尋(Monte Carlo Tree Search, MCTS) 使用模擬來估計當前選擇的長期價值,將資源集中在最有希望的分支上。 複雜的多步推理任務,其中早期決策具有延遲影響。
N 選一取樣(Best-of-N Sampling) 生成多個獨立的解決方案,並根據驗證器評分選擇最佳方案。 具有易於驗證輸出的任務,例如程式碼生成或數學問題。
回溯(Backtracking, DFS) 深入探索一條路徑,如果滿足失敗條件,則返回到之前的狀態。 資源受限的環境,其中找到「一個」有效解決方案即足夠。

藉由將這些策略標準化,EnCompass 允許嘗試將 Java 代碼庫翻譯為 Python 的代理同時探索棘手函數的多個翻譯選項。如果一條路徑導致程式碼無法編譯,代理可以丟棄它並繼續使用可行的替代方案,這一切都由運行時引擎自動處理。

經過驗證的效能:Java 轉 Python 案例研究

研究人員透過嚴格的基準測試驗證了 EnCompass,其中最著名的是一個涉及將 Java 儲存庫自動翻譯為 Python 的案例研究——這項任務以需要高精度和上下文感知而聞名。

正如 MIT CSAIL 公告中所詳述的,結果非常驚人。與未使用搜索的標準代理相比,經 EnCompass 增強的代理在翻譯準確性上提高了 15% 到 40%。對於開發者社群來說,更令人印象深刻的可能是程式碼複雜性的降低。透過 EnCompass 實現搜索邏輯所需的程式碼行數比手動實現相同功能減少了約 80%

這種效率的提升表明 EnCompass 可能會使強大 AI 代理的創建變得大眾化。以前無法負擔構建自定義搜索演算法工程開銷的小型團隊,現在可以部署可靠性媲美科技巨頭所構建的代理。

行業影響:規模化的可靠性

對於企業部門而言,EnCompass 的到來標誌著 AI 工程的成熟。我們正在從「提示工程(prompt engineering)」時代——調整文本以誘導模型工作——轉向「流程工程(flow engineering)」和「搜索工程(search engineering)」,在這些領域中,系統架構保證了可靠性。

Zhening Li,該研究的第一作者,同時也是 MIT CSAIL 和 Asari AI 的研究員,強調 EnCompass 並非 LangChain 等框架的替代品,而是一個補充層。LangChain 負責協調整體工具和提示,而 EnCompass 則管理決策軌跡。

企業 AI 的關鍵啟示:

  1. 可預測性: 透過驗證多條路徑,代理返回「幻覺」或非功能性結果的可能性降低。
  2. 可審計性: 搜索與邏輯的分離使得調試代理為何做出特定決策變得更加容易。
  3. 可擴展性: 隨著代理應對更長期的任務——例如設計硬體藍圖或進行科學實驗——在不重新啟動的情況下從錯誤中恢復的能力變得至關重要。

展望未來:代理搜索的未來

EnCompass 的發布符合 AI 行業的一個更廣泛趨勢:轉向「推論時間計算(inference-time compute)」。正如 OpenAI 最近的推理模型在回答前投入更多時間進行「思考」一樣,EnCompass 等框架允許開發者在應用層以計算資源換取更高的可靠性。

Asari AI 和 MIT 團隊設想了一個未來,EnCompass 使代理能夠成為真正的發現協作者。想像一個任務是設計新化合物的代理。透過 EnCompass 使用 MCTS,代理可以探索數千種潛在的分子結構,當合成路徑證明不可能時進行回溯,並僅向人類科學家展示最可行的候選方案。

藉由有效解決錯誤累積問題,EnCompass 很可能是將 AI 代理從實驗性玩具轉變為關鍵生產系統所需的缺失基礎設施。

參考文獻與進階閱讀

  • MIT News: "Helping AI agents search to get best results from LLMs" (Feb 2026)
  • HPCWire: "New MIT Framework Uses Search to Handle LLM Errors in AI Agents"
  • Artificial Intelligence News: "How separating logic and search boosts AI agent scalability"
  • NeurIPS 2025 Proceedings: "ENCOMPASS: Enhancing Agent Programming with Search Over Program Execution Paths"
精選
ex ads 202603311112
1111111111111
BlazeGard
Blazeguard provides unparalleled fire safety through innovative fire-rated sheathing technology.
Test Face Swap
Test Face Swap Test Face Swap Test Face Swap Test Face Swap Test Face Swap Test Face Swap
Midjourney for Slack
Bring AI-generated images directly to your Slack workspace with Midjourney for Slack.
AI Bot Eye
Transform your security with AI-driven surveillance technology.
amy
Amy is a comprehensive workplace assistant that streamlines tasks, schedules meetings, and manages projects.
sharkfoto-20250108-quick
Remove background from the image with just one click and convert the image to or from 200+ formats.
test 2 face swap 2
test 2 face swap 2test 2 face swap 2test 2 face swap 2test 2 face swap 2test 2 face swap 2test 2 face swap 2test 2 face
Gptzero me
GPTZero is a tool to detect AI-generated text accurately and easily.
sharkfoto-20250108-free
AI-powered tool for background removal and image conversion in over 200 formats.
BGRemover
Easily remove image backgrounds online with SharkFoto BGRemover.
sharkfoto agent test 202510111844
SharkFoto offers AI-powered free photo editing tools including background removal and colorization.
WorkViz
Workviz: AI-powered platform optimizing team performance through comprehensive analytics.
FreeAiKit
FreeAiKit offers a collection of free AI tools for various content creation needs.
TAROT ARCANA
Unveil your future with Tarot Arcana, an AI-powered tarot reading app.
Skywork
Skywork 將簡單的輸入轉化為多模式內容,例如報告和幻燈片。
sharkfoto svip 20250715
BrowseGPTs
Daily updated directory for diverse ChatGPT models.
blockbank
All-in-one crypto neo banking app combining DeFi and CeFi technologies.
Sharkfoto Quick 091801
SharkFoto offers free AI-powered image editing tools including background removal and photo colorization.
Neuronwriter
Advanced tool for content optimization using semantic models.
Novel
Novel helps you craft a comprehensive professional profile.
AI Fortunist (AI-Powered Tarot Readings)
AI Fortunist provides personalized tarot readings, coffee readings, and dream interpretations using advanced AI.
ParrotPDF
ParrotPDF lets users engage with PDF files interactively.
Flove
Flove is a minimalist movement tracking app with innovative features.
Franklin AI
AI tool to streamline business operations and enhance decision-making.
Durable AI
AI-powered website builder to get your business online in 30 seconds.
JungGPT
An AI tool for emotional reflection and psychological insights.
ChartX
AI-powered medical documentation for efficient and accurate patient care.
eztalks-20250226-0424003
輕鬆地去除圖片背景並轉換圖片格式,盡在SharkFoto。
Udemy Summary with ChatGPT
Summarize Udemy videos with ChatGPT and take notes effortlessly.
Astro Answer New Tab
Discover astrology with personalized AI-generated horoscopes.
aiBot копирайтер
Effortlessly enhance your text with aiBot копирайтер.
PageSage
PageSage simplifies web browsing by generating questions and answers instantly.
GPU Finder
GPU Finder helps discover available GPU instances from global public cloud providers.
Skyworker
AI-powered platform for tech job seekers and recruiters.
Craft
Craft is a powerful document creation and collaboration tool for teams and individuals.
GottaMeme. AI Meme Generator
Create hilarious memes effortlessly with GottaMeme's AI-powered generator.
Recap
Easily summarize any webpage portion with Recap, an open-source browser extension utilizing ChatGPT.
kimi quick test 20250417-121312223
一個創新的平台,用於提升個人生產力。
Magazine Luiza
Efficient shopping assistant for Magazine Luiza users.
sharkfoto svip test 202512241034
SharkFoto 是一個由 AI 驅動的平台,可輕鬆創建與編輯影片、圖像和音樂。
Bigjpg AI
Bigjpg enhances image quality through advanced AI upscaling.
kimi test 20250328-3
使用由AI驅動的工具免費提升、轉換和編輯圖像。
viddo.ai
Veo3 by Viddo AI enables AI-powered text or image to high-quality video creation rapidly.
Simplifly
Summarize lengthy articles easily with Simplifly.
BearGPT - Chatgpt Enhancer
Enhance your ChatGPT experience with BearGPT for better navigation and customization.
2026 Face Swap
2026 Face Wwap2026 Face Wwap2026 Face Wwap2026 Face Wwap2026 Face Wwap2026 Face Wwap2026 Face Wwap2026 Face Wwap2026 Fac
TextPal
TextPal utilizes AI to summarize and manage webpage text effortlessly.
AlgoDocs
AlgoDocs: AI-powered document data extraction made easy.
Audioread: Ultra-Realistic Text-to-Speech
Listen to articles with ultra-realistic AI voices.
GPTXtend
Enhance your ChatGPT experience with powerful sharing tools.
Free Email Extractor from Website
Free email extraction tool for scraping emails, phone numbers, and social profiles from websites.
Skypher
Streamline your security reviews with Skypher's automation.
AI PDF chatbot agent built with LangChain & LangGraph
SharkFoto 提供免費的 AI 驅動照片編輯工具,用於背景移除、著色、增強和調整圖片大小。
Wan 2.2-test
Wan 2 AI offers fast, high-quality 1080p AI video generation with advanced motion control.
Tappy AI
AI browser extension for adding thoughtful comments to LinkedIn posts.
sharkfoto-svip-092202
SharkFoto offers free AI-powered image editing tools like background removal and coloring.
Letz DM
Automate TikTok influencer marketing without the hassle.
Belly Buddy
Track food intake and digestive symptoms with Belly Buddy.
sharkfoto svip test 202509221443
SharkFoto offers free AI-powered photo editing tools for automatic background removal and image enhancement.
sharkfoto-svip-0922-changename
SharkFoto 提供免費的 AI 驅動照片工具,自動移除背景並提升圖像質量。
Alltum
Organizes emails, tasks, and files with AI-driven project management.

MIT 推出 EnCompass 框架,透過搜尋優化 AI 代理人的效能

MIT CSAIL 的研究人員推出 EnCompass,一個突破性的框架,利用回溯 (backtracking) 與平行搜尋,大幅提升 AI 代理人的可靠性與效率。