Last updated:
Reporting LLM Prompting in Automated Software Engineering: A Guideline Based on Current Practices and Expectations
Alexander Korn et al.
In collections: AI Evals AI for coding
Large Language Models (LLMs), in particular decoder-based generative models such as GPT, are increasingly used to automate tasks in software engineering. These models are steered primarily by natural-language queries (prompts), which makes prompt engineering a key factor affecting the performance and behavior of the system. Despite their growing role in software engineering (SE) research, prompt-related decisions are rarely documented systematically or transparently, which hinders reproducibility and comparability across studies.
To fill this gap, we conducted a two-stage empirical study. First, we analyzed nearly 300 papers published at the 3 top SE conferences since 2022 to assess how prompt design, testing and optimization are currently reported.
Second, we surveyed 105 program committee members of these conferences to learn their expectations about prompt reporting in LLM-based research. Based on these findings, we developed structured guidelines that distinguish essential, desirable and exceptional reporting elements. Our results reveal significant gaps between current practices and reviewers' expectations, in particular regarding the disclosure of model versions, the justification of prompt construction, and threats to validity. We present our guidelines as a step toward improving transparency, reproducibility and methodological rigor in LLM-based SE research.
Strategies from the report:
Reporting Elements Categorization (Reporting Elements Categorization): Separating information about prompts in studies into essential, desirable and exceptional, which lets developers and researchers match the level of detail in their documentation to commonly expected standards.
Disclosing full version data (Version Disclosure): Clearly stating the exact model versions, access dates and parameter settings, which is crucial for other engineers being able to repeat (reproduce) the tests.
Prompt Justification (Prompt Justification): A requirement to describe explicitly why a given prompt has the structure it has, and which specific methods or keywords were deliberately used in it.
Good practices:
Systematic Documentation of prompt engineering (Systematic Documentation): Maintaining a detailed, publicly available research repository (e.g. on GitHub) containing the final prompts, configuration files and the collected outputs of the artificial intelligence.
Explicit reporting of threats to validity (Threats to Validity Reporting): Treating the instability of generated answers and the phenomenon of LLM "hallucinations" as built-in flaws of the research, and describing in the documentation, as a requirement, how the researchers controlled this risk.
Optimization Transparency (Optimization Transparency): Describing accurately and transparently in papers the process of improving queries: whether it was done manually by trial and error, or whether other, automated frameworks were used for it.
What to avoid?
Omission of Prompt Context (Omission of Prompt Context): Avoid presenting in studies only fragmentary descriptions of queries without the full context or the underlying system instruction, which makes it completely impossible for others to repeat your tests and assess their reliability.
Ignoring Model Drift (Ignoring Model Drift): Avoid assuming in publications that models offered from the cloud, and their hidden updates, will always work equally well on the same prompt. It is essential to record the specific date the tests were run.
Omitting negative results in experiments (Hiding Failed Prompts): Don't hide the lines of reasoning and prompt variants that simply didn't work after testing on code. Documenting failed queries is just as valuable to the community as the final engineering successes.
Support this project by buying me a coffee ;)