Flows: Building Blocks of Reasoning and Collaborating AI
arXiv:2308.01285
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 +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.
References in corpus (28)
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- LLaMA: Open and Efficient Foundation Language Models
- Llama 2: Open Foundation and Fine-Tuned Chat Models
- Evaluating Large Language Models Trained on Code
- Large Language Models are Zero-Shot Reasoners
- ReAct: Synergizing Reasoning and Acting in Language Models
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models
- Toolformer: Language Models Can Teach Themselves to Use Tools
- Reflexion: Language Agents with Verbal Reinforcement Learning
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face
- Self-Refine: Iterative Refinement with Self-Feedback
- AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation
- MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework
- Measuring Coding Challenge Competence With APPS
- Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks
- CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society
- Multimodal Chain-of-Thought Reasoning in Language Models
- Chameleon: Plug-and-Play Compositional Reasoning with Large Language Models
- Actor Model of Computation: Scalable Robust Information Systems
- Teaching Large Language Models to Self-Debug
- Language Models can Solve Computer Tasks
- PEER: A Collaborative Language Model
- Large Language Models Cannot Self-Correct Reasoning Yet
- REFINER: Reasoning Feedback on Intermediate Representations
- Generating Sequences by Learning to Self-Correct
- Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolution
- Parsel: Algorithmic Reasoning with Language Models by Composing Decompositions
- When to Show a Suggestion? Integrating Human Feedback in AI-Assisted Programming