SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.06519 · 2026

MedRAGChecker: Claim-Level Verification for Biomedical Retrieval-Augmented Generation

Hang Zhang, Yanshan Wang, Yuelyu Ji, Chenyu Li, Min Kwak, Xizhi Wu, Kg-Based Verification

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 (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 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/2601.06519.json · badge: /api/ran/2601.06519.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
JoyDajunSpaceCraft/MedicalRagChecker community
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
CheckerGRPODataset Ran
ran on a synthesized input · constructed an object; no result was computed
JoyDajunSpaceCraft/MedicalRagChecker/DistillChecker/train_checker_grpo.py
code served (permissive licence) · get_code("3df6f2e4335f858e")
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 an instance of its own class, CheckerGRPODataset: the run constructed the object and did not call it, so no result was computed. 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 json
import tempfile
import os
from typing import List, Dict, Any
from torch.utils.data import Dataset, DataLoader

# Create a temporary JSONL file with valid data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_dataset.jsonl")

# Write sample JSONL data
sample_data = [
    {"prompt": "What is 2+2?", "label": "4"},
    {"prompt": "What is the capital of France?", "label": "Paris"},
    {"prompt": "What is machine learning?", "label": "A branch of AI"},
]

with open(temp_file, 'w', encoding='utf-8') as f:
    for row in sample_data:
        f.write(json.dumps(row) + '\n')

# Define ARGS dictionary with the path parameter
ARGS = {
    'path': temp_file
}
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 CheckerGRPODataset — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CheckerGRPODataset output the recorded ndim 1 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
EMA Ran
ran on a synthesized input · constructed an object; no result was computed
JoyDajunSpaceCraft/MedicalRagChecker/DistillChecker/train_checker_grpo.py
code served (permissive licence) · get_code("f00f759d773c335a")
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 an instance of its own class, EMA: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "alpha": 0.1
}
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 EMA — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EMA 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
_safe_lower Ran
ran; our contract draft was wrong, not the code
JoyDajunSpaceCraft/MedicalRagChecker/DistillChecker/train_checker_grpo.py
code served (permissive licence) · get_code("cb52efecb86e0b93")
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
import torch.nn as nn

torch.manual_seed(0)

# The function _safe_lower takes a single parameter 's' of type str
# It applies .lower(), .strip() on the string (or empty string if None)
# The function uses: (s or '') which handles None/falsy values, then .lower() and .strip()

ARGS = {
    's': 'HELLO WORLD  '
}
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_label Ran
ran; our contract draft was wrong, not the code
JoyDajunSpaceCraft/MedicalRagChecker/DistillChecker/train_checker_grpo.py
code served (permissive licence) · get_code("53c5419d9bb3ee24")
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
import numpy as np

def _safe_lower(s: str) -> str:
    return (s or '').lower().strip()

LABEL_ALIASES = {'entailed': {'entailed', 'entail', 'entails', 'supported', 'yes'}, 'contradicted': {'contradicted', 'contradict', 'refuted', 'no'}, 'neutral': {'neutral', 'unknown', 'insufficient', 'not enough info', 'not enough information', 'uncertain'}}

def normalize_label(text: str):
    """Map free-form checker output into one of LABELS or None."""
    t = _safe_lower(text).replace('.', '').replace('label:', '').strip()
    for lab, al in LABEL_ALIASES.items():
        for a in al:
            if t == a or t.startswith(a):
                return lab
    if 'contrad' in t or 'refut' in t:
        return 'contradicted'
    if 'neutral' in t or 'insufficient' in t or 'not enough' in t or ('uncertain' in t):
        return 'neutral'
    if 'entail' in t or 'support' in t or t in {'yes', 'y'}:
        return 'entailed'
    return None

# Test cases for normalize_label
test_cases = [
    "entailed",
    "contradicted",
    "neutral",
    "yes",
    "no",
    "entails",
    "refuted",
    "uncertain",
    "not enough info",
    "LABEL: entail.",
    "support",
    "contradict",
    "unknown",
    "maybe",
]

ARGS = {
    'text': 'entailed'
}
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 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
eval_on_pairs Not yet run
unverified (harvested, no recorded run)
JoyDajunSpaceCraft/MedicalRagChecker/DistillChecker/train_checker_grpo.py
code served (permissive licence) · get_code("1443de747bfc2955")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
JoyDajunSpaceCraft/MedicalRagChecker/DistillChecker/train_checker_grpo.py
code served (permissive licence) · get_code("c31a4f29f9c5f375")
How it ran

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

Biomedical retrieval-augmented generation (RAG) produces long-form answers that mix supported, under-evidenced, and contradicted claims, demanding fine-grained verification. We propose MEDRAGCHECKER, a claimlevel diagnostic framework that (i) decomposes answers into atomic claims, (ii) verifies each claim by combining textual natural language inference (NLI) with a knowledge-graph (KG) consistency signal, and (iii) uses a selective gating rule to fuse the two signals only when the KG signal is decisive, falling back to NLI otherwise. To assess our framework on biomedical RAG, we distill a GPT-4.1 teacher into compact student checkers and evaluate across four biomedical QA benchmarks (PubMedQA, MedQuAD, LiveQA, MedRedQA) with three biomedical generators. MEDRAGCHECKER achieves comparable answer-level faithfulness to general-purpose RAG evaluators while additionally producing safety-critical error diagnostics that align with human judgment on decision-flip claims (69.8% agreement vs. 63.4% for NLI-only). As an additional analysis, we instantiate the KG component with two back-ends of differing scope-DRKG and BioPortal-and find that KG coverage substantially affects fusion quality: an incomplete KG can inflate hallucination via false contradictions on uncovered claims, motivating our selective gating design.

For agents

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

get_harvested_code_for_paper("2601.06519")
get_code_for_paper("2601.06519")
have("2601.06519")

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

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

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

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

Connect an agent — have() is free.