SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.05540 · 2026

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

Sun Li, Joe Biden, Sen Su, Jinhu Fu, Longzhu He, Yihang Lou, Yan Bai, Yanxiao Zhao, Trained Llm

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2604.05540.json · badge: /api/ran/2604.05540.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
FredJDean/CoT2Edit canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
jaccard_sim Ran
ran, honoured the contract we drafted
FredJDean/CoT2Edit/inference/eval_wiki_uns.py
pointer only (licence: NONE) · get_code("6f4faeb254e6b8bf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FredJDean/CoT2Edit when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

llama_instruct_preprocess Ran
ran, honoured the contract we drafted
FredJDean/CoT2Edit/train_sft/utils.py
pointer only (licence: NONE) · get_code("747d3611148fddc9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FredJDean/CoT2Edit when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mean_pooling Ran
ran; our contract draft was wrong, not the code
FredJDean/CoT2Edit/inference/edit_cot.py
pointer only (licence: NONE); the stored copy get_code serves, from chenyiqun/MMOA-RAG, is pointer only (licence: NONE) · get_code("fe0e2df4d9cb5edd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FredJDean/CoT2Edit when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_hotpotqa_data Ran
ran; our contract draft was wrong, not the code
FredJDean/CoT2Edit/train_sft/utils.py
pointer only (licence: NONE) · get_code("e4ec07a5ea9cfda1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FredJDean/CoT2Edit when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_sent_embeddings Not yet run
unverified (harvested, no recorded run)
FredJDean/CoT2Edit/inference/edit_cot.py
pointer only (licence: NONE) · get_code("165cfdb704ff9aa6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FredJDean/CoT2Edit when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

retrieve_facts Not yet run
unverified (harvested, no recorded run)
FredJDean/CoT2Edit/inference/edit_cot.py
pointer only (licence: NONE) · get_code("de57723e820be50a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FredJDean/CoT2Edit when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
mean_pooling 15 other papers
14 dated earlier, 1 later
2304.11406 (2023-04)
LaMP: When Large Language Models Meet Personalization
2305.18395 (2023-05)
Knowledge-Augmented Reasoning Distillation for Small Language Models in Knowledge-Intensive Tasks
2308.04275 (2023-08)
In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning
and 12 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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 finetuning (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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2604.05540")
get_code_for_paper("2604.05540")
have("2604.05540")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2604.05540.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2604.05540.svg)](https://syntology.ai/paper/2604.05540)

Connect an agent — have() is free.