| layout | default |
|---|---|
| title | Home |
| nav_order | 1 |
| description | A Fritsche Lab field guide to AI-assisted research coding, from a clear task to tested, reproducible results. |
Fritsche Lab · University of Michigan
A practical guide for biostatisticians, bioinformaticians, and data scientists. Turn a research question into a clear plan, a reviewable change, and a result someone else can reproduce.
Learn
Follow an EHR data example from planning and prompting to review, iteration, and documentation.
Explore the chapters →Practice
Work with synthetic records, define the expected result, and review an agent's first change.
Start the exercise →Apply
Scope a task, manage context, delegate independent work, and keep evidence of what was checked.
Open the playbook →Each step produces something you can inspect. Return to the plan or implementation when a check reveals a problem.
| Step | What you should have before moving on |
|---|---|
| 1. Plan and context | A research question, data schema, and acceptance criteria. |
| 2. Research methods and tools | Sources and explicit analysis rules. |
| 3. Prompt the assistant | A scoped task with inputs, outputs, and checks. |
| 4. Review the code | A diff you understand and questions resolved. |
| 5. Refine and add features | A focused change with a clear reason. |
| 6. Test and iterate | Evidence that expected behavior holds, including edge cases. |
| 7. Standardize | Consistent code with preserved behavior. |
| 8. Document and share | Instructions and provenance that let a colleague rerun the work. |
The examples use simulated records. Keep protected research data in its approved environment; give the assistant schemas, documented rules, and synthetic fixtures. A passing software test is one part of reviewing a scientific analysis.
- Task briefs, session handoffs, project plans, and R templates for work in your own repository.
- Tool selection and reference resources for choosing an interface and checking sources.
- Synthetic EHR data generator for larger practice datasets.
- Development setup for building and contributing to this site.
Created and maintained by Lars G. Fritsche and the Fritsche Lab at the University of Michigan. The guide shares the lab's emphasis on independent evaluation, reusable methods, and team science.
The September 2026 update notes describe the new material and the sources checked for this revision.
Fritsche, Lars G. Practical GenAI Coding Guide: A practical 8-step process for integrating GenAI tools into coding and research workflows. Fritsche Lab, University of Michigan. https://fritschelab.org/practical-genai-coding-guide/. Accessed YYYY-MM-DD.
Citation metadata is available in CITATION.cff.