Flows: Building Blocks of Reasoning and Collaborating AI
Martin Josifoski Lars Klein Maxime Peyrard Nicolas Baldwin Yifei Li Saibo Geng Julian Paul Schnitzler Yuxing Yao Jiheng Wei Debjit Paul Robert West
Abstract
Recent advances in artificial intelligence (AI) have produced highly capable and controllable systems. This creates unprecedented opportunities for structured reasoning as well as collaboration among multiple AI systems and humans. To fully realize this potential, it is essential to develop a principled way of designing and studying such structured interactions. For this purpose, we introduce the conceptual framework Flows. Flows are self-contained building blocks of computation, with an isolated state, communicating through a standardized message-based interface. This modular design simplifies the process of creating Flows by allowing them to be recursively composed into arbitrarily nested interactions and is inherently concurrency-friendly. Crucially, any interaction can be implemented using this framework, including prior work on AI–AI and human–AI interactions, prompt engineering schemes, and tool augmentation. We demonstrate the potential of Flows on competitive coding, a challenging task on which even GPT-4 struggles. Our results suggest that structured reasoning and collaboration substantially improve generalization, with AI-only Flows adding + $21$ and human–AI Flows adding
中文速览
大型语言模型(LLM)在推理和工具调用方面潜力巨大,但当前各类 AI 系统(如 ReAct、AutoGPT、LangChain)的交互方式各自为政、缺乏统一抽象,导致设计复杂的多智能体协作流程既混乱又难以复用。为此,作者提出了一套名为"Flows"的计算框架:将每个计算单元封装为独立、自包含、通过标准化消息接口通信的模块,可以像搭积木一样递归嵌套组合成任意复杂的 AI-AI 或人-AI 交互系统,并天然支持并发。在极具挑战性的竞技编程任务上,纯 AI Flows 比基线提升了 21 个百分点,引入人类协作后更提升了 54 个百分点,远超 GPT-4 单独作答的表现。这项工作不仅提供了开源库 aiFlows 和 Flow 社区仓库 FlowVerse,更重要的是为系统性研究各类结构化推理与协作模式提供了统一的理论和工程基础,有望推动 AI 交互范式的标准化与快速迭代。
原文 arXiv:2308.01285;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2308.01285v3