Papers › AMOR: A Recipe for Building Adaptable Modular Knowledge Agents Through Process Feedback

AMOR: A Recipe for Building Adaptable Modular Knowledge Agents Through Process Feedback

2 Feb 2024arXiv:2402.01469archive 2025-07-28

Jian Guan, Wei Wu, Zujie Wen, Peng Xu, Hongning Wang, Minlie Huang

The notable success of large language models (LLMs) has sparked an upsurge in building language agents to complete various complex tasks. We present AMOR, an agent framework based on open-source LLMs, which reasons with external knowledge bases and adapts to specific domains through human supervision to the reasoning process. AMOR builds reasoning logic over a finite state machine (FSM) that solves problems through autonomous executions and transitions over disentangled modules. This allows humans to provide direct feedback to the individual modules, and thus naturally forms process supervision. Based on this reasoning and feedback framework, we develop AMOR through two-stage fine-tuning: warm-up and adaptation. The former fine-tunes the LLM with examples automatically constructed from various public datasets, enabling AMOR to generalize across different knowledge environments, while the latter tailors AMOR to specific domains using process feedback. Extensive experiments across multiple domains demonstrate the advantage of AMOR to strong baselines, thanks to its FSM-based reasoning and process feedback mechanism. The code and data are publicly available at \url{https://github.com/JianGuanTHU/AMOR}.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.01469")

Code

Syntology Ran 19 of 24 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 5 ran · our draft was wrong; 3 ran · fixture could not drive it; 11 ran with no contract checked.

By repository: official repository: 23 samples from 1 repository, 18 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

jianguanthu/amor officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested; 19 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

5ran · our draft was wrong
3ran · fixture could not drive it
11ran
5unverified

Licence: 24 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from JianGuanTHU/AMOR. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

repeat_kv JianGuanTHU/AMOR/code/modeling_llama.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 30d7eec482ebf6b1 · report
Generator jianguanthu/amor/code/manager.py official repository ran no licence file found · pointer only · 3dbe593f2d6f3b4e · report
LlamaAttention jianguanthu/amor/code/manager.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 6bfe6fa28a5de901 · report
LlamaDynamicNTKScalingRotaryEmbedding jianguanthu/amor/code/manager.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 572dde6105d00036 · report
LlamaLinearScalingRotaryEmbedding jianguanthu/amor/code/manager.py official repository ran fingerprinted no licence file found · pointer only · 06c2cf625cad2b53 · report
LlamaMLP jianguanthu/amor/code/manager.py official repository ran · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · 8e8d8d9e109e9f1e · report
LlamaRMSNorm jianguanthu/amor/code/manager.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 50ff7976d78544ac · report
LlamaRotaryEmbedding jianguanthu/amor/code/manager.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 88c615c48b7dd37b · report
State jianguanthu/amor/code/manager.py official repository ran no licence file found · pointer only · 5fc26624516c1588 · report
apply_rotary_pos_emb JianGuanTHU/AMOR/code/modeling_llama.py official repository ran · fixture could not drive it no licence file found · pointer only · f725bc2d76076485 · report
encode_with_prompt_completion_format JianGuanTHU/AMOR/code/finetune.py official repository ran no licence file found · pointer only · 99e4a58eb23854c4 · report
get_decompose_prompt JianGuanTHU/AMOR/code/prompts.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · bd4037a865476156 · report
get_finish_prompt jianguanthu/amor/code/manager.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 229b36214feed61d · report
get_history_str JianGuanTHU/AMOR/code/get_reward.py official repository ran no licence file found · pointer only · fe65d70569706d67 · report
get_relevance_prompt jianguanthu/amor/code/manager.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 5b8b14beaf8deb74 · report
get_solve_prompt jianguanthu/amor/code/manager.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 76fe6fab3919e7d6 · report
rotate_half JianGuanTHU/AMOR/code/modeling_llama.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · b99eea6376d1e212 · report
text_toolkits jianguanthu/amor/code/manager.py official repository ran no licence file found · pointer only · 8fd91ae45180bf3e · report
LLama jianguanthu/amor/code/manager.py official repository unverified no licence file found · pointer only · 3df7b70913f4ced7 · report
LlamaDecoderLayer jianguanthu/amor/code/manager.py official repository unverified no licence file found · pointer only · 358cf499b8ba9ff5 · report
LlamaModel jianguanthu/amor/code/manager.py official repository unverified no licence file found · pointer only · 04e5aaed2ab55a45 · report
LlamaMoeSparseMoeBlock jianguanthu/amor/code/manager.py official repository unverified no licence file found · pointer only · e1590868abc435b3 · report
Manager jianguanthu/amor/code/manager.py official repository unverified no licence file found · pointer only · 0b69caf4cf9368d9 · report
apply_rotary_pos_emb identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · 9a65a30d006fc96e · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections