notebook-ta
notebook-ta adds an LLM-powered teaching assistant to Jupyter notebooks for Python programming
courses. Students work with the %%notebook_ta cell magic, while instructors define exercises,
tests, and tutor prompts in TOML files.
User Guide
Reference
Quick Start
Install the package:
pip install notebook-ta
Load the teaching assistant from a notebook setup cell:
import notebook_ta
notebook_ta.load("global_config.toml", "exercises.toml")
Use the magic in a student answer cell:
%%notebook_ta ex1
def add(a, b):
return a + b
Code and unit tests finish before LLM feedback is queued, so Run All can check every exercise while analyses stream sequentially. Use the top-right Cancel icon to stop only that analysis or hint, or the stacked Cancel all icon to stop the active response and empty the queue. Jupyter’s Stop command affects foreground cell execution instead; restarting the kernel cancels all feedback and clears hint history.
See the example configuration and notebook files in
docs/examples.