# The why, what, and how of AI-based coding in scientific research

arXiv: https://arxiv.org/abs/2410.02156 · HTML: https://mlsanity.com/paper/2410.02156/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 9 of its 21 references that are in the map.
- First posted on arXiv 3 Oct 2024.

## Builds on (most cited first, 9 of 9)

- [A Survey on Large Language Models for Code Generation](https://mlsanity.com/paper/2406.00515/) (2024)
- [DebugBench: Evaluating Debugging Capability of Large Language Models](https://mlsanity.com/paper/2401.04621/) (2024)
- [Large Language Models for Compiler Optimization](https://mlsanity.com/paper/2309.07062/) (2023)
- [No Need to Lift a Finger Anymore? Assessing the Quality of Code Generation by ChatGPT](https://mlsanity.com/paper/2308.04838/) (2023)
- [AI-assisted coding: Experiments with GPT-4](https://mlsanity.com/paper/2304.13187/) (2023)
- [LLMs for Science: Usage for Code Generation and Data Analysis](https://mlsanity.com/paper/2311.16733/) (2023)
- [Techniques for supercharging academic writing with generative AI](https://mlsanity.com/paper/2310.17143/) (2023)
- [Beyond principlism: Practical strategies for ethical AI use in research practices](https://mlsanity.com/paper/2401.15284/) (2024)
- [An Exploratory Study on Upper-Level Computing Students' Use of Large Language Models as Tools in a Semester-Long Project](https://mlsanity.com/paper/2403.18679/) (2024)

## Abstract (arXiv)

Computer programming (coding) is indispensable for researchers across disciplines, yet it remains challenging to learn and time-consuming to carry out. Generative AI, particularly large language models (LLMs), has the potential to transform coding into intuitive conversations, but best practices and effective workflows are only emerging. We dissect AI-based coding through three key lenses: the nature and role of LLMs in coding (why), six types of coding assistance they provide (what), and a five-step workflow in action with practical implementation strategies (how). Additionally, we address the limitations and future outlook of AI in coding. By offering actionable insights, this framework helps to guide researchers in effectively leveraging AI to enhance coding practices and education, accelerating scientific progress.
