Emergent Mind

Agent Planning with World Knowledge Model

(2405.14205)
Published May 23, 2024 in cs.CL , cs.AI , cs.CV , cs.LG , and cs.MA

Abstract

Recent endeavors towards directly using LLMs as agent models to execute interactive planning tasks have shown commendable results. Despite their achievements, however, they still struggle with brainless trial-and-error in global planning and generating hallucinatory actions in local planning due to their poor understanding of the ''real'' physical world. Imitating humans' mental world knowledge model which provides global prior knowledge before the task and maintains local dynamic knowledge during the task, in this paper, we introduce parametric World Knowledge Model (WKM) to facilitate agent planning. Concretely, we steer the agent model to self-synthesize knowledge from both expert and sampled trajectories. Then we develop WKM, providing prior task knowledge to guide the global planning and dynamic state knowledge to assist the local planning. Experimental results on three complex real-world simulated datasets with three state-of-the-art open-source LLMs, Mistral-7B, Gemma-7B, and Llama-3-8B, demonstrate that our method can achieve superior performance compared to various strong baselines. Besides, we analyze to illustrate that our WKM can effectively alleviate the blind trial-and-error and hallucinatory action issues, providing strong support for the agent's understanding of the world. Other interesting findings include: 1) our instance-level task knowledge can generalize better to unseen tasks, 2) weak WKM can guide strong agent model planning, and 3) unified WKM training has promising potential for further development. Code will be available at https://github.com/zjunlp/WKM.

WKM: Model synthesizes knowledge from expert and explored trajectories for improved global and local planning.

Overview

  • The paper introduces a novel parametric World Knowledge Model (WKM) to improve agent planning by integrating global task knowledge and dynamic state knowledge, bridging the gap in agents' understanding of the physical world.

  • The WKM synthesizes task and state knowledge from experienced agents' trajectories, resulting in significant improvements in task execution and efficiency by reducing trial-and-error and hallucinatory actions.

  • Evaluations on datasets such as ALFWorld, WebShop, and ScienceWorld showed that WKM outperformed strong baselines, demonstrating its robustness and effectiveness across diverse tasks and its potential for practical, real-world AI applications.

Bridging the Gap: Enhancing Agent Planning with World Knowledge Models

Introduction

Recently, efforts to use LLMs as agents for interactive planning tasks have made significant strides. However, these agents still encounter challenges due to their often superficial understanding of the physical world, leading to impractical trial-and-error approaches and "hallucinatory" actions. This article will explore a novel approach introduced to address these issues: the parametric World Knowledge Model (WKM). This model aims to bridge the gap between agent planning and real-world understanding by integrating global task knowledge and dynamic state knowledge.

Traditional Agent Planning vs. Knowledge-Augmented Planning

Traditional Agent Planning: LLMs like Mistral-7B, Gemma-7B, and Llama-3-8B, when used directly for planning, often rely on autoregressive next-token prediction. This method doesn't inherently provide a deep understanding of the physical environment, leading to issues such as:

  • Brainless Trial-and-Error: Agents repetitively attempt random actions without a clear strategy.
  • Hallucinatory Actions: Agents occasionally propose actions that make no logical sense within the given context.

Knowledge-Augmented Planning: Humans incorporate rich mental models of the world to guide their actions. They use global task knowledge to form a plan and dynamic state knowledge to adjust as needed. The World Knowledge Model (WKM) mimics this approach by combining:

  • Global Task Knowledge: Prior knowledge to guide overall planning.
  • Dynamic State Knowledge: Real-time updates to refine and guide actions at each step.

How WKM Works

Task Knowledge Synthesis

  1. Experienced Agent Exploration: WKM starts by using an experienced agent to explore tasks and generate both successful (expert) and failed (rejected) trajectories.
  2. Self-Synthesis of Knowledge: By comparing these trajectories, the model extracts task-related knowledge itself, forming a comprehensive understanding of the task at hand.

State Knowledge Summarization

The model summarizes the local state knowledge at each planning step:

  • State Knowledge Base: Constructed from expert trajectories, it pairs actions with their preceding and following states. This knowledge is stored in a retrieval-friendly format.

Model Training and Inference

  1. Agent Model Training: The agent is trained with synthesized task knowledge, refining its ability to perform actions based on learned strategies.
  2. World Knowledge Model Training: Both task and state knowledge are integrated into the trajectories for comprehensive training.
  3. Inference: During task execution, the WKM provides real-time guidance. It balances the state knowledge base with the agent model's outputs to decide the best next actions.

Strong Numerical Results

The WKM-enhanced approach was evaluated on three datasets: ALFWorld, WebShop, and ScienceWorld. Here’s a snapshot of the results compared to other strong baselines:

  • ALFWorld: Saw improvements in average reward for both seen (73.57) and unseen tasks (76.87), surpassing baselines like KnowAgent.
  • WebShop: The method excelled with a reward score of 66.64.
  • ScienceWorld: Achieved top scores, indicating robust performance across diverse tasks.

Key Findings and Implications

Reduction in Trial-and-Error and Hallucinatory Actions: Results indicate that the WKM significantly lowered the number of unnecessary actions and hallucinations. This makes the agent more efficient and reliable.

Generalization to Unseen Tasks: Instance-level knowledge generated by the WKM outperformed human-designed, dataset-level knowledge, particularly on unseen tasks. This suggests that dynamic knowledge synthesis and retrieval models can improve the adaptability of AI.

Weak-Guide-Strong Paradigm: The study showed that even a weaker knowledge model (like Mistral-7B) can enhance agent models like GPT-4, paving the way for powerful hybrid models.

Unified World Knowledge Model: Experimentation with multi-task training revealed the potential for a unified model capable of guiding various agent models across different tasks.

Limitations of Explicit State Knowledge: Directly including state knowledge in the context was less effective than using a structured, retrieval-based approach. This highlights the importance of implicit knowledge integration.

Theoretical and Practical Implications

Theoretical: The WKM sets a foundation for more intelligent, context-aware agents capable of reasoning through complex tasks with a nuanced understanding of their environment.

Practical: This approach can be applied to develop more robust AI systems for real-world applications, from autonomous driving to personal assistants and beyond.

Future Directions

  • Unified World Knowledge Models: Building a single model that can transfer across multiple types of tasks.
  • World Model Prediction: Enhancing the WKM to predict future states, much like traditional world models.
  • Multi-modal Planning: Extending the approach to handle tasks involving multiple sensory inputs (e.g., visual, auditory).

By integrating world knowledge synthetically derived from previous experiences, WKM provides LLM-based agents with a more profound understanding, enabling them to perform complex planning tasks more effectively and efficiently.

Create an account to read this summary for free:

Newsletter

Get summaries of trending comp sci papers delivered straight to your inbox:

Unsubscribe anytime.