Debugging with Generative AI
3h 6mIntermediate2026-08-27
Authors

Anaconda, Inc
Course details
AI assistants can accelerate Python development, but only if you know how to direct them and check their work. This course shows you how to pair everyday AI tools with practical Python skills to move faster without sacrificing quality. Explore how to troubleshoot errors and confusing messages, speed up slow code through vectorization with libraries like NumPy and pandas, clarify unfamiliar code, and run security reviews to catch vulnerabilities such as path traversal. Along the way, learn how to spot when AI produces extraneous, inaccurate, or unsafe code, and how to sanity-check results so your programs stay correct and secure. By the end of this course, you’ll be equipped with a repeatable workflow for using AI as a capable assistant that you guide and validate.
Learning objectives
Use AI assistants to troubleshoot Python errors and interpret confusing messages.
Optimize slow code with vectorization and libraries such as NumPy and pandas.
Interpret and explain unfamiliar or inherited code with AI support.
Conduct security reviews to identify vulnerabilities like path traversal.
Evaluate AI-generated code for accuracy, efficiency, and unnecessary bloat.
Apply a verification workflow to keep AI-assisted code correct and secure.
Learning objectives
Use AI assistants to troubleshoot Python errors and interpret confusing messages.
Optimize slow code with vectorization and libraries such as NumPy and pandas.
Interpret and explain unfamiliar or inherited code with AI support.
Conduct security reviews to identify vulnerabilities like path traversal.
Evaluate AI-generated code for accuracy, efficiency, and unnecessary bloat.
Apply a verification workflow to keep AI-assisted code correct and secure.
Concepts
Introduction
- Author introduction and learning objectives
- Case studies and current landscape of AI
Ground Rules Before GenAI Application
- How AI can accelerate learning
- Pitfalls and weaknesses
- Verification and common sense
- Integrated development environments (IDEs)
Debugging Syntax Errors
- Using AI to debug Python syntax errors - Part I
- Using AI to debug Python syntax errors - Part II
- Using AI to debug Python (and SQL) syntax errors - Part III
- JSON in Python and debugging in IDEs
- Exercise - Fixing errors in XML code
Debugging Runtime Errors
- Using AI to debug runtime errors
- Troubleshooting linear and logistic regression models
- Troubleshooting a neural network
- Exercise - Fixing errors in a neural network
Debugging Logical Errors
- Using AI to debug logical errors
- Troubleshooting a Monte Carlo simulation
- Troubleshooting regular expressions
- Troubleshooting logical errors in SQL
- Exercise - Fixing a logical error
Identifying and Fixing Performance Bottlenecks
- Na ve distant value tracking
- Nested loop bottlenecks
- SQL optimization - Part I
- SQL optimization - Part II
- Vectorization
- Exercise - Speeding up a time series operation
Security Troubleshooting
- Using AI to review code security - Part I
- Using AI to review code security - Part II
- Exercise - Reviewing code security
Conclusion
- Summary