In this article
Treat a notebook edit, its saved outputs and a fresh kernel execution as separate artifacts when reviewing an assisted analysis.
Start with a cell-level task
A notebook contains a transformation that once produced an unexpected table. Ask for an explanation of that cell before requesting a rewrite of the analysis. Cline’s notebook guide describes cell-aware Generate, Explain and Improve controls in VS Code with its Jupyter extension enabled. This is useful when the problem depends on nearby imports, variables and the cell’s recorded result rather than an isolated function pasted into chat.
Understand the context being supplied
The notebook integration includes source, cell type, metadata, execution count and outputs. Explain can therefore discuss a saved error or displayed column name. That output belongs to the notebook document; it does not establish the current value of a variable in an attached kernel. For example, an explanation may correctly describe an old table even after the source dataset has changed. State whether the task concerns the saved artifact or a new calculation.
Make generation and execution separate decisions
Generate uses surrounding cells and inserts notebook content; Improve proposes changes in place. Neither a convincing explanation nor syntactically valid cell content proves the calculation ran successfully. The VS Code notebook workflow separately selects the kernel and runs cells. For a reproducibility check, identify the intended environment and the necessary upstream cells before execution. A stale variable created by an earlier interactive run can otherwise hide a missing dependency.
Review structure as well as code
Cline aims to preserve cell boundaries and metadata, but its guide still asks readers to review the result. Use a notebook-aware diff to inspect source changes separately from output churn. An unrelated plot replacement, cleared error or moved Markdown explanation may change the meaning of the analysis even when the edited expression looks right. Keep the requested performance or readability improvement specific so the review has a concrete target.
Supply missing evidence deliberately
The broader editor-context guide explains explicit selections and diagnostics. Add a relevant schema or error when the cell context does not explain the failure, rather than loading every notebook. Progressive reading helps bound that evidence; tool observations distinguish a proposed cell from its actual execution result. Record the kernel and newly observed output when concluding that the analysis works.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.