Theory of Mind in Action: The Instruction Inference Task in Dynamic Human-Agent Collaboration

Fardin Saad, Pradeep K. Murukannaiah, Munindar P. SingharXiv 2025

TL;DR

This paper introduces "Instruction Inference," a new benchmark for evaluating an AI's Theory of Mind (ToM) in dynamic, collaborative settings where human instructions are incomplete or ambiguous. By testing an LLM-based agent named Tomcat against human participants in a grid-world environment, the authors demonstrate that advanced LLMs using few-shot chain-of-thought prompting can infer intent and plan actions on par with humans.

What Problem Does This Paper Address?

Natural human communication is rarely entirely literal. In collaborative settings, humans frequently use indirect, incomplete, or ambiguous expressions—such as pointing vaguely and asking, "Can you get that?" For an AI agent to be a useful partner, it must possess a "Theory of Mind" (ToM): the ability to infer a collaborator's unspoken intentions, beliefs, and immediate goals from contextual cues.

While existing benchmarks evaluate ToM in language models, they typically rely on static, narrative-based tasks (like reading a short story and answering questions about a character's false beliefs). They fail to test whether an agent can translate ToM reasoning into actions within a real-time, goal-driven environment. This paper bridges the gap by introducing a task where an agent must actively assist a human principal by correctly interpreting unclear directives.

Traditional vs LLM agents handling pragmatic context

Methods

The authors developed Tomcat, an LLM-based agent framework, and evaluated it using three prominent language models: GPT-4o, DeepSeek-R1, and Gemma-3-27B. To investigate how prompting influences collaborative reasoning, they implemented two distinct variants:

  1. Commonsense Prompt (CP): This baseline variant relies purely on general task knowledge and two basic problem walkthroughs.
  2. Few-shot Chain-of-Thought (Fs-CoT): This variant provides the agent with seven structured input-output exemplars. It forces the model to explicitly classify the instruction type, reason through the grid layout and human movements, and output a step-by-step action plan.

The agent's performance was evaluated across multiple dimensions—including intent accuracy, action feasibility, and planning optimality—and benchmarked against a study group of 52 human participants.

Figure 2: Pipeline of the Instruction Inference task with Tomcat and participants.

Datasets

The study introduces the Instruction Inference dataset, which features 20 unique grid-instruction problem scenarios adapted from the "Doors, Keys, and Gems" grid-world environment. The scenarios systematically vary in grid dimensions, number of keys/doors, and spatial obstruction levels.

Crucially, the instructions are grounded in Grice’s maxims of cooperative communication:

  • Incomplete instructions violate the Maxim of Quantity by omitting critical details (e.g., asking for one key when two are required to reach the gem).
  • Ambiguous instructions violate the Maxim of Manner by allowing multiple interpretations (e.g., referencing "that door" when multiple doors are nearby).
Comparison of ToM benchmarks

Key Insights and Ideas

  • Action-Oriented ToM Reveals Hidden Failures: Moving from text-based QA to plan execution highlights a critical gap: an agent might understand an instruction literally but fail the broader collaborative goal. For example, a weak agent might fetch the exact key requested but fail to realize it also needs to grab a second key to unlock the subsequent door blocking the human's path.
  • Prompting Strategy Trumps Grid Complexity: Interestingly, an LLM's performance is determined primarily by the prompting strategy (Fs-CoT vs. CP) and instruction ambiguity rather than the physical or structural complexity of the grid layout itself.
  • The Impact of Post-Training Optimization: The paper highlights how a model's underlying training affects its reasoning style. GPT-4o (aligned via RLHF) is highly sensitive to prompt structure and excels when given Fs-CoT exemplars. Meanwhile, DeepSeek-R1 (optimized via Group Relative Policy Optimization) shows strong independent reasoning trajectories, making its baseline "Commonsense Prompt" variant perform significantly better out-of-the-box compared to other models' baselines.

Key Results

  • Human-Level Performance: When equipped with Fs-CoT prompting, both GPT-4o and DeepSeek-R1 achieved performance comparable to human participants. Remarkably, GPT-4o with Fs-CoT achieved 85.00% Intent Accuracy and 75.00% Plan Optimality, slightly edging out the human averages of 80.38% and 71.15%, respectively.
  • The Power of Few-Shot CoT: Fs-CoT consistently supercharged performance across all models. For instance, GPT-4o’s intent accuracy skyrocketed from 50.00% under the CP variant to 85.00% under Fs-CoT.
  • Model Capacity is a Bottleneck: Smaller models struggle with the cognitive load of ToM. The Gemma-3-27B variant consistently underperformed relative to humans and larger models, even when aided by structured exemplars.

Limitations and Future Work

While promising, the authors note a few limitations. The evaluation was restricted to a single grid-world domain and a relatively homogeneous human baseline consisting entirely of university students with STEM backgrounds. Additionally, only two annotators evaluated the LLM completions, which introduces a potential risk of bias.

Moving forward, the authors plan to scale Instruction Inference to incorporate a broader spectrum of pragmatic communication, including nonverbal cues, humor, sarcasm, and irrelevance. They also aim to test Tomcat in real-world collaborative environments featuring richer dialogue and multi-agent coordination.

Summary updated

BibTeX
@misc{saad2025theory,
  author = {Fardin Saad and Pradeep K. Murukannaiah and Munindar P. Singh},
  title = {{Theory of Mind in Action: The Instruction Inference Task in Dynamic Human-Agent Collaboration}},
  year = {2025},
  eprint = {2507.02935},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.02935},
}
Figure