SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2025.findings-acl.588 · ACL Findings · 2025

All That Glitters is Not Gold: Improving Robust Retrieval-Augmented Language Models with Fact-Centric Preference Alignment

Haiyu Zhao, Jia Hao, Chunhong Zhang, Jiarun Liu, Zhiqiang Zhan, Zheng Hu

Open in the Atlas

Code that ran

6 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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2025.findings-acl.588.json · badge: /api/ran/2025.findings-acl.588.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
princeton-nlp/ALCE canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
doc_to_text_dense Ran
ran; our contract draft was wrong, not the code
princeton-nlp/ALCE/searcher.py
pointer only (licence: MIT); the stored copy get_code serves, from beastyz/llm-verified-retrieval, is pointer only (licence: NONE) · get_code("6fd0394cdc745c1a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from beastyz/llm-verified-retrieval, and GitHub detected no licence in that repository 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.

doc_to_text_tfidf Ran
ran; our contract draft was wrong, not the code
princeton-nlp/ALCE/searcher.py
pointer only (licence: MIT); the stored copy get_code serves, from beastyz/llm-verified-retrieval, is pointer only (licence: NONE) · get_code("af88e97a5d3a1410")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from beastyz/llm-verified-retrieval, and GitHub detected no licence in that repository 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.

gtr_build_index Ran
ran on a synthesized input
princeton-nlp/ALCE/retrieval.py
code served (permissive licence) · get_code("c15a972a302a288b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import pickle
import torch
import numpy as np
from unittest.mock import MagicMock

torch.manual_seed(0)

# Create a mock encoder that has an encode method
class MockEncoder:
    def encode(self, docs, batch_size=4, show_progress_bar=True, normalize_embeddings=True):
        # Return embeddings with shape (num_docs, embedding_dim)
        num_docs = len(docs)
        embedding_dim = 4
        embs = np.random.randn(num_docs, embedding_dim).astype('float32')
        return embs

encoder = MockEncoder()

# Create sample documents
docs = ["document one", "document two"]

# Set up the GTR_EMB environment variable to point to a temporary location
os.environ['GTR_EMB'] = '/tmp/gtr_embeddings.pkl'

ARGS = {
    'encoder': encoder,
    'docs': docs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_doc_prompt Ran
ran; our contract draft was wrong, not the code
princeton-nlp/ALCE/utils.py
code served (permissive licence) · get_code("c7d29eb322d5d6e3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct valid arguments for make_doc_prompt
doc = {
    'text': 'This is the main body text of the document.',
    'title': 'Sample Document Title',
    'summary': 'This is a shorter summary version.'
}

doc_id = 0

doc_prompt = 'Document {ID}: {T}\n{P}'

use_shorter = None

ARGS = {
    'doc': doc,
    'doc_id': doc_id,
    'doc_prompt': doc_prompt,
    'use_shorter': use_shorter
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize_answer Ran
ran; our contract draft was wrong, not the code
princeton-nlp/ALCE/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from shmsw25/GraphRetriever, is pointer only (licence: NONE) · get_code("dae7ab386661a4f4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from shmsw25/GraphRetriever, and GitHub detected no licence in that repository 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.

remove_citations Ran
ran; our contract draft was wrong, not the code
princeton-nlp/ALCE/post_hoc_cite.py
code served (permissive licence) · get_code("5df8b525aada9853")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def remove_citations(sent):
    return re.sub('\\[\\d+', '', re.sub(' \\[\\d+', '', sent)).replace(' |', '').replace(']', '')

ARGS = {
    'sent': 'This is a sample sentence [1 with citations [2 and more [3 text.'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

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, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 2 later) and 0 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 133 other papers
103 dated earlier, 17 later, 12 same year, order not determinable, 1 undated · 1 only as an assembly brick
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 130 more not named here
remove_citations 7 other papers
6 dated earlier, 1 later
2305.14627 (2023-05)
Enabling Large Language Models to Generate Text with Citations
2311.07838 (2023-11)
LLatrieval: LLM-Verified Retrieval for Verifiable Generation
2402.04315 (2024-02)
Training Language Models to Generate Text with Citations via Fine-grained Rewards
and 4 more not named here
make_doc_prompt 3 other papers
3 dated earlier
2305.14627 (2023-05)
Enabling Large Language Models to Generate Text with Citations
2311.07838 (2023-11)
LLatrieval: LLM-Verified Retrieval for Verifiable Generation
2402.04315 (2024-02)
Training Language Models to Generate Text with Citations via Fine-grained Rewards
doc_to_text_dense 2 other papers
2 dated earlier
2305.14627 (2023-05)
Enabling Large Language Models to Generate Text with Citations
2311.07838 (2023-11)
LLatrieval: LLM-Verified Retrieval for Verifiable Generation
doc_to_text_tfidf 2 other papers
2 dated earlier
2305.14627 (2023-05)
Enabling Large Language Models to Generate Text with Citations
2311.07838 (2023-11)
LLatrieval: LLM-Verified Retrieval for Verifiable Generation
gtr_build_index 1 other paper
1 dated earlier
2305.14627 (2023-05)
Enabling Large Language Models to Generate Text with Citations

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-24.

Repositories linked to this paper

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

Abstract

Retrieval-augmented language model (RALM) relies on retrieved external knowledge to generate responses, resulting in vulnerability in the face of retrieval results with noisy documents. Previous works integrate additional filters or finetune Large Language Models (LLMs) to learn adaptive retrieval to reduce the performance damage of noisy documents. However, prior noise filtering may lead to the loss of crucial information, and these methods do not focus on distracting documents with high semantic relevance, which is the most challenging problem. In this study, we propose a training method for fact-centric preference alignment (FPA) to improve the ability of LLMs to directly extract useful information from noisy retrieval results without prior filtering. Our method performs positive document mining based on factual consistency and uses LLMs self-generated synthetic data as training data without manual annotation. We evaluate our FPA on four question answering benchmarks, and the experimental results demonstrate that our method achieves significant improvement with a small scale of training data. 1 * Corresponding author. 1 Our code is available at https://github.com/ haojia-hj/FPA.

For agents

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

get_harvested_code_for_paper("2025.findings-acl.588")
get_code_for_paper("2025.findings-acl.588")
have("2025.findings-acl.588")

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

curl https://syntology.ai/api/ran/2025.findings-acl.588.json

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

[![Syntology run record](https://syntology.ai/api/ran/2025.findings-acl.588.svg)](https://syntology.ai/paper/2025.findings-acl.588)

Connect an agent — have() is free.