Your Co-Workers Matter: Evaluating Collaborative Capabilities of Language Models in Blocks World (2024)

Abstract: Language agents that interact with the world on their own have great potential for automating digital tasks. While large language model (LLM) agents have made progress in understanding and executing tasks such as textual games and webpage control, many real-world tasks also require collaboration with humans or other LLMs in equal roles, which involves intent understanding, task coordination, and communication. To test LLM’s ability to collaborate, we design a blocks-world environment, where two agents, each having unique goals and skills, build a target structure together. To complete the goals, they can act in the world and communicate in natural language. Under this environment, we design increasingly challenging settings to evaluate different collaboration perspectives, from independent to more complex, dependent tasks. We further adopt chain-of-thought prompts that include intermediate reasoning steps to model the partner’s state and identify and correct execution errors. Both human-machine and machine-machine experiments show that LLM agents have strong grounding capacities, and our approach significantly improves the evaluation metric.

## introduction as large language models (llms) evolve, they are increasingly expected to collaborate closely with humans or other llm agents, emphasizing the importance of coordination and communication @xcite . for instance, an llm assistant might need to work alongside human professionals to plan tasks, manage projects, and ensure efficient execution. while multi-agent collaboration is not a new area @xcite @xcite , there is limited study on how llm agents collaborate with humans in equal roles, rather than passively following human's instructions. furthermore, existing studies often evaluate the collaboration results of llms as a whole @xcite @xcite , while ignoring specific collaboration abilities of llms, such as coordinating diverse goals or seeking assistance. to fill this gap, we propose a collaborative blocks world environment (coblock), to evaluate the collaboration ability of llms. in coblock, two agents (either human or llm), each equipped with complementary goals and skills, collaborate to build a target structure without a designated leader. for example, as shown in figure 1 , amy is responsible for the top part, which must be built on top of the base structure that bob needs to build first. we design three scenarios to progressively increase the level of interaction and coordination required between the two agents, moving from independent tasks to more complex, interdependent tasks (figure 2 ). to ground llms in coblock and enable them to complete the tasks, we prompt gpt series models (gpt-3.5 and gpt-4) to make decisions about the next action given the current observation. at each round, our basic prompt describes the agent's goal (the color and position of every block), the current state (the structure built so far, the action and message history), and candidate actions to choose from (place a block, send a message, wait or terminate the task). to guide the model in choosing the right action, we additionally include chain-of-thought prompts (cot) @xcite to go through intermediate reasoning steps: (1) analysis of the currently built structure and the agent's goal; (2) partner-state modeling to predict the current intent and state of the partner; and (3) self-reflection that identifies and corrects any execution error, and adjusts communication style accordingly. we evaluate the llm agents in coblock under both machine-machine and human-machine settings, measured by task success rate, total steps, and workload balance. first, we find that llm agents have a high success rate when building the structure independently, demonstrating strong grounding ability even without multi-modal training. second, adding partner-state modeling and self-reflection prompting results in a 30% absolute increase in task completion rate and leads to better workload balance. finally, while human-machine collaboration has a slightly higher success rate than machine-machine collaboration, humans often take on more responsibility in challenging scenarios when the llm agent struggles. we hope our findings and the evaluation environment will support future studies on communication and coordination in multi-agent collaboration. 1 ## the collaborative blocks world in this section, we describe the collaborative blocks world environment coblock (section 2.1) and the three types of collaboration tasks (section 2.2). ## building collaborative agents based on llms we use an llm as the base agent and query it at each round to predict the next action given the current world state (e.g., the structure built so far and the agent's goal). to help the llm agent decide the next action, we use cot prompting to guide the llm agent through several intermediate steps designed to anticipate the partner's needs and adjust the construction plan given new observations. we describe each step below and show examples in figure 3 . step 1: understanding the world state. the world state is represented using the xml format. therefore, we prompt the llm agent to first parse the state and describe it in natural language. for example, given @xmath0, the agent infers that it should build the yellow blocks next. step 2: modeling the partner's state. effective collaboration requires an agent to understand the partner's needs and coordinate with them to strike a balance between assisting others and fulfilling their own goal. for example, in skill-and goaldependent tasks, the agent must identify which sub-structures their partner needs help with and integrate it into the planning of their goals. therefore, we incorporate partner-state modeling @xcite into our prompts as an intermediate step. as shown in figure 3 , based on the dialogue and action history, the agent predicts the intent and state of its partner, including the goal, the inventory set, the immediate next plan (e.g., building the green sub-structure), and whether the plan has been executed. ## experiments successfully completing tasks in coblock requires both grounding and collaboration abilities. therefore, we first assess whether llms are able to execute instructions in coblock correctly through a single-agent experiment (section 4.2). next, we evaluate whether llm agents can effectively collaborate with other llm or human agents through communication and coordination using a multi-agent experiment (section 4.3 and 4.4). ## conclusion in this paper, we introduce a new collaborative blocks environment (coblock), where human or llm agents collaborate to complete a target structure. we prompt llm agents to make decisions about the next action in coblock, and further propose to enhance collaborative abilities by modeling partner agents' state and intention and correcting errors and communication strategies from feedback. both human-machine and machinemachine experiments indicate the effectiveness of our agents, especially on more challenging tasks that require more advanced collaboration. we believe this work provides resources and insights for future work in advancing multi-agent collaboration for social good that requires different levels of collaboration strategies.