EducationModel EvaluationLocal Models
AI helped write the analysis code. Can the student explain it?
A practical teaching exercise that separates a working script from independent understanding, modification and debugging.
A graduate student gets a script working with help from an AI assistant. The output looks sensible. But when a supervisor asks why the script removes certain rows, the explanation becomes uncertain.
A completed analysis and an understood analysis are different outcomes. If the purpose of an exercise is to build research skills, assess both. Give students room to use an assistant during practice, then include a short task in which they explain, modify or debug the code without that assistance.
This article proposes a teaching workflow for analysis-code practice with a local AI tool. The exercise is fictional, has not been tested with students, and is not a validated assessment instrument.
What the research does—and does not—show
In a January 29, 2026 research report, Anthropic described a randomized experiment with 52 developers learning an unfamiliar Python library. The AI-assisted group performed worse on an immediate skills quiz, while the average completion-time difference was not statistically significant.
The original Shen and Tamkin preprint, revised February 1, 2026, studies programming skill formation. It does not establish the effect of a local model on graduate statistics students. The authors also examined interaction patterns, but those patterns were not randomly assigned. Associations between asking conceptual questions and higher scores do not prove that a particular prompting style caused the difference.
The practical implication here is a proposed measurement choice: keep task completion and independent understanding visible separately. The study does not validate the classroom exercise below or justify a blanket claim that AI prevents learning.
Choose what students should understand
Before writing a prompt, specify the learning objective. “Produce a table” is a deliverable. “Explain which observations contribute to each row and why” is something a learner can demonstrate. A short exercise can cover both without treating one as evidence of the other.
For this fictional example, imagine a teaching dataset with several observations per participant. The objective is to distinguish an observation-level summary from a participant-level summary, identify the unit used in a calculation, and explain the treatment of missing values. No real records or results are used here.
Choose only the statistical decisions appropriate to the lesson. If students have not yet studied repeated-measures models, the exercise need not become a model-selection exam. Keep the task narrow enough that a wrong answer points to an identifiable gap rather than a vague impression that someone “does not understand statistics.”
Ask for a prediction before assistance
Give learners a small, readable script and ask what its output represents before they consult the assistant. Have them mark the input rows, grouping variables and point at which observations are excluded. Ask for a short explanation in their own words, including any uncertainty.
In the fictional example, the first question might be: “Does this line count participants, observations, or nonmissing values?” A student should be able to point to the relevant operation and connect it to the intended quantity. The task does not require memorizing every function name.
Keep that first explanation. It provides context for the later check. It is not automatically a reliable baseline score, particularly if there is only one question or the learner has seen the script before. Record the materials and prior instruction rather than calling any change a learning effect.
Use AI for a bounded practice stage
Now allow the local assistant to explain the same script. A useful starting instruction is: “Explain which rows contribute to each calculation. Ask me to predict what changes if one participant has more observations. Identify assumptions that are not specified. Do not invent data or results.” This is a proposed prompt, not one evaluated for this article.
Ask students to compare the explanation with their prediction. They should identify an agreement, a disagreement and a point needing verification. Where an explanation depends on a package function, check the actual function documentation. A confident paraphrase from a model is not evidence that a missing-value option behaves as described.
Keep assistance bounded by the learning objective. If a learner requests a complete replacement analysis, return to the question being taught: what does this operation count, and does that match the research question? Different courses may permit different assistance. State the rule before the task so disclosure is useful rather than a guessing game.
Check understanding with a changed task
After practice, close the assistant and provide a related task with a meaningful change. In our fictional example, one participant now has several more observations than others. Ask whether an observation-level average and an average of participant summaries give each participant the same influence. Require an explanation before a code edit.
Another task could remove a grouping variable or change how missing values are handled. Ask the learner to locate the consequence, propose a correction and describe what evidence would show that the correction worked. These are assessment ideas, not intentionally broken production scripts.
Use a task that tests the intended concept rather than an exact replay of the assistant's wording. A student who can recite a previous explanation may still struggle to apply it. Conversely, a learner who explains the concept accurately but forgets syntax should not automatically receive the same judgment as someone who misunderstands the quantity being calculated.
Keep a small rubric and an honest record
For an initial teaching review, consider four separate judgments: identifies the unit of analysis, explains the effect of the change, proposes an appropriate correction, and describes a check. Attach each judgment to a response or code passage. Have another instructor review ambiguous examples before making consequential grading decisions.
Save the task version, permitted resources, assistance conditions, learner explanation, revised code and scoring notes. Record task completion and time separately from the understanding judgments. An attractive final script should not erase a serious conceptual error; a slower learner should not be labeled unsuccessful solely for taking longer.
For a teaching pilot, report what was observed and what remains uncertain. A before-and-after classroom comparison can be affected by practice, task difficulty, prior knowledge and other instruction. A few successful examples do not establish that local AI improved learning. A causal study would need an appropriate comparison design and planned analysis.
DASS's guide to evaluation beyond average accuracy provides complementary background on keeping distinct dimensions visible. It is a methodological resource within our family of websites, not independent validation of this teaching method.
Local tools still need a teaching boundary
Before a student pilot, use our local AI tutor behavior screen to inspect how the assistant handles mistakes and requests for complete answers. That checks the assistant's behavior; the unaided task checks something different about the learner.
Also inspect the research data-flow checklist before introducing documents or datasets. A locally served answering model does not establish that every connected function processes data locally. Use fictional teaching materials until the actual workflow and institutional requirements are understood.
UNESCO's guidance on generative AI in education and research places pedagogical design, human agency and privacy within a broader institutional discussion. Those decisions belong alongside a technical setup, not after students have already submitted their work.
The next practical step is small: choose one concept, prepare one assisted practice task and one changed unaided task, and inspect the explanations. Keep the model output, the working script and the learner's understanding as separate pieces of evidence.