SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.10063 · ICLR · 2023

Generate rather than Retrieve: Large Language Models are Strong Context Generators

Chenguang Zhu, Yichong Xu, Michael Zeng, Shuohang Wang, Soumya Sanyal, Wenhao Yu, Meng Jiang, Dan Iter, Mingxuan Ju

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 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; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2209.10063.json · badge: /api/ran/2209.10063.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
wyu97/GenRead canonical (classifier label)
classifier basis: classifier_2025
5 ran · 1 no recorded run
FunctionStatusWhere it lives
TimeoutException Ran
ran on a synthesized input · constructed an object; no result was computed
wyu97/GenRead/inference.py
pointer only (licence: NONE) · get_code("251dbd78999130c3")
How it ran

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

add_prompt Ran
ran; our contract draft was wrong, not the code
wyu97/GenRead/inference.py
pointer only (licence: NONE) · get_code("516d32b8af5f75d7")
How it ran

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

clustering_prompt Ran
ran; our contract draft was wrong, not the code
wyu97/GenRead/inference.py
pointer only (licence: NONE) · get_code("2dfa6c5cb8089dca")
How it ran

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

readfiles Ran
ran; our contract draft was wrong, not the code
wyu97/GenRead/mainfunc.py
pointer only (licence: NONE) · get_code("ed1a7cdd6a385a75")
How it ran

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

time_limit Ran
ran; our contract draft was wrong, not the code
wyu97/GenRead/inference.py
pointer only (licence: NONE) · get_code("e1e837332edb0441")
How it ran

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

run_inference Not yet run
unverified (harvested, no recorded run)
wyu97/GenRead/inference.py
pointer only (licence: NONE) · get_code("002e293469caa46e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wyu97/GenRead 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 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, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 4 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
readfiles 2 other papers
2 later
2305.14766 (2023-05)
Allies: Prompting Large Language Model with Beam Search
2409.13203 (2024-09)
Neural-Symbolic Collaborative Distillation: Advancing Small Language Models for Complex Reasoning Tasks
clustering_prompt 1 other paper
1 later
2409.13203 (2024-09)
Neural-Symbolic Collaborative Distillation: Advancing Small Language Models for Complex Reasoning Tasks

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

Repositories linked to this paper

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

Abstract

Knowledge-intensive tasks, such as open-domain question answering (QA), require access to a large amount of world or domain knowledge. A common approach for knowledge-intensive tasks is to employ a retrieve-then-read pipeline that first retrieves a handful of relevant contextual documents from an external corpus such as Wikipedia and then predicts an answer conditioned on the retrieved documents. In this paper, we present a novel perspective for solving knowledge-intensive tasks by replacing document retrievers with large language model generators. We call our method generate-then-read (GENREAD), which first prompts a large language model to generate contextual documents based on a given question, and then reads the generated documents to produce the final answer. Furthermore, we propose a novel clustering-based prompting method that selects distinct prompts, in order to generate diverse documents that cover different perspectives, leading to better recall over acceptable answers. We conduct extensive experiments on three different knowledge-intensive tasks, including open-domain QA, fact checking, and dialogue system. Notably, GENREAD achieves 71.6 and 54.4 exact match scores on TriviaQA and WebQ, significantly outperforming the state-of-the-art retrieve-thenread pipeline DPR-FiD by +4.0 and +3.9, without retrieving any documents from any external knowledge source. Lastly, we demonstrate the model performance can be further improved by combining retrieval and generation. Our code and generated documents can be found at https://github.com/wyu97/GenRead. § Unless otherwise specified, we use the text-davinci-002 version of InstructGPT in our experiments.

For agents

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

get_harvested_code_for_paper("2209.10063")
get_code_for_paper("2209.10063")
have("2209.10063")

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

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

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

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

Connect an agent — have() is free.