Manuscript Offprint

arXiv:2610.10042

Learning to Accumulate Knowledge with Mutual Information

Yuyang Zhao, Lizi Liao, Leyang Shen, Xiaoyan Zhao, Yang Zhang, Fuli Feng, Xiangnan He

ABSTRACT

Large language model (LLM) agents can improve their performance by reusing knowledge distilled from past interactions. However, curating new experiences into a knowledge bank that becomes more useful as it grows remains challenging. Effective knowledge accumulation should limit redundant overlap among entries and ensure that new knowledge contributes beyond what the bank already provides. Yet training a curator with Group Relative Policy Optimization (GRPO) on standalone task success can reinforce general guidance even when it duplicates existing knowledge. Therefore, we propose Knowledge Weaver, a reinforcement learning framework that trains a language model to curate reusable knowledge from agent trajectories. We couple feedback inspired by token-wise mutual information (MI) with marginal success rewards to guide knowledge accumulation. Together, these signals encourage the curator to preserve distinct information from experience and produce entries that improve task success when added to existing knowledge. Standalone success rewards also favor entries that are useful on their own. On ALFWorld and WebShop, Knowledge Weaver achieves mean success rates of 54.0% and 42.0% with k = 10 retrieved entries, exceeding GRPO by 16.9 and 18.7 percentage points, respectively. Its knowledge banks also outperform the evaluated prompt-based and established banks, including human-written banks, in overall ALFWorld success rate and WebShop score with the executor frozen. Our codebase is available at https://github.com/LaoKuiZe/Knowledge-Weaver.

1 INTRODUCTION

Large language model (LLM) agents interact with external environments to solve complex tasks (Yao et al., 2022b; Gur et al., 2024; Yang et al., 2024; Shen et al., 2025). Reusing knowledge from these interactions offers a route to agent self-improvement, allowing experience from previous tasks to inform future decisions. Prior work shows that high-quality, task-specific knowledge can improve agent performance (Wang et al., 2024; Li et al., 2026; Ouyang et al., 2026). Such knowledge includes reusable workflows and executable skills that guide action sequences (Wang et al., 2023; 2024; Yuan et al., 2024), as well as distilled lessons about environmental constraints and effective strategies (Majumder et al., 2023; Chen et al., 2024). Stored in external knowledge banks, relevant entries can be retrieved and incorporated into the agent's context without updating the executor's parameters (Zheng et al., 2024; Fu et al., 2024). This makes knowledge accumulation a means of retaining experience beyond individual interactions and supporting its reuse across tasks.

While these benefits establish the value of using knowledge, producing it reliably remains a separate challenge. Existing work relies on pipeline design or training-based methods for knowledge curation. Prompt-based methods extract reflective lessons, conditional guidelines, and reusable workflows from trajectories (Shinn et al., 2023; Zhao et al., 2024; Fu et al., 2024; Wang et al., 2024), then consolidate them through memory or playbook revision (Zhang et al., 2026a; Ouyang et al., 2026; Suzgun et al., 2026). Training-based methods integrate knowledge into policy improvement through skill internalization (Lu et al., 2026) or the joint evolution of task execution and reusable skills (Xia et al., 2026; Shi et al., 2026; Yao et al., 2026). When curation is rewarded through downstream task success, this feedback assesses whether generated knowledge helps execution. However, these

Figure

Figure 1: Conceptual illustration of general guidance and complementary knowledge. General guidance can remain useful for individual tasks while providing limited additional information across entries. Knowledge Weaver combines MI-inspired feedback with execution rewards to encourage experience-dependent knowledge and incremental utility.

advances in knowledge construction and use leave a distinct question of how to train a curator to produce better knowledge for a fixed executor. Addressing this question requires considering both the utility of individual entries and what they contribute as knowledge accumulates.

Building on this, we propose Knowledge Weaver, an RL framework that trains a language model as a knowledge curator to extract reusable knowledge from agent trajectories. A good curator should produce knowledge that improves task performance and adds useful information as the bank grows. Effective accumulation therefore calls for both limited redundant overlap and substantial incremental utility. Figure 1 illustrates these considerations through knowledge coverage over a task space. Optimizing only for standalone task success can favor general guidance that repeatedly covers the same tasks, yielding substantial overlap and limited additional coverage as the bank grows. Complementary entries extend the bank's coverage, with the shaded region indicating the incremental contribution of a new entry. We therefore approach knowledge accumulation through both the distinct information retained across entries and the additional utility each entry provides.

Knowledge Weaver couples token-level feedback inspired by mutual information (MI) with marginal success rewards to preserve distinct information and encourage incremental contributions to the bank. The MI-inspired signal contrasts generation probabilities across trajectory contexts, assigning greater credit to context-sensitive tokens than to tokens whose probabilities remain similar across experiences. To reward incremental contributions, we measure the gain in task success when a new entry is added to retrieved knowledge. This marginal reward favors entries that improve execution beyond what the bank already provides. We also reward task success with each entry alone to encourage individual utility. These signals jointly train the curator, whose generated knowledge is retrieved to guide a frozen executor.

We evaluate whether learned knowledge improves a frozen executor on ALFWorld, a household task environment (Shridhar et al., 2020), and WebShop, an online shopping environment (Yao et al., 2022a). Before each task, we retrieve k=10k = 10 knowledge entries from the bank using the task query and provide them to the frozen executor as guidance. Knowledge Weaver achieves success rates of 54.0% and 42.0%, respectively. These results exceed task-success-only GRPO by 16.9 and 18.7 percentage points under the same executor. These gains demonstrate improved task performance and support a curation strategy aimed at reducing redundant overlap among knowledge entries.

Our contributions are summarized as follows.

• Redundancy in knowledge curation. We identify a limitation of GRPO using only task success as reward, which can produce general guidance with substantial informational redundancy across knowledge entries.

• MI-guided curator training. We propose Knowledge Weaver, which combines token-level information feedback with execution rewards to train useful and complementary knowledge generation.

• Improved downstream performance. On ALFWorld and WebShop, Knowledge Weaver improves SR over task-reward-only GRPO by 16.9 and 18.7 percentage points at k = 10, respectively. Its banks also exceed human-written banks on the reported aggregate metrics.

References (82)