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 +54 absolute points in terms of solve rate. To support rapid and rigorous research, we introduce the aiFlows library embodying Flows. The aiFlows library is available at https://github.com/epfl-dlab/aiflows. Data and Flows for reproducing our experiments are available at https://github.com/epfl-dlab/cc_flows.
翻译:近期人工智能的进展催生了高度可控且能力强大的系统,这为结构化推理以及多AI系统与人之间的协作创造了前所未有的机遇。为充分挖掘这一潜力,亟需建立一套研究此类结构化交互的设计原则。为此,我们提出概念框架"流"(Flows)。流是自包含的计算构建模块,具有隔离状态并通过标准化消息接口进行通信。这种模块化设计支持以递归方式组合成任意嵌套交互结构,简化了流的创建过程,并天然具备并发友好特性。关键在于,任何交互(包括先前AI-AI与人机交互、提示工程方案及工具增强等研究)均可通过此框架实现。我们在竞争性编程这一GPT-4亦难以胜任的挑战性任务上展示了流的潜力。结果表明,结构化推理与协作能显著提升泛化能力:纯AI流使解题率提升21个百分点,人机协同流则提升54个百分点。为支持快速严谨的研究,我们发布了实现流概念的aiFlows库,相关数据和复现实验的流可分别访问https://github.com/epfl-dlab/aiflows和https://github.com/epfl-dlab/cc_flows获取。