Papers
Topics
Authors
Recent
Search
2000 character limit reached

LARCH: LLM-Based Automated README Generation

Updated 5 July 2026
  • LARCH is a system that uses large language models and heuristics to retrieve representative code for automatically generating project-level README files.
  • It employs weak supervision with multiple labeling functions and gradient boosting trees to rank code fragments for optimal documentation.
  • Evaluations show LARCH significantly enhances factual correctness and overall usefulness compared to random file prompting in README generation.

to=arxiv_search.search 彩神争霸怎么样්ඩjson {"query":"(Koreeda et al., 2023) LARCH LLM-based Automatic Readme Creation with Heuristics (Dauterman et al., 2023, Zhao et al., 6 Jun 2026, Beran et al., 2010, Bardet, 2021, Clavijo et al., 2021, Clavijo et al., 2021, Sprik, 9 Jan 2025, Salvadori et al., 18 Dec 2025)", "max_results": 10} 爱赢 შედეგ to=arxiv_search.search code 娱乐平台招商 ҭак [{"arxiv_id":"(Koreeda et al., 2023)","title":"LARCH: LLM-based Automatic Readme Creation with\n Heuristics","authors":["Takaki Hachiya","Yasushi Kiyono","Yuta Suzuki","Minoru Yoshida"],"published":"2023-08-07","summary":"Writing a readme is a crucial aspect of software development as it plays a vital role in managing and reusing program code. Though it is a pain point for many developers, automatically creating one remains a challenge even with the recent advancements in LLMs, because it requires generating an abstract description from thousands of lines of code. In this demo paper, we show that LLMs are capable of generating a coherent and factually correct readmes if we can identify a code fragment that is representative of the repository. Building upon this finding, we developed LARCH (LLM-based Automatic Readme Creation with Heuristics) which leverages representative code identification with heuristics and weak supervision. Through human and automated evaluations, we illustrate that LARCH can generate coherent and factually correct readmes in the majority of cases, outperforming a baseline that does not rely on representative code identification. We have made LARCH open-source and provided a cross-platform Visual Studio Code interface and command-line interface, accessible at this https URL. A demo video showcasing LARCH's capabilities is available on YouTube."},{"arxiv_id":"(Dauterman et al., 2023)","title":"Accountable authentication with privacy protection: The Larch system for\n universal login","authors":["Micah Corrin","Pamela Wisniewski","Riad S. Wahby"],"published":"2023-05-31","summary":"Credential compromise is hard to detect and hard to mitigate. To address this problem, we present larch, an accountable authentication framework with strong security and privacy properties. Larch protects user privacy while ensuring that the larch log server correctly records every authentication. Specifically, an attacker who compromises a user's device cannot authenticate without creating evidence in the log, and the log cannot learn which web service (relying party) the user is authenticating to. To enable fast adoption, larch is backwards-compatible with relying parties that support FIDO2, TOTP, and password-based login. Furthermore, larch does not degrade the security and privacy a user already expects: the log server cannot authenticate on behalf of a user, and larch does not allow relying parties to link a user across accounts. We implement larch for FIDO2, TOTP, and password-based login. Given a client with four cores and a log server with eight cores, an authentication with larch takes 150ms for FIDO2, 91ms for TOTP, and 74ms for passwords (excluding preprocessing, which takes 1.23s for TOTP)."},{"arxiv_id":"(Zhao et al., 6 Jun 2026)","title":"Larch: Learned Query Optimization for Semantic Predicates","authors":["Ruixing Li","Huan Wu","Yongjoo Park","Arian Albarghouthi","Andreas\n Madsen","Murat Demirbas","Manos Athanassoulis"],"published":"2026-06-09","summary":"With the advent of LLMs, many database systems introduced semantic operators that enabled analytical queries over unstructured data (e.g. text, images, videos). Semantic operators typically incur high inference costs and latencies making semantic (AI) SQL queries challenging to apply on large scale datasets. At the same time, their semantic nature leads database engines to treat them as black boxes, making AISQL queries difficult to optimize. In this paper, we introduce Larch, a framework for optimizing the execution of semantic filters in AI SQL queries. Larch was inspired by two key observations: i) the high latency of semantic operators leaves significant room for computationally-heavy runtime optimization techniques, ii) unstructured data are typically accompanied by semantic information in the form of embeddings allowing for efficient semantic comparisons between AI_FILTER prompts and data values. Based on these two key observations, we present two Larch variants: Larch-A2C and Larch-Sel. Larch-A2C encodes arbitrary semantic filters expression tree using an embedding-augmented Gated Graph Neural Network and formulates the filter evaluation order as a Markov decision process. In contrast, Larch-Sel leverages a supervised learning model to predict filter selectivities, subsequently applying dynamic programming to find a near-optimal evaluation order for each input row. Evaluated across diverse real-world datasets and comprehensive synthetic workloads, both Larch variants always outperform existing semantic filter optimization techniques in terms of token usage. Our results demonstrate that Larch is robust across diverse workloads, reducing total token cost overhead by 3x-19x compared to Palimpzest and Quest."},{"arxiv_id":"(Beran et al., 2010)","title":"On approximate pseudo-maximum likelihood estimation for LARCH-processes","authors":["Jan Beran","Michaela Schützner"],"published":"2010-01-12","summary":"Linear ARCH (LARCH) processes were introduced by Robinson [J.\n Econometrics 47 (1991) 67--84] to model long-range dependence in volatility and leverage. Basic theoretical properties of LARCH processes have been investigated in the recent literature. However, there is a lack of estimation methods and corresponding asymptotic theory. In this paper, we consider estimation of the dependence parameters for LARCH processes with non-summable hyperbolically decaying coefficients. Asymptotic limit theorems are derived. A central limit theorem with sqrt(n)-rate of convergence holds for an approximate conditional pseudo-maximum likelihood estimator. To obtain a computable version that includes observed values only, a further approximation is required. The computable estimator is again asymptotically normal, however with a rate of convergence that is slower than sqrt(n)."},{"arxiv_id":"(Bardet, 2021)","title":"A new estimator for LARCH processes","authors":["William Nditi","Yves T. Houndetoungan","Mouhamadou Moustapha Lo"],"published":"2021-10-26","summary":"The aim of this paper is to provide a new estimator of parameters for LARCH()(\infty) processes, and thus also for LARCH(p)(p) or GLARCH(p,q)(p,q) processes. This estimator results from minimising a contrast leading to a least squares estimator for the absolute values of the process. Strong consistency and asymptotic normality are shown, and convergence occurs at the rate sqrt n as well in short or long memory cases. Numerical experiments confirm the theoretical results and show that this new estimator significantly outperforms the smoothed quasi-maximum likelihood estimators or weighted least squares estimators commonly used for such processes."},{"arxiv_id":"(Clavijo et al., 2021)","title":"Extended Larch\'e--Cahn framework for reactive Cahn--Hilliard\n multicomponent systems","authors":["Panayotis P. Athanasopoulos","Paulo M. C. C. Magalhães","Alex M.\n N. Nikitas","Cyril Miehe"],"published":"2021-01-05","summary":"At high temperature and pressure, solid diffusion and chemical reactions between rock minerals lead to phase transformations. Chemical transport during uphill diffusion causes phase separation, that is, spinodal decomposition. Thus, to describe the coarsening kinetics of the exsolution microstructure, we derive a thermodynamically consistent continuum theory for the multicomponent Cahn--Hilliard equations while accounting for multiple chemical reactions and neglecting deformations. Our approach considers multiple balances of microforces augmented by multiple constituent content balance equations within an extended Larch\'e--Cahn framework. As for the Larch\'e--Cahn framework, we incorporate into the theory the Larch\'e--Cahn derivatives with respect to the phase fields and their gradients. We also explain the implications of the resulting constrained gradients of the phase fields in the form of the gradient energy coefficients. Moreover, we derive a configurational balance that includes all the associated configurational fields in agreement with the Larch\'e--Cahn framework. We study phase separation in a three-component system whose microstructural evolution depends upon the reaction-diffusion interactions and to analyze the underlying configurational fields. This simulation portrays the interleaving between the reaction and diffusion processes and how the configurational tractions drive the motion of interfaces."},{"arxiv_id":"(Clavijo et al., 2021)","title":"A continuum theory for mineral solid solutions undergoing\n chemo-mechanical processes","authors":["Panayotis P. Athanasopoulos","Alex M. N. Nikitas","Cyril Miehe"],"published":"2021-01-11","summary":"Recent studies on metamorphic petrology as well as microstructural observations suggest the influence of mechanical effects upon chemically active metamorphic minerals. Thus, the understanding of such a coupling is crucial to describe the dynamics of geomaterials. In this effort, we derive a thermodynamically-consistent framework to characterize the evolution of chemically active minerals. We model the metamorphic mineral assemblages as a solid-species solution where the species mass transport and chemical reaction drive the stress generation process. The theoretical foundations of the framework rely on modern continuum mechanics, thermodynamics far from equilibrium, and the phase-field model. We treat the mineral solid solution as a continuum body, and following the Larch\'e and Cahn network model, we define displacement and strain fields. Consequently, we obtain a set of coupled chemo-mechanical equations. We use the aforementioned framework to study single minerals as solid solutions during metamorphism. Furthermore, we emphasise the use of the phase-field framework as a promising tool to model complex multi-physics processes in geoscience. Without loss of generality, we use common physical and chemical parameters found in the geoscience literature to portrait a comprehensive view of the underlying physics. Thereby, we carry out 2D and 3D numerical simulations using material parameters for metamorphic minerals to showcase and verify the chemo-mechanical interactions of mineral solid solutions that undergo spinodal decomposition, chemical reactions, and deformation."},{"arxiv_id":"(Sprik, 9 Jan 2025)","title":"Thermodynamics of a compressible lattice gas crystal: Generalized\n Gibbs-Duhem equation and adsorption","authors":["Richard G. Morris"],"published":"2025-01-10","summary":"Compressible lattice gas models are used in material science to understand the coupling between composition and strain in alloys. The seminal work in this field is the 1973 Larch\n e}-Cahn paper (Acta Metall. {\bf 21} 1051-1063). Single-phase crystals in Larch\n e}-Cahn theory are stable under open constant pressure, constant temperature conditions. The Gibbs free energy does not have to match the product μN\mu N of the number of particles NN and their chemical potential μ\mu. Discrepancies already arise under hydrostatic stress. The reason is that volume strain is defined with respect to a fixed reference state. The elastic energy is not proportional to volume and the Gibbs-Duhem relation valid for liquids is violated. Extensivity can be recovered by treating the number of lattice sites MM as an additional thermodynamic variable. This assigns a formal chemical potential ν\nu to the immobile lattice sites. The difference GμNG-\mu N can be identified with νM\nu M. We have worked this out for a one-component compressible lattice gas crystal. Shear stress is omitted. The reinstated Gibbs-Duhem equation can be cast in the form of an adsorption equation and applied to quantify the tendency to vacancy creation. The derivative of population with respect to chemical potential at constant pressure and temperature is compared to the corresponding susceptibility in a fixed volume open system. We find that the difference is proportional to the elastic constant of the bare lattice, confirming that this quantity is the crucial macroscopic property distinguishing a solid under hydrostatic stress from a liquid."},{"arxiv_id":"(Sadovsky et al., 2016)","title":"Intriguing symmetry in statistical structures of Siberian larch\n transcriptome","authors":["Yuri I. Wolf","Nikolay A. Kolchanov","Yurii A. Shlyapnikov","Pavel S.\n Tiurina","Eugene V. Sadovsky"],"published":"2016-04-01","summary":"The paper presents a novel approach to infer a structuredness in a set of symbol sequences such as transcriptome nucleotide sequences. A distribution pattern of triplet frequencies in the Siberian larch (textit{Larix sibirica}~Ledeb.) transcriptome sequences was investigated in the presented study. It was found that the larch transcriptome demonstrates a number of unexpected symmetries in the statistical and combinatorial properties."}]} LARCH, short for LLM-based Automatic Readme Creation with Heuristics, is a system for automatically generating README files for software repositories by combining LLMs with representative code identification rather than whole-repository prompting. It was introduced as a response to a practical documentation problem: README writing is essential for reuse and maintenance, yet generating a repository-level abstract description from thousands or even millions of lines of code exceeds typical LLM context limits and makes naive prompting unreliable. The central claim of the system is that README generation becomes much more feasible when the pipeline first retrieves a compact code fragment that “gives an overview” of the repository and only then asks the LLM to synthesize the documentation (Koreeda et al., 2023).

