SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.00300 · 2024

Rationale-Guided Retrieval Augmented Generation for Medical Question Answering

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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 0 have no contract verdict; 6 failures of our instrument; 3 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/2411.00300.json · badge: /api/ran/2411.00300.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
dmis-lab/rag2 canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
combine_query_evidence Ran
ran; our contract draft was wrong, not the code
dmis-lab/rag2/retriever/rerank.py
pointer only (licence: NONE) · get_code("20436091ccb0536c")
How it ran

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

cpg_index_create Ran
ran; our contract draft was wrong, not the code
dmis-lab/rag2/retriever/retrieve.py
pointer only (licence: NONE) · get_code("dcb61d0b5ef6fc35")
How it ran

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

pmc_index_create Ran
ran; our contract draft was wrong, not the code
dmis-lab/rag2/retriever/retrieve.py
pointer only (licence: NONE) · get_code("87333551aaf59069")
How it ran

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

preprocess_dataset Ran
ran; our contract draft was wrong, not the code
dmis-lab/rag2/classifier/utils.py
pointer only (licence: NONE) · get_code("662378e999a32811")
How it ran

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

preprocess_features_function Ran
ran; our contract draft was wrong, not the code
dmis-lab/rag2/classifier/utils.py
pointer only (licence: NONE) · get_code("dcfd3106a6eeb7be")
How it ran

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

pubmed_index_create Ran
ran; our contract draft was wrong, not the code
dmis-lab/rag2/retriever/retrieve.py
pointer only (licence: NONE) · get_code("e55528aca1da09c1")
How it ran

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

load_model Not yet run
unverified (harvested, no recorded run)
dmis-lab/rag2/classifier/utils.py
pointer only (licence: NONE) · get_code("f013b9029a24e889")
How it ran

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

query_encode Not yet run
unverified (harvested, no recorded run)
dmis-lab/rag2/retriever/query_encode.py
pointer only (licence: NONE) · get_code("0527070a6ee7eb7e")
How it ran

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

rerank Not yet run
unverified (harvested, no recorded run)
dmis-lab/rag2/retriever/rerank.py
pointer only (licence: NONE) · get_code("f60fd4c647296b03")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dmis-lab/rag2 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 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 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.

FunctionAlso present inEarliest-datedOthers named
load_model 1 other paper
1 dated earlier
2403.14403 (2024-03)
Adaptive-RAG: Learning to Adapt Retrieval-Augmented Large Language Models through Question Complexity
preprocess_dataset 1 other paper
1 dated earlier
2403.14403 (2024-03)
Adaptive-RAG: Learning to Adapt Retrieval-Augmented Large Language Models through Question Complexity
preprocess_features_function 1 other paper
1 dated earlier
2403.14403 (2024-03)
Adaptive-RAG: Learning to Adapt Retrieval-Augmented Large Language Models through Question Complexity

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 (LLM) hold significant potential for applications in biomedicine, but they struggle with hallucinations and outdated knowledge. While retrieval-augmented generation (RAG) is generally employed to address these issues, it also has its own set of challenges: (1) LLMs are vulnerable to irrelevant or incorrect context, (2) medical queries are often not well-targeted for helpful information, and (3) retrievers are prone to bias toward the specific source corpus they were trained on. In this study, we present RAG$^2$ (RAtionale-Guided RAG), a new framework for enhancing the reliability of RAG in biomedical contexts. RAG$^2$ incorporates three key innovations: a small filtering model trained on perplexity-based labels of rationales, which selectively augments informative snippets of documents while filtering out distractors; LLM-generated rationales as queries to improve the utility of retrieved snippets; a structure designed to retrieve snippets evenly from a comprehensive set of four biomedical corpora, effectively mitigating retriever bias. Our experiments demonstrate that RAG$^2$ improves the state-of-the-art LLMs of varying sizes, with improvements of up to 6.1\%, and it outperforms the previous best medical RAG model by up to 5.6\% across three medical question-answering benchmarks. Our code is available at https://github.com/dmis-lab/RAG2.

For agents

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

get_harvested_code_for_paper("2411.00300")
get_code_for_paper("2411.00300")
have("2411.00300")

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

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

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

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

Connect an agent — have() is free.