Skip to content

Repository files navigation

Practical GenAI Agentic Coding Example

Fix a plotting function and see the improvement. Start with a chart whose groups overlap and long labels are clipped. Use VS Code + GitHub Copilot to discuss the repair in Chat, inspect charts in Explorer, and review color-coded code changes in Source Control.

This is the runnable exercise for Part 2 of the Fritsche Lab Practical GenAI series, by Lars G. Fritsche and the Fritsche Lab at the University of Michigan. Part 1 introduces planning, context, and checking an assistant's work. Accessibility belongs in the brief and review: consider contrast, legibility, and alternative text whenever creating something others will use.

Practising what we teach: this guide and exercise were developed with substantial AI assistance in writing, coding, testing, and review. They are provided as is, without warranty, to the extent permitted by applicable law. Review the code, agent instructions, permissions, and results before use. Read the AI-assistance disclosure, use guidance, and warranty notice.

Choose your path

Start with the detailed VS Code + GitHub Copilot setup. It covers Windows, macOS, Git installation, Copilot access, cloning, and the Ask / Plan / Agent controls. VS Code includes Git controls and uses a separately installed Git program.

Path Requirements Follow online Follow here
Python Python 3.10–3.12, Git, and Matplotlib Python walkthrough Python setup and six lessons
R R 4.1 or later and Git; no extra R packages R walkthrough R setup and six lessons

Install only your chosen language. Have Copilot prepare it and run the starting code, then inspect the result yourself. Both paths follow six stages: Ask to orient, Plan the repair, Agent to implement and verify, then Source Control to review diffs, stage source files, and commit locally.

Prefer a terminal? The CLI appendix keeps complete Python and R setup, rendering, checking, and Git commands, plus optional Copilot CLI guidance.

Read permissions and independent work before approving agent actions. Keep repairs small enough to understand and practise without AI too: working output does not establish that you can maintain the code if access becomes unavailable or prohibited.

What the agent works with

Code, tests, and a chart of invented aggregate counts. No participant records or data-file inputs are involved. Use an approved client and keep study data outside its workspace. Lab data guidance.

Find what you need

Images go under runs/; scratch work goes under tmp/. Both stay out of commits. The guide and templates build on Part 1. See CITATION.cff and LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages