This lesson presents a systematic approach for the productive and reliable use of generative artificial intelligence (AI) large language models (LLMs) in scientific software development. The strategy is based on the implementation of a robust verification methodology, which will be explained in this lesson.
This lesson provides a “hands-on” accompaniment to several presentation modules in the Better Scientific Software tutorial collection, including:
- Scientific Software Design
- Refactoring Scientific Software
- Improving Reproducibility Through Better Software Practices
as well as the core of the tutorial module
- Software Development with LLMs
The material in these different episodes is designed to be as independent as possible, but you will probably be best served by at least reading through (if not doing) all of the episodes.
We’re offering two separate “worked examples” – one based on a simple heat equation solver, and the other a non-numerical example based on mirror images of a particle at the boundary of a mesh. We hope that most of you will be comfortable with one or both. Since we’re using LLMs, you can implement them in any programming language for which your LLM can generate reasonable code.
Important Note
The capabilities of generative AI-based tools are rapidly evolving. This lesson represents a practical approach to the use of widely-available technologies and tools in the 2025 time frame. It is highly likely that this material will not stand the test of time, although we hope to be able to update it as the technology evolves.
Prerequisites
None