SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.16843 · ICML · 2024

Trustworthy Alignment of Retrieval-Augmented Large Language Models via Reinforcement Learning

Jinhua Zhu, Wengang Zhou, Houqiang Li, Peng Zhang, Zongmeng Zhang, Yufeng Shi, Xiang Qi

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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; 4 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2410.16843.json · badge: /api/ran/2410.16843.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
zmzhang2000/trustworthy-alignment canonical (classifier label)
classifier basis: census
11 ran · 2 no recorded run
FunctionStatusWhere it lives
best_subspan_em Ran
ran, honoured the contract we drafted
zmzhang2000/trustworthy-alignment/dschat/utils/metrics.py
pointer only (licence: NONE) · get_code("0aadf110b32fdf12")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

calculate_flops Ran
ran, honoured the contract we drafted
zmzhang2000/trustworthy-alignment/dschat/utils/perf.py
pointer only (licence: NONE) · get_code("069f56cb00324e10")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

gather_log_probs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zmzhang2000/trustworthy-alignment/dschat/rlhf/ppo_trainer.py
pointer only (licence: NONE); the stored copy get_code serves, from zyushun/adam-mini, is pointer only (licence: NONE) · get_code("2f0a690c70d11c23")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

generate_qa_attributed_prompt Ran
ran; our contract draft was wrong, not the code
zmzhang2000/trustworthy-alignment/dschat/utils/prompts.py
pointer only (licence: NONE) · get_code("eff7424deef19565")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

generate_qa_base_prompt Ran
ran; our contract draft was wrong, not the code
zmzhang2000/trustworthy-alignment/dschat/utils/prompts.py
pointer only (licence: NONE) · get_code("9a6cc185b5239af7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

generate_qa_opinion_prompt Ran
ran; our contract draft was wrong, not the code
zmzhang2000/trustworthy-alignment/dschat/utils/prompts.py
pointer only (licence: NONE) · get_code("062abf04b8fabe82")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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_eval_ds_config Ran
ran; our contract draft was wrong, not the code
zmzhang2000/trustworthy-alignment/dschat/utils/ds_utils.py
pointer only (licence: NONE) · get_code("792e87a1badc5642")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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_hf_configs Ran
ran, honoured the contract we drafted
zmzhang2000/trustworthy-alignment/dschat/utils/perf.py
pointer only (licence: NONE) · get_code("df20c2f4083d17af")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

log_init Ran
ran, honoured the contract we drafted
zmzhang2000/trustworthy-alignment/dschat/rlhf/rlhf_engine.py
pointer only (licence: NONE) · get_code("429d42a3bf925da5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

multi_choice_hit Ran
ran, violated the contract we drafted
zmzhang2000/trustworthy-alignment/dschat/utils/metrics.py
pointer only (licence: NONE) · get_code("cf3df3743796f762")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

normalize_answer Ran
ran; our contract draft was wrong, not the code
zmzhang2000/trustworthy-alignment/dschat/utils/metrics.py
pointer only (licence: NONE) · get_code("9706a9a0b961096b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

causal_lm_model_to_fp32_loss Not yet run
unverified (harvested, no recorded run)
zmzhang2000/trustworthy-alignment/dschat/utils/model/model_utils.py
pointer only (licence: NONE) · get_code("b6934717c02ba140")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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.

create_hf_model Not yet run
unverified (harvested, no recorded run)
zmzhang2000/trustworthy-alignment/dschat/utils/model/model_utils.py
pointer only (licence: NONE) · get_code("4d2823b65af0c2df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zmzhang2000/trustworthy-alignment 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 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 5 the same month, 2 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
normalize_answer 11 other papers
8 dated earlier, 2 the same month, 1 later
2308.07922 (2023-08)
RAVEN: In-Context Learning with Retrieval-Augmented Encoder-Decoder Language Models
2403.04797 (2024-03)
Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encoding
2403.15268 (2024-03)
Awakening Augmented Generation: Learning to Awaken Internal Knowledge of Large Language Models for Question Answering
and 8 more not named here
gather_log_probs 9 other papers
8 dated earlier, 1 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2024.naacl-long.326 (2024 (year only))
LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback
and 6 more not named here
log_init 9 other papers
7 dated earlier, 1 later, 1 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2024.naacl-long.326 (2024 (year only))
LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback
and 6 more not named here
calculate_flops 6 other papers
5 dated earlier, 1 the same month
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2403.14112 (2024-03)
Benchmarking Chinese Commonsense Reasoning of LLMs: From Chinese-Specifics to Reasoning-Memorization Correlations
and 3 more not named here
get_hf_configs 6 other papers
5 dated earlier, 1 the same month
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2403.14112 (2024-03)
Benchmarking Chinese Commonsense Reasoning of LLMs: From Chinese-Specifics to Reasoning-Memorization Correlations
and 3 more not named here
best_subspan_em 5 other papers
4 dated earlier, 1 the same month
2403.04797 (2024-03)
Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encoding
2403.15268 (2024-03)
Awakening Augmented Generation: Learning to Awaken Internal Knowledge of Large Language Models for Question Answering
2406.02536 (2024-06)
Mitigate Position Bias in Large Language Models via Scaling a Single Dimension
and 2 more not named here
get_eval_ds_config 3 other papers
2 dated earlier, 1 the same month
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2405.16455 (2024-05)
On the Algorithmic Bias of Aligning Large Language Models with RLHF: Preference Collapse and Matching Regularization
2410.21662 (2024-10)
$f$-PO: Generalizing Preference Optimization with $f$-divergence Minimization
causal_lm_model_to_fp32_loss 2 other papers
2 dated earlier
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2405.16455 (2024-05)
On the Algorithmic Bias of Aligning Large Language Models with RLHF: Preference Collapse and Matching Regularization

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

Trustworthiness is an essential prerequisite for the real-world application of large language models. In this paper, we focus on the trustworthiness of language models with respect to retrieval augmentation. Despite being supported with external evidence, retrieval-augmented generation still suffers from hallucinations, one primary cause of which is the conflict between contextual and parametric knowledge. We deem that retrievalaugmented language models have the inherent capabilities of supplying response according to both contextual and parametric knowledge. Inspired by aligning language models with human preference, we take the first step towards aligning retrievalaugmented language models to a status where it responds relying merely on the external evidence and disregards the interference of parametric knowledge. Specifically, we propose a reinforcement learning based algorithm TRUSTWORTHY-ALIGNMENT, theoretically and experimentally demonstrating large language models' capability of reaching a trustworthy status without explicit supervision on how to respond. Our work highlights the potential of large language models on exploring its intrinsic abilities by its own and expands the application scenarios of alignment from fulfilling human preference to creating trustworthy agents. Our code is available at https://github.com/zmzhang2000/ trustworthy-alignment.

For agents

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

get_harvested_code_for_paper("2410.16843")
get_code_for_paper("2410.16843")
have("2410.16843")

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

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

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

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

Connect an agent — have() is free.