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)的进展催生了高度灵活且可控的系统。这为结构化推理以及多AI系统与人类之间的协作创造了前所未有的机遇。为充分实现这一潜力,亟需建立一种系统化的方法来设计与研究此类结构化交互。为此,我们提出概念性框架Flows。Flows是自包含的计算构建模块,具有隔离的状态,通过标准化基于消息的接口进行通信。这种模块化设计允许Flows通过递归组合形成任意嵌套的交互,且天然支持并发,从而简化了创建过程。关键之处在于,任何交互均可通过该框架实现,包括先前关于AI-AI与人机交互、提示工程方案及工具增强的研究。我们在具有挑战性的编程竞赛任务上展示了Flows的潜力——该任务即使GPT-4也难以应对。结果表明,结构化推理与协作能显著提升泛化能力:纯AI Flow将解题率提升21个绝对百分点,而人机协作Flow则提升54个绝对百分点。为支持快速严谨的研究,我们发布了体现Flows概念的aiFlows库,该库可通过https://github.com/epfl-dlab/aiflows获取。用于复现实验的数据与Flows可从https://github.com/epfl-dlab/cc_flows获取。