Practical GenAI · Part 2
Teaching guidePractical GenAI Agentic Coding Guide
Six lessons for working with coding agents in a runnable research repository, from a task brief through implementation, testing, review, and handoff.
Part 2 puts the habits from the Practical GenAI Coding Guide into practice in a project a labmate could pick up and maintain. Make one change to a Python pipeline, test it, review it, and leave a useful record of the work.
Work through the six lessons
The lesson sequence follows one small change from orientation to handoff:
- Orient: run the baseline and understand the repository.
- Specify: write a task brief and agree on the expected behavior.
- Implement: work with a coding agent on the agreed change.
- Verify: check the result against independently worked examples and tests.
- Review: inspect the changes, outputs, and remaining limitations.
- Hand off: leave enough context for a collaborator to rerun and continue the work.
The guide includes agent setup guidance and reusable task brief, data contract, and handoff templates.
Use it in a lab session
The 45-minute workshop includes a facilitator agenda, a focused coding exercise, and an instructor solution. Participants prepare their environment and run the baseline before the session.
You should be comfortable running a Python script and using a terminal; the guide explains the Git steps along the way. If you are new to GenAI coding, begin with Part 1. If you can already run a script and inspect a change, start with the demo.
Practice with synthetic data
The example uses synthetic BMI and demographic data. Its rules are teaching specifications, not clinical recommendations. Keep sensitive research data and credentials in approved environments, including anything shared with an agent or captured in logs and screenshots. Before adapting the workflow to a study, review the guide’s lab data guidance and your institution’s requirements.