Learning to Edit Knowledge via Instruction-based Chain-of-Thought Prompting

Jinhu Fu, Yan Bai, Longzhu He, Yihang Lou, Yanxiao Zhao +2 more
4/7/2026
cs.CL

Official code: FredJDean/CoT2Edit (1 star, last commit 2025-11-21).

Abstract

Large language models (LLMs) can effectively handle outdated information through knowledge editing. However, current approaches face two key limitations: (I) Poor generalization: Most approaches rigidly inject new knowledge without ensuring that the model can use it effectively to solve practical problems. (II) Narrow scope: Current methods focus primarily on structured fact triples, overlooking the diverse unstructured forms of factual information (e.g., news, articles) prevalent in real-world contexts. To address these challenges, we propose a new paradigm: teaching LLMs to edit knowledge via Chain of Thoughts (CoTs) reasoning (CoT2Edit). We first leverage language model agents for both structured and unstructured edited data to generate CoTs, building high-quality instruction data. The model is then trained to reason over edited knowledge through supervised fine-tuning (SFT) and Group Relative Policy Optimization (GRPO). At inference time, we integrate Retrieval-Augmented Generation (RAG) to dynamically retrieve relevant edited facts for real-time knowledge editing. Experimental results demonstrate that our method achieves strong generalization across six diverse knowledge editing scenarios with just a single round of training on three open-source language models. The codes are available at https://github.com/FredJDean/CoT2Edit.

View on arXivView PDF

Code Implementations(1)

FredJDean/CoT2EditOfficial100%

The code for CoT2Edit

10Shell, PythonOct 5, 202511 months ago

Similar Papers

Cite this paper

@article{fu2026learning,
  title  = {Learning to Edit Knowledge via Instruction-based Chain-of-Thought Prompting},
  author = {Jinhu Fu and Yan Bai and Longzhu He and Yihang Lou and Yanxiao Zhao and Li Sun and Sen Su},
  year   = {2026},
  eprint = {2604.05540},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.05540v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.05540.svg)](https://codeofpaper.com/paper/2604.05540)

Discussion