1. Problem formulation and design premise

LARCH treats README generation as distinct from function- or class-level comment generation. The target output is not a local explanation of a bounded code unit, but an abstract summary of a repository’s goals, usage, and high-level organization. In the formulation used by the system, this creates two interacting difficulties: repository scale exceeds model context length, and a randomly selected file often fails to reflect the repository’s purpose.

The system therefore frames README generation as a retrieval-augmented generation problem. The retrieval stage is not generic document retrieval, but representative code identification: the system attempts to select a single file, or at least a compact fragment, that is most informative about the repository as a whole. This premise is motivated by the observation that LLMs can generate coherent and factually correct readmes if they are given code that is genuinely representative of the project, whereas whole-repository prompting is infeasible for average repositories and random-file prompting is systematically unreliable (Koreeda et al., 2023).

A practical implication is that LARCH is organized around a bottleneck different from that of many code-generation systems. The decisive step is not the final text generation alone, but the upstream selection of a repository fragment that preserves enough semantic signal for the LLM to infer project-level intent.

2. Representative code identification via weak supervision and ranking

To identify representative code without constructing a manually labeled corpus, LARCH uses weak supervision in the Snorkel-style data programming paradigm. Each heuristic labeling function produces noisy labels

(p)(p)0

where (p)(p)1 denotes abstention, and Snorkel estimates both labeling-function accuracies and posterior labels

(p)(p)2

with

(p)(p)3

indicating whether a file is representative. The implementation uses 14 labeling functions in total (Koreeda et al., 2023).

These labeling functions combine several families of signals. Content-based signals include whether a file contains a main function name, an argument parser, or a web framework such as Flask, whether the file is too short, and raw content length. Filename and directory cues include whether the filename contains main, whether it resembles an entry point such as cli.py, whether it is __init__.py, whether it looks like a test file, and directory depth from the project root. Static-analysis cues include whether the file is at the top or bottom of the import tree, its distance from the top, number of internal imports, number of importers, whether it contains a class inherited by many others, and how many classes inherit from it. The paper also introduces oracle functions based on the reference README, such as whether the file has the same name as the repository, whether it is listed as an entry point in setup.py, and whether it is imported in the reference README; these are explicitly described as unavailable in normal deployment but useful as strong cues during research.

After weak supervision produces silver labels, LARCH trains gradient boosting trees in a learning-to-rank formulation. This choice is motivated by the repository-level objective: the goal is not to classify every representative file, but to rank files within a repository so that one best file can be selected. The ranking features largely mirror the labeling functions, but oracle features are removed and continuous values replace purely Boolean indicators. This design is also intended to reduce repository-level heuristic biases, such as repositories in which many files contain main in their names.

3. Prompt construction and language-model generation

Once a representative file has been selected, LARCH constructs a prompt for the LLM. The template includes an instruction of the form “Here is the entrypoint of a Python project …”, followed by the representative code, then a short list of filenames from the repository, and finally the request “Write a detailed readme in markdown.” In the reported implementation, the backend model is OpenAI’s GPT-3 davinci-text-003, with a prompt length of 3,000 tokens and maximum generation length of 910 tokens (Koreeda et al., 2023).

The prompt-engineering observations are notably pragmatic. Imperative phrasing was found to work better than declarative phrasing for GPT-3. Mentioning “markdown” and “Python” usually did not help much, although it could reduce catastrophic mistakes when the input code was short. If the project name was not known, the model could infer one. Adding filenames also helped when a project contained many variations of a similar functionality.

Within this design, the LLM is not asked to reason over the repository exhaustively. Its role is narrower and more structured: it transforms a selected representative file plus minimal repository metadata into a fluent README. The system’s architecture therefore assigns abstraction to two stages: retrieval compresses the repository into a semantically informative fragment, and generation lifts that fragment into project-level prose.

4. Evaluation protocol and reported results

The evaluation uses public GitHub repositories satisfying several criteria: more than 100 stars, written in Python, smaller than 500 MB and fewer than 1,000 files, containing an English Markdown README, and created after GPT-3’s publication date (June 11, 2020). The study randomly selected 1,500 repositories for automatic evaluation, and 20 of those were also used for human evaluation. For each repository, the README and setup.py were removed and the README was used as reference data. The repositories averaged 38.3 files and 103,302 tokens, which the paper uses to illustrate why whole-repository prompting is infeasible (Koreeda et al., 2023).

The baseline is deliberately simple: instead of representative code identification, it feeds a randomly selected Python file to the LLM. Human evaluation was double-blind and compared the two systems in random order. Evaluators assessed overall usefulness using three levels—“Useful,” “Fair,” and “Useless”—and also judged whether the generated README included the project goal and instructions, whether it was grammatically correct, whether Markdown formatting was correct, and whether text and code were factually correct.

The reported human results show that both systems always included project goal and instructions and were always grammatical and Markdown-correct, but LARCH was substantially better in factual correctness. In overall usefulness, LARCH was judged “Useful” 65% of the time versus 40% for random-file prompting, while “Useless” decreased from 40% to 15%. Text correctness improved from 55% to 75%, and code correctness from 30% to 65%. The improvement in overall usefulness was reported as significant with

(p)(p)4

under the Wilcoxon signed-rank test, and LARCH performed equally or better than the baseline in 95% of repositories.

Automated evaluation used ROUGE against held-out reference READMEs:

Metric Random-file baseline LARCH
ROUGE-1 20.9 22.0
ROUGE-2 4.9 5.9
ROUGE-L 10.7 11.4

The paper also includes qualitative examples in which LARCH identifies an entry-point file for a straightforward application and a main class container for a class-based library. These examples support the broader interpretation that representative-code retrieval, rather than raw model fluency, is the main source of the observed performance gain.

5. Strengths, limitations, and operational characteristics

The principal strength claimed for LARCH is that representative code selection substantially improves factual correctness and overall usefulness relative to random-file prompting. This does not eliminate hallucination. The paper explicitly reports failure cases, including confusion between GeoTIFF and GeoJSON, and a licensing error in which the model inferred MIT when the repository was actually GPL. The license error is attributed to the fact that license information was not included in the prompt, and the paper presents this as an easily fixable engineering issue (Koreeda et al., 2023).

The limitations are therefore epistemic rather than purely linguistic. The generated README may be coherent and well formatted while still being factually incorrect. For that reason, human review or editing is described as advisable. The ethical discussion follows the same line: README misinformation can cause bugs or legal issues, but the intended user is the repository’s own developer, who can check and correct the result. The paper also notes that inference-time use of an LLM has a nontrivial carbon footprint, though it argues that the productivity gain justifies this cost.

Operationally, LARCH is open source at https://github.com/hitachi-nlp/larch. It provides both a cross-platform Visual Studio Code interface and a command-line interface, can be run through an API server or directly via CLI, is distributed as a Python pip package, and offers the VS Code interface as a .vsix plugin. The reported end-to-end runtime is about 20 seconds. The current implementation focuses on Python projects, while the framework is explicitly presented as extensible to other languages in future work.

6. Scope of the term and bibliographic ambiguity

In contemporary arXiv literature, LARCH is not a unique designation. Beyond README generation, the term appears in several unrelated technical domains. In time-series econometrics, LARCH denotes Linear ARCH processes and their estimation theory [(Beran et al., 2010); (Bardet, 2021)]. In materials science and geoscience, the name appears through the Larché–Cahn lineage of chemo-mechanical and phase-field formulations (Clavijo et al., 2021, Clavijo et al., 2021, Sprik, 9 Jan 2025, Salvadori et al., 18 Dec 2025). It is also used for a privacy-preserving accountable authentication framework for universal login (Dauterman et al., 2023) and for a learned query-optimization framework for semantic predicates in AI SQL (Zhao et al., 6 Jun 2026).

This ambiguity matters in citation and literature search. Within software engineering and LLM-assisted documentation, however, LARCH most specifically refers to the README-generation system built around representative code identification with heuristics and weak supervision (Koreeda et al., 2023).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to LARCH.