Abstract
Large Language Models (LLMs) often struggle in autonomous agent tasks due to a lack of environmental common sense and an inability to track local state changes accurately. This paper discusses the World Knowledge Model (WKM), a parametric framework that acts as a mental map for agents. By synthesizing knowledge from both successful and failed trajectories, WKM provides global strategic guidance and local state constraints. Experimental results across ALFWorld, WebShop, and ScienceWorld demonstrate that WKM-equipped models, even those based on smaller open-source backbones like Mistral-7B, can significantly outperform larger models like GPT-4 in complex planning environments.
1. Introduction
While Large Language Models (LLMs) have demonstrated remarkable reasoning capabilities, their transition to autonomous agents in physical or simulated environments remains challenging. Two primary hurdles impede their performance: Global Planning Blindness and Local State Hallucinations. Global Planning Blindness refers to a lack of environmental "common sense"—for instance, an agent might search a drawer for an egg rather than a refrigerator. Local State Hallucinations occur when an agent loses track of the current environment state, attempting actions that are physically impossible given the current context, such as placing an object it has not yet picked up.
Traditional fine-tuning on expert trajectories often fails to provide a fundamental understanding of world dynamics. To address this, the World Knowledge Model (WKM) is introduced to mimic human mental rehearsal, providing a structured way for agents to learn the "why" and "how" of environment interaction.
2. The World Knowledge Model (WKM) Framework
The WKM is designed to serve as a parametric repository of environment-specific knowledge. The construction and application of the WKM involve four distinct stages:
2.1 Task Knowledge Synthesis
Rather than relying solely on expert paths, the WKM learns by comparing expert trajectories with the agent's own sampled (and often failed) attempts. By analyzing these differences, the model synthesizes "Task Knowledge"—high-level workflows and priors that guide the agent toward efficient strategies (e.g., "Locate all target objects before attempting to move them").
2.2 State Knowledge Summarization
To combat state hallucinations, the WKM summarizes the environment's state at every step of an expert path. This creates a mapping of the previous action and current state to the necessary next action, providing a granular understanding of state transitions.
2.3 Model Training
Both the primary Agent Model and the WKM are trained using Low-Rank Adaptation (LoRA). While they share the same underlying backbone, they serve different roles: the Agent Model executes actions, while the WKM generates the synthesized task and state knowledge required for informed decision-making.
2.4 Planning with WKM
During inference, the WKM provides two levels of guidance:
- Global Guidance: At the start of a task, the WKM generates a "Task Knowledge" prompt to set the strategic direction.
- Local Constraint: At each step, the WKM generates a state summary used as a key for k-Nearest Neighbors (kNN) retrieval from a pre-built knowledge base. The final action is determined by combining the agent's raw probabilities with the probabilities retrieved from the knowledge base.
3. Experimental Evaluation
The WKM framework was evaluated on three diverse benchmarks: ALFWorld (household navigation), WebShop (online shopping), and ScienceWorld (elementary science experiments). Testing included both "Seen" and "Unseen" tasks to evaluate the model's generalization capabilities.
3.1 Performance and Efficiency
The WKM-enhanced Mistral-7B model demonstrated superior performance, particularly in unseen environments. In ALFWorld's "Unseen" tasks, the WKM achieved a 76.87% success rate, nearly doubling the 38.05% success rate of GPT-4. Furthermore, WKM agents were more efficient, completing tasks in an average of 17 steps compared to the 20–24 steps required by baseline models.
3.2 Hallucination Reduction
A critical metric for agent reliability is the "Hallucinatory Action Rate" (invalid actions). In ALFWorld (Unseen), the WKM reduced the invalid action rate to approximately 30%, a significant improvement over the 50% rate observed in standard fine-tuning (NAT) approaches.
4. Key Insights
- Learning from Failure: Extracting lessons from mistakes proved more robust than simple imitation learning.
- Implicit State Guidance: The researchers found that using state summaries as retrieval keys for action weighting was more effective than explicitly feeding the text back into the agent's prompt, which often cluttered the context.
- Weak-Guide-Strong: A significant finding is that a smaller WKM (Mistral-7B) can effectively guide a stronger agent (GPT-4), suggesting a path toward using specialized "world experts" to steer general-purpose models.
5. Conclusion and Future Work
The World Knowledge Model represents a significant step toward reducing trial-and-error in autonomous agents. While the current implementation is limited to text-based environments and carries a roughly 2.5x inference overhead due to kNN retrieval, its success in generalizing to unseen tasks is promising. Future research will focus on extending WKM to multimodal environments (visual world models) and developing methods for online, real-time knowledge updates.
Summary updated