Editor’s introduction
The study presents a taxonomy of seven study types in software engineering that involve large language models, offering a structured framework for how these models are applied. It introduces eight guidelines, each with clear requirements and recommendations, tailored to specific study types. Researchers are advised to declare LLM usage, report model versions and configurations, document system and prompt design, and include session traces. The guidelines also emphasize using human judgment to validate outputs, selecting appropriate baselines, and clearly articulating study limitations. Instead, it provides a foundational resource for improving transparency and reproducibility in LLM-based software engineering research.
Introduction
Since the release of ChatGPT in November 2022, large language models (LLMs) have been adopted widely across software engineering (SE) research, yet the reproducibility and replicability of empirical studies involving LLMs remains uncertain. Recent findings indicate low reproducibility in SE studies involving LLMs. examined 85 LLM-centric ICSE and ASE 2024 papers. Of the 18 papers that both used OpenAI models and provided artifacts, only five were complete enough to execute, and none fully reproduced the original results. A cited study found at least one LLM-specific pitfall in each of 72 peer-reviewed security and SE papers from 2023–2024, and only 15.7% of the observed pitfalls were discussed.
LLM-based SE studies are hard to reproduce for three reasons. First, their inherent non-determinism causes variability across runs, and slight changes can lead to substantially different results. Second, commercial models evolve beyond version identifiers, so reported performance can change over time. Third, even for “open” models, training data and fine-tuning details often remain undisclosed. Moreover, prompt formatting choices alone can shift accuracy by up to 76 percentage points, and configured parameters such as temperature affect output variability. Hence, not reporting these settings directly affects reproducibility.
Traditional open science practice in SE has focused on releasing source code and datasets as a replication package. The empirical artifact analysis literature in SE focuses more on code repositories and data than on upstream artifacts such as requirements specifications and design documents. With LLMs, code is often generated from prompts, context files, and other runtime inputs to the model, so reporting must shift left to cover these upstream artifacts in addition to the code and data they produce.
Although the SE research community has developed guidelines for conducting and reporting specific types of empirical studies such as controlled experiments (e.g., ), their replications (e.g., ), or empirical studies in general (e.g., the ACM SIGSOFT Empirical Standards ), none of these address the LLM-specific aspects described above. Previously, a position paper highlighted these issues, but there was no comprehensive community-developed guidance for designing and reporting empirical studies involving LLMs in SE.
Therefore, we present community-developed guidelines for designing and reporting studies involving LLMs in SE research, co-developed by 22 researchers. After outlining our Scope, we introduce a taxonomy of Study Types, then present eight Guidelines. We complement these with an applicability matrix mapping guidelines to study types and a reporting checklist for authors and reviewers. For each study type and guideline, we identify relevant examples, both within and outside of SE research. We maintain the study types and guidelines online as a living resource for the community to use and shape (llm-guidelines.org).
Methodology
The development of these guidelines was initiated at the 2024 meeting of the International Software Engineering Research Network (ISERN) in Barcelona, Spain, where the first and last author organized a session on guidelines for empirical studies involving LLMs. The resulting discussions led to a position paper. A preprint of this paper was the basis for further discussions at the 2nd Copenhagen Symposium on Human-Centered Software Engineering AI (CHASEAI 2024), where a workstream formed to collaboratively refine and extend the preliminary guidelines. Our process followed an established tradition of developing reporting guidelines through expert collaboration, as exemplified by CONSORT for clinical trials and, more recently, TRIPOD-LLM for LLM-based prediction studies in medicine.
We held bi-weekly meetings, in which we decided on the structure of the study type taxonomy and the guidelines. During these discussions, we added a new study type (LLMs for Synthesis), refined and extended the guideline sections (in particular Version and Configuration, System and Prompt Design, Session Traces) and added Benchmarks and Metrics and Limitations and Mitigations.
Then, at least two co-authors were assigned to each study type and guideline to refine and extend the content, followed by a peer review and refinement phase. Afterwards, the first author reviewed all sections and discussed potential changes with the topic leads. A requirement for co-authorship was that each author contributed or reviewed content and, most importantly, read the complete guidelines and confirmed that they stand behind all recommendations, not only their own contributions.
To select illustrative examples for each study type and guideline, co-author pairs independently searched for relevant papers using academic databases. This initial pool was extended based on suggestions from other co-authors. Identified papers were assessed by one author and subsequently reviewed by a second author; papers that did not add new insights beyond those already covered were not included. Multiple review rounds were then carried out on the guidelines as a whole, during which selected papers were cross-checked by additional authors and, where necessary, further examples were added or replaced. The examples are intended to be illustrative, not the result of a systematic review; the involvement of multiple authors at different stages helped mitigate individual selection bias.
After completing the internal review, we invited external experts in empirical SE to review the study types and guidelines. During the review process of the Empirical Software Engineering journal, the structure and content were improved based on reviewers’ suggestions. We self-assessed our guidelines against the quality dimensions of the SIGSOFT Empirical Standards. This assessment is reported in the conclusion.
Challenges
The stochastic nature of LLM responses, where identical prompts may yield different outputs, undermines replicability across all study types, complicating interpretation of experimental results and test-retest reliability. More broadly, reliability is a persistent concern: Like any measurement instrument, LLMs as Judges and LLMs as Annotators should exhibit validity, test-retest reliability, inter-rater reliability, minimal error, and measurement invariance. However, LLMs show substantial variability depending on the dataset and task. They are sensitive to prompt variations and option order, can behave differently when reviewing their own outputs, and can be unreliable for high-stakes labeling. Crucially, reliability does not imply validity: a reliable LLM might be reliably inaccurate. For tasks with no single correct answer, the statistical framework pushes outputs toward the most likely answer, which may not be the best one. See Version and Configuration and Limitations and Mitigations for reporting guidance on replicability and reliability.
LLMs and LLM-based tools evolve rapidly, and so do practitioners’ workflows around them. This combination complicates longitudinal comparisons and can quickly render study findings obsolete. Findings tied to a specific model version may not transfer to later releases even within the same model family, complicating reproducibility and longitudinal comparisons.
The prevalence of proprietary tools and opaque training data limits researchers’ ability to assess and mitigate biases, and enables benchmark contamination. LLMs exhibit bias in multiple forms: tendencies to overestimate certain labels, well-documented fairness issues, and the potential to reinforce prejudices. When simulating human participants, LLMs are “likely to both misportray and flatten the representations of demographic groups”. See Open LLM and Limitations and Mitigations for mitigation strategies.
Evaluation difficulty is inherent in studying LLM-based tools and benchmarks. Benchmarks may lack construct validity, usually do not capture the full complexity of software engineering work, and may lead to overconfidence and overfitting. LLMs are also susceptible to adversarial manipulation where semantics-preserving changes may deceive them into accepting flawed artifacts. See Benchmarks and Metrics for detailed guidance on benchmark design, including ’s guidelines for coding task benchmarks.
A fundamental challenge is philosophical and methodological incongruence with qualitative research. In a recent open letter, 419 experienced qualitative researchers argued “that analytic approaches such as reflexive thematic analysis are human research practices requiring a subjective, positioned, and reflexive researcher and therefore the use of GenAI in such approaches is not methodologically congruent”. LLMs lack the capacity for genuinely reflexive qualitative analysis because they operate on statistical prediction without understanding the meaning of the data being analyzed. Effective use requires structured prompts and careful human oversight. See Human Validation and Limitations and Mitigations for guidance.
There is insufficient evidence for the effectiveness of LLMs in most research roles. No compelling evidence exists that LLMs can accurately simulate human participants or reliably judge most relevant properties of SE artifacts. Gathering such evidence for each specific usage may be quite difficult. LLMs may be better suited for augmenting rather than replacing human researchers, but even then, limited evidence exists that augmentation increases effectiveness as well as efficiency. When LLM outputs are incorrect, they can negatively affect human judgment. See Human Validation for mitigation strategies.
Recommendations
If multiple benchmarks exist for the same task, researchers should compare both performance and design choices (e.g., which tasks are included, how outputs are scored, what aspect of the phenomenon is covered) across benchmarks. When selecting only a subset of all available benchmarks, researchers should use the most specific benchmarks given the context. When adapting an existing benchmark, researchers should document what was changed and why, and should report performance on both the original and the adapted version where feasible.
Benchmark scores often confound the target capability with unrelated capabilities the task happens to require. For code translation benchmarks, prompt formatting alone can shift performance by up to 40%, conflating prompt format sensitivity with translation capability. More broadly, output format compliance (e.g., specific JSON schemas or unit-test conventions) and general instruction-following capability are routinely bundled into the aggregate benchmark score. Researchers should identify which capabilities a benchmark conflates, isolate the target capability where possible (e.g., by reporting per-subtask breakdowns or by adopting benchmarks designed to test the target capability in isolation), and acknowledge remaining confounders as threats to construct validity.
After running a benchmark, researchers should perform an error analysis by categorizing the failures observed and reporting the relative frequency of each category. If failures concentrate on inputs that demand capabilities other than the target capability (e.g., reading across many files rather than fixing the bug the benchmark targets), this is a construct-validity threat and should be reported alongside the primary scores.
In addition to disclosing data sources and collection dates (see Challenges below), researchers creating or releasing a new benchmark should adopt concrete contamination-prevention mechanisms: maintaining a held-out subset of items for ongoing, uncontaminated evaluation; embedding canary strings, that is, unique markers that downstream tools can later search for in model outputs to detect inclusion in training data; and investigating whether the benchmark’s source materials may already appear in common LLM training corpora. Researchers using existing benchmarks should additionally discuss contamination as a study limitation (see Limitations and Mitigations).
Furthermore, researchers should check whether a less resource-intensive approach (e.g., for static analysis tasks or program repair) can serve as a baseline. If so, the LLM or LLM-based tool should be compared with such baselines using suitable metrics. Even if LLM-based tools outperform baselines, researchers should discuss whether the resources consumed justify the (often marginal) improvements.
To compare traditional and LLM-based approaches or different LLM-based tools, researchers should report established metrics whenever possible, as this allows secondary research. They can report additional metrics that they consider appropriate. We briefly discuss common metrics in the Examples subsection below. As mentioned, researchers must motivate why they chose a certain metric or variant thereof for their particular study. Prior adoption alone does not constitute sufficient justification; researchers must not justify metric choices solely by citing their use in prior work. Latency must be reported when it can affect study outcomes.
Challenges
Computer scientists commonly use simple metrics (e.g., lines of code, CPU time) as proxies for complex, multidimensional latent variables (e.g., system size, environmental sustainability), without empirically validating that the metrics capture the intended construct. Unlike fields such as psychology where measurement theory has a longer tradition, many AI metrics and benchmarks lack both theoretical underpinnings and empirical validation of their construct, measurement, and ecological validity.
These validity issues are widespread, not isolated. In a survey of 572 code benchmarks released between 2014 and 2025, found that 84.2% did not consider test suite coverage when constructing test cases, 64.0% reported single-pass evaluations without controlling for randomness, and 82.5% did not address data contamination. A cited study reported comparable patterns in a parallel review of 445 LLM benchmarks from ML and NLP venues. As a result, model performance on these benchmarks can reflect benchmark artifacts rather than the capability the benchmark claims to test.
For example, pass@k is intended to measure a model’s functional correctness, that is, its capability to generate code that produces the expected output for a given specification. However, functional correctness is only one dimension of code quality. pass@k does not capture maintainability, readability, security, or efficiency of the generated code, all of which are critical for downstream use. Furthermore, “correctness” is defined entirely by test suites, whose coverage is itself unvalidated. A solution that passes all provided tests may still be incorrect for untested inputs. Whether a test suite adequately operationalizes correctness for a given task is a subjective judgment that is rarely examined.
Similarly, HumanEval is intended to measure a model’s capability to synthesize short Python functions from docstring specifications. This operationalizes a narrow slice of “code generation capability”: it covers neither multi-file tasks, nor debugging, nor the use of existing codebases. These tasks dominate real-world software engineering. Notably, neither pass@k nor HumanEval has undergone rigorous empirical validation of its construct validity. Their widespread adoption rests on face validity and convenience rather than on evidence that they reliably measure what researchers intend them to measure. HumanEval also contains implementation, documentation, and test case bugs in its original release, which directly affect score interpretation; comparable issues have been documented in other widely-used code benchmarks.
Benchmarks and metrics also have generalizability problems. Prominent LLM benchmarks such as HumanEval and MBPP use Python, so researchers can optimize for Python’s idiosyncrasies, producing gains that do not generalize to other languages. Similarly, the metric BLEU-N is a syntactic metric, so code can score highly without being executable. The metric Exact Match, meanwhile, does not account for functional equivalence of syntactically different code. Both BLEU-N and Exact Match are influenced by code formatting, which confounds their intended use.
Execution-based metrics such as pass@k directly evaluate correctness by running test cases, but they require an execution environment. When metric values look surprising, examine the specific test cases driving them: common causes include outliers, bugs in test suites or scoring code, and items that exercise capabilities other than the one being measured.
Conclusion
LLM non-determinism, opaque training data, and rapidly evolving models threaten the reproducibility and replicability of empirical SE studies. This paper presents a taxonomy of seven study types that organizes how LLMs are used in SE research, together with eight guidelines for designing and reporting such studies. Each guideline distinguishes requirements (must) from recommendations (should) and is contextualized by the study types it applies to. Our guidelines recommend that researchers: (1) declare LLM usage and role; (2) report model versions, configurations, and customizations; (3) document the system and prompt design beyond the model; (4) report session traces, i.e., interaction logs and runtime traces; (5) use suitable baselines, benchmarks, and metrics; (6) include an open LLM as a baseline; (7) validate LLM outputs against human judgment; and (8) articulate limitations and mitigations. An applicability matrix maps guidelines to study types, and a reporting checklist (Appendix C) supports authors and reviewers. The study types and guidelines were derived collaboratively by 22 co-authors, following a process similar to that of guidelines in other disciplines (see, e.g., ).
Following the quality dimensions of the SIGSOFT Empirical Standards, we consider our guidelines (1) comprehensive, as they cover seven study types that we identified and were derived from 22 co-authors’ collective expertise; (2) useful, as they provide actionable recommendations with an applicability matrix and a concrete reporting checklist (Appendix C); (3) well-argued, as each guideline pairs a dedicated rationale with concrete examples from published SE studies; and (4) integrated with previous work, as they build on and complement established empirical SE standards while addressing LLM-specific challenges. Adopting these practices will not eliminate LLM non-determinism, but it would make claims auditable and results easier to replicate and compare across studies. Because models and tools evolve, we maintain the study types and guidelines as a living resource and invite the community to refine and extend them (llm-guidelines.org).


