diff History for Neural Language Agents
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Neural Language Models (LMs) offer an exciting solution for general-purpose embodied control. However, a key technical issue arises when using an LM-based controller: environment observations must be converted to text, which coupled with history, results in long and verbose textual prompts. As a result, prior work in LM agents is limited to restricted domains with small observation size as well as minimal needs for interaction history or instruction tuning. In this paper, we introduce diff history, a simple and highly effective solution to these issues. By applying the Unix diff command on consecutive text observations in the interaction histories used to prompt LM policies, we can both abstract away redundant information and focus the content of textual inputs on the salient changes in the environment. On NetHack, an unsolved video game that requires long-horizon reasoning for decision-making, LMs tuned with diff history match state-of-the-art performance for neural agents while needing 1800x fewer training examples compared to prior work. Even on the simpler BabyAI-Text environment with concise text observations, we find that although diff history increases the length of prompts, the representation it provides offers a 25% improvement in the efficiency of low-sample instruction tuning. Further, we show that diff history scales favorably across different tuning dataset sizes. We open-source our code and data to https://diffhistory.github.io.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 26 of its 56 references that are in the map. First posted on arXiv 12 Dec 2023.
Builds on
26 of 56 references.
References · 26
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2023RT-2: Vision-Language-Action Models Transfer Web Knowledge to Robotic Controlcited by 2,993
- 2022Do As I Can, Not As I Say: Grounding Language in Robotic Affordancescited by 2,302
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Modelscited by 873
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
14 more
- 2022A Generalist Agentcited by 802
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 696
- 2023How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resourcescited by 405
- 2022VIMA: General Robot Manipulation with Multimodal Promptscited by 403
- 2018BabyAI: A Platform to Study the Sample Efficiency of Grounded Language Learningcited by 238
- 2020The NetHack Learning Environmentcited by 196
- 2023Motif: Intrinsic Motivation from Artificial Intelligence Feedbackcited by 99
- 2022Prompt Consistency for Zero-Shot Task Generalizationcited by 66
- 2019Rapid trial-and-error learning with simulation supports flexible tool use and physical reasoningcited by 60
- 2023ZeRO++: Extremely Efficient Collective Communication for Giant Model Trainingcited by 50
- 2022Insights From the NeurIPS 2021 NetHack Challengecited by 20
- 2022Dungeons and Data: A Large-Scale NetHack Datasetcited by 16
- 2023NetHack is Hard to Hackcited by 11
- 2022Improving Policy Learning via Language Dynamics Distillationcited by 9
Built on by
Citing papers per year: 2024: 3; 2025: 1; 2026: 2.
6 papers.
- 2024BALROG: Benchmarking Agentic LLM and VLM Reasoning On Gamescited by 141
- 2025RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Codecited by 28
- 2024A Survey on Game Playing Agents and Large Models: Methods, Applications, and Challengescited by 22
- 2024Training Language Models on Synthetic Edit Sequences Improves Code Synthesiscited by 7
- 2026Digital Red Queen: Adversarial Program Evolution in Core War with LLMscited by 7
- 2026Up and Down the Abstraction Ladder: Code-Based Skills for Language Agentscited by 0
- 2026Up and Down the Abstraction Ladder: Code-Based Skills for Language Agents25 Sep 2026
- 2026Digital Red Queen: Adversarial Program Evolution in Core War with LLMs6 Jan 2026
- 2025RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Code10 Mar 2025
- 2024BALROG: Benchmarking Agentic LLM and VLM Reasoning On Games20 Nov 2024
- 2024Training Language Models on Synthetic Edit Sequences Improves Code Synthesis3 Oct 2024
- 2024A Survey on Game Playing Agents and Large Models: Methods, Applications, and Challenges15 Mar 2024
Similar, not cited
Close in wording, no citation either way
- 2024Controlling Large Language Model Agents with Entropic Activation Steering
- 2023Plan, Eliminate, and Track -- Language Models are Good Teachers for Embodied Agents
- 2026Hierarchical Prompt-Domain Control and Learning for Resource-Constrained Agentic Language Models
- 2024Sub-goal Distillation: A Method to Improve Small Language Agents
- 2026SPT: Skills as Pre-Training Data for Agentic Language Models
- 2026Why We Need World Models for AGI: Where LLMs Fail and How World Models May Outperform
- 2023Distilling Internet-Scale Vision-Language Models into Embodied Agents
- 2026DuoMem: Towards Capable On-Device Memory Agents via Dual-Space Distillation