# What You Need is What You Get: Theory of Mind for an LLM-Based Code Understanding Assistant

arXiv: https://arxiv.org/abs/2408.04477 · HTML: https://mlsanity.com/paper/2408.04477/

## Key facts

- Cited by 8 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 8 Aug 2024.

## Built on by (most cited first, 8 of 8)

- [Large language models for artificial general intelligence (AGI): A survey of foundational principles and approaches](https://mlsanity.com/paper/2501.03151/) (2025)
- [Large Language Models (LLMs) for Source Code Analysis: applications, models and datasets](https://mlsanity.com/paper/2503.17502/) (2025)
- [Agentic Coding Needs Proactivity, Not Just Autonomy](https://mlsanity.com/paper/2605.06717/) (2026)
- [SketchFill: Sketch-Guided Code Generation for Imputing Derived Missing Values](https://mlsanity.com/paper/2412.19113/) (2024)
- [A Comparison of Conversational Models and Humans in Answering Technical Questions: the Firefox Case](https://mlsanity.com/paper/2510.21933/) (2025)
- [Explicit Trait Inference for Multi-Agent Coordination](https://mlsanity.com/paper/2604.19278/) (2026)
- [LiveFMBench: Unveiling the Power and Limits of Agentic Workflows in Specification Generation](https://mlsanity.com/paper/2605.01394/) (2026)
- [TARS: A Theory-of-Mind Agent for Personalized In-IDE Code Comprehension](https://mlsanity.com/paper/2607.15948/) (2026)

## Abstract (arXiv)

A growing number of tools have used Large Language Models (LLMs) to support developers' code understanding. However, developers still face several barriers to using such tools, including challenges in describing their intent in natural language, interpreting the tool outcome, and refining an effective prompt to obtain useful information. In this study, we designed an LLM-based conversational assistant that provides a personalized interaction based on inferred user mental state (e.g., background knowledge and experience). We evaluate the approach in a within-subject study with fourteen novices to capture their perceptions and preferences. Our results provide insights for researchers and tool builders who want to create or improve LLM-based conversational assistants to support novices in code understanding.
