SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.14199 · 2024

OpenScholar: Synthesizing Scientific Literature with Retrieval-augmented LMs

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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; 2 honoured the contract we drafted, 1 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.14199.json · badge: /api/ran/2411.14199.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
akariasai/openscholar_experteval canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
akariasai/openscholar canonical (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_avg_fine_grained_scores Ran
ran, honoured the contract we drafted
akariasai/openscholar_experteval/compute_metrics.py
pointer only (licence: NONE) · get_code("0c17dfce015ab2fe")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, akariasai/openscholar_experteval 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_openai_api_cost Ran
ran, honoured the contract we drafted
akariasai/openscholar/src/open_scholar.py
code served (permissive licence) · get_code("ebcbc14c5f0a26eb")
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 float, ndim 0, dtype family float, shape () 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 torch
import numpy as np

# Define arguments for calculate_openai_api_cost
ARGS = {
    'input_tokens': 1000,
    'output_tokens': 500,
    'model_name': 'gpt-4o'
}
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 float, ndim 0, dtype family float, shape () — shape () 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
get_finegrained_results Ran
ran; our contract draft was wrong, not the code
akariasai/openscholar_experteval/compute_metrics.py
pointer only (licence: NONE) · get_code("e09711ced33247ae")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, akariasai/openscholar_experteval 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_passage_pos_ids Ran
ran; our contract draft was wrong, not the code
akariasai/openscholar/retriever/api/passage_utils.py
code served (permissive licence) · get_code("2254a963dae027e0")
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 dict. 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 os
import tempfile
import pickle

# Create a temporary directory and files for testing
temp_dir = tempfile.mkdtemp()

# Create some dummy JSONL files with the expected naming pattern
for shard_id in range(3):
    filename = f'raw_passages-{shard_id}-of-16.jsonl'
    file_path = os.path.join(temp_dir, filename)
    with open(file_path, 'w') as f:
        for i in range(5):
            f.write(f'{{"id": {i}, "text": "passage {i}"}}\n')

# Create a temporary path for the pos_map_save_path
temp_save_dir = tempfile.mkdtemp()
pos_map_save_path = os.path.join(temp_save_dir, 'pos_id_map.pkl')

ARGS = {
    'passage_dir': temp_dir,
    'pos_map_save_path': pos_map_save_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
is_integer_string Ran
ran, violated the contract we drafted
akariasai/openscholar_experteval/use_search_apis.py
pointer only (licence: NONE) · get_code("4419dd4c768a4bb5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, akariasai/openscholar_experteval 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_citations Ran
ran; our contract draft was wrong, not the code
akariasai/openscholar_experteval/convert_output_files.py
pointer only (licence: NONE) · get_code("3ae3bb73bff5368f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, akariasai/openscholar_experteval 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
akariasai/openscholar/src/open_scholar.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
remove_citations Ran
ran; our contract draft was wrong, not the code
akariasai/openscholar_experteval/convert_output_files.py
pointer only (licence: NONE) · get_code("5fd3281e2c36928f")
How it ran

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

rerank_paragraphs_bge Ran
ran; our contract draft was wrong, not the code
akariasai/openscholar/src/open_scholar.py
code served (permissive licence) · get_code("9fcb6754cab0d0dd")
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 tuple. 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

class MockReranker(nn.Module):
    """Mock reranker that implements compute_score method"""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def compute_score(self, query_paragraph_pairs, batch_size=100):
        """
        Compute scores for query-paragraph pairs.
        Returns either a float (single pair) or list of floats (multiple pairs).
        """
        # Return a list of scores for multiple pairs
        scores = [0.85 - i * 0.1 for i in range(len(query_paragraph_pairs))]
        return scores

# Create mock reranker
reranker = MockReranker()

# Create query
query = "What is machine learning?"

# Create paragraphs with required structure
paragraphs = [
    {
        'text': 'Machine learning is a subset of artificial intelligence.',
        'title': 'ML Basics',
        'citation_counts': 5
    },
    {
        'text': 'Deep learning uses neural networks with multiple layers.',
        'title': 'Deep Learning',
        'citation_counts': 8
    },
    {
        'text': 'Neural networks are inspired by biological neurons.',
        'title': 'Neural Networks',
        'citation_counts': 3
    }
]

ARGS = {
    'query': query,
    'paragraphs': paragraphs,
    'reranker': reranker,
    'norm_cite': False,
    'start_index': 0,
    'use_abstract': False
}
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 tuple — a tuple output has no array shape of its own; none is 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
get_acceptance_results Not yet run
unverified (harvested, no recorded run)
akariasai/openscholar_experteval/compute_metrics.py
pointer only (licence: NONE) · get_code("8c75664adcd9b212")
How it ran

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

get_paper_data Not yet run
unverified (harvested, no recorded run)
akariasai/openscholar_experteval/use_search_apis.py
pointer only (licence: NONE) · get_code("f4d87e94b7582645")
How it ran

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

search_paper_via_title Not yet run
unverified (harvested, no recorded run)
akariasai/openscholar_experteval/use_search_apis.py
pointer only (licence: NONE) · get_code("b6c21051ff3f26c8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, akariasai/openscholar_experteval 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 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 10 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
remove_citations 7 other papers
5 dated earlier, 2 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
is_integer_string 1 other paper
1 dated earlier
2406.11370 (2024-06)
Fairer Preferences Elicit Improved Human-Aligned Large Language Model Judgments

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

Scientific progress depends on researchers' ability to synthesize the growing body of literature. Can large language models (LMs) assist scientists in this task? We introduce OpenScholar, a specialized retrieval-augmented LM that answers scientific queries by identifying relevant passages from 45 million open-access papers and synthesizing citation-backed responses. To evaluate OpenScholar, we develop ScholarQABench, the first large-scale multi-domain benchmark for literature search, comprising 2,967 expert-written queries and 208 long-form answers across computer science, physics, neuroscience, and biomedicine. On ScholarQABench, OpenScholar-8B outperforms GPT-4o by 5% and PaperQA2 by 7% in correctness, despite being a smaller, open model. While GPT4o hallucinates citations 78 to 90% of the time, OpenScholar achieves citation accuracy on par with human experts. OpenScholar's datastore, retriever, and self-feedback inference loop also improves off-the-shelf LMs: for instance, OpenScholar-GPT4o improves GPT-4o's correctness by 12%. In human evaluations, experts preferred OpenScholar-8B and OpenScholar-GPT4o responses over expert-written ones 51% and 70% of the time, respectively, compared to GPT4o's 32%. We open-source all of our code, models, datastore, data and a public demo.

For agents

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

get_harvested_code_for_paper("2411.14199")
get_code_for_paper("2411.14199")
have("2411.14199")

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

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

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

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

Connect an agent — have() is free.