Slide 1

Slide 1 text

Help from AI Mine Çetinkaya-Rundel Duke University Ask questions + Get feedback duke.is/llm-feedback-ucsc

Slide 2

Slide 2 text

Now that agents can do everything, what are you planning to teach in your data science course?

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

A quick look at what’s possible today… [DEMO]

Slide 5

Slide 5 text

Rewinding back to the beginning of the project…

Slide 6

Slide 6 text

Microsoft Study Finds AI Makes Human Cognition “Atrophied and Unprepared” “[A] key irony of automation is that by mechanising routine tasks and leaving exception-handling to the human user, you deprive the user of the routine opportunities to practice their judgement and strengthen their cognitive musculature, leaving them atrophied and unprepared when the exceptions do arise,” the researchers wrote. Lee, Hao-Ping Hank, et al. "The Impact of Generative AI on Critical Thinking: Self-Reported Reductions in Cognitive Effort and Confidence Effects From a Survey of Knowledge Workers." (2025). 404media.co/microsoft-study-finds-ai-makes-human-cognition-atrophied-and-unprepared-3.

Slide 7

Slide 7 text

Joanna Maciejewska @AuthorJMac You know what the biggest problem with pushing all-things-AI is? Wrong direction. I want AI to do my laundry and dishes so that I can do art and writing, not for AI to do my art and writing so that I can do my laundry and dishes. https://x.com/AuthorJMac

Slide 8

Slide 8 text

How can AI support student learning instead of help them take shortcuts in their learning?

Slide 9

Slide 9 text

Intro to Data Science & Statistical Thinking Context sta199-f25.github.io

Slide 10

Slide 10 text

AI policy (that was all too optimistic) AI tools for code: You may use, you must explicitly cite. [Some guidance for how to cite.] The prompt you use cannot be copied and pasted directly from the assignment; you must create a prompt yourself. AI tools for narrative: Unless instructed otherwise, you may not use generative AI to generate a narrative that you then copy-paste verbatim into an assignment or edit and then insert into your assignment. AI tools for learning: You’re welcomed to ask AI tools questions that might help your learning and understanding in this course. [But don’t believe everything it says.]

Slide 11

Slide 11 text

Project 1 A chat that (hopefully) generates good, helpful, and correct answers that come from course content and prefers terminology, syntax, methodology, and workflows taught in the course.

Slide 12

Slide 12 text

Technical details ✴ Use RAG (Retrieval-Augmented Generation) to focus chatbot on course content, give it context, and obtain pointers to specific pages of interest in the course textbooks: ✴ Knowledge Graph: Searchable/traversable graph database of subject - > predicate - > object statements from text. ✴ Semantic Similarity: Search identifies nearest neighbors based on word similarity using a vector database. ✴ Relevant content from the course textbooks identified by combining semantic similarity and knowledge graph searches. ✴ Embed the chatbot into the Canvas Learning Management System as an LTI tool for student and instructor access. Project 1: chat

Slide 13

Slide 13 text

PDF documents LlamaIndex triplet extraction entity-relationship - > entity entity-relationship - > entity … entity-relationship - > entity Knowledge Graph Vector embeddings LlamaIndex vector embeddings Semantic similarity Milvus Vector database Nebula Graph database User query Azure OpenAI LLM RAG Chatbot response and metadata PDF document pages User & chatbot interaction logging Postgres SQL database Architecture Project 1: chat

Slide 14

Slide 14 text

Demo Project 1: chat

Slide 15

Slide 15 text

Project 2 A feedback that (hopefully) generates good, helpful, and correct feedback based on an instructor designed rubric and suggests terminology, syntax, methodology, and workflows taught in the course.

Slide 16

Slide 16 text

Motivations Project 2: feedback Disruption Increasing number of students use AI tools as first step, before thinking about how to approach a task, can I wiggle my way in there? Leveraging Thanks to large numbers of students and TAs, and thanks to Gradescope, I’m already writing the darn detailed rubrics! Shifting resources Can AI help TAs redistribute their time towards higher-value (and more enjoyable!) touch points and away from repetitive (and error-prone) tasks much of which go unread? Self care Neither the TAs nor I want to provide detailed feedback to answers generated solely with AI tools.

Slide 17

Slide 17 text

Architecture Azure OpenAI LLM RAG Question bank Question Rubric Answer User & chatbot interaction logging Postgres SQL database Student submits answer Adjusts and resubmits based on feedback What are the points of confusion? How is the system being used? Logging Create / update question bank Project 2: feedback

Slide 18

Slide 18 text

Technical details TL;DR: Use prompt engineering to ground feedback bot with the question, rubrics, and answer. library(ellmer) library(glue) library(tidyverse) prompt < - function(question, rubric_detailed, rubric_simple, answer){ chat < - chat_openai( system_prompt = "You are a helpful course instructor teaching a course on data science with the R programming language and the tidyverse and tidymodels suite of packages. You like to give succinct but precise feedback." ) chat$chat( glue( "Carefully read the {question} and the {rubric_detailed}, then evaluate {answer} against the {rubric_detailed} to provide feedback. Format the feedback as bullet points mapping to the bullet points in the {rubric_simple}.” ) ) } Project 2: feedback

Slide 19

Slide 19 text

Demo Question Rubric - Code produces boxplot with population density either on the x - axis or y - axis. - Plot has informative title and/or subtitle. - Plot has informative, human readable axis label on the axis `popdensity` is plotted - Narrative mentions the correct shape in terms of skew and modality - Narrative mentions the correct center - Narrative mentions the correct spread - Narrative mentions at least one outlier and name of the county and state. - Narrative mentions at least one reason why this outlier might stand out from the rest of the data. - Narrative should include units of variables discussed - Code style and readability: Line breaks after each | > , line breaks after each +, proper indentation, spaces around = signs if they are present, and spaces after commas if they are present. TL;DR : Make a box plot and identify outliers from the data. TL;DR : Rubric has bullet points. Project 2: feedback

Slide 20

Slide 20 text

Project 2: feedback

Slide 21

Slide 21 text

Project 2: feedback mine-cetinkaya-rundel.github.io/aifeedr

Slide 22

Slide 22 text

Fall 2025 pilot

Slide 23

Slide 23 text

Example 1 sta199-f25.github.io

Slide 24

Slide 24 text

Example 2 sta199-f25.github.io

Slide 25

Slide 25 text

Example 3 sta199-f25.github.io

Slide 26

Slide 26 text

Take aways The process ✴ Lots of fiddling with the rubric file, though unclear / hard to measure to what end. ✴ Separating out to rubric_simple and rubric_detailed helps hide the answer while giving constructive feedback. Project 2: feedback

Slide 27

Slide 27 text

Take aways The good ✴ “Spell out your reasoning” results in feedback that is too long, but taking that out and adding limits helps. ✴ It sort of works! Project 2: feedback

Slide 28

Slide 28 text

Take aways The bad ✴ The most concerning: The feedback tends to catch errors but not the “good” and seems to reiterate the rubric item whether it’s met or not, potentially causing the student (who is already prone to this) to think “there’s no winning here”. ✴ On par with an inexperienced TA who is not seeing the bigger picture but looking at matching every detail to the rubric and pointing out any discrepancies whether they matter or not. ✴ The inevitable: Inconsistency in feedback from one try to another. ✴ Is it possible to instill confidence in students when the feedback changes at each try on the same answer? ✴ “Hallucinations” happen, e.g., “The code uses the base pipe (|>) and includes necessary spaces, but it lacks indentation, which can be improved for readability.” even when the code is properly indented. Project 2: feedback

Slide 29

Slide 29 text

Project 2: feedback Student feedback ✴ Immediate feedback in the IDE! ✴ Helpful as a quick, iterative checker for nitty-gritty specifics, formatting and code style, and clarity and precision of narrative — great first-pass reviewer. ✴ Too picky! ✴ Not as helpful as instructor or TA feedback in office hours since it doesn’t always point to specific issues and follow-up is not possible.

Slide 30

Slide 30 text

Motivations Project 2: feedback Disruption Increasing number of students use AI tools as first step, before thinking about how to approach a task, can I wiggle my way in there? Leveraging Thanks to large numbers of students and TAs, and thanks to Gradescope, I’m already writing the darn detailed rubrics! Shifting resources Can AI help TAs redistribute their time towards higher-value (and more enjoyable!) touch points and away from repetitive (and error-prone) tasks much of which go unread? Self care Neither the TAs nor I want to provide detailed feedback to answers generated solely with AI tools. (I think) ? revisited

Slide 31

Slide 31 text

Spring 2026 work

Slide 32

Slide 32 text

Project 2: feedback Tool improvement ✴ Focus groups: In-depth student feedback about perceived learning outcomes and user experience/interface ✴ Model evaluation: Reasoning models perform better, more consistently — unclear if university can provide access, but we’re working on it! ✴ Prompt enhancements: For brevity, signaling of right / wrong (✔ and ‼ instead of ✅ and ❌), splitting feedback on content (narrative, code, output) and code style/smell.

Slide 33

Slide 33 text

Project 2: feedback Pedagocial (re)design ✴ Provide real-time, AI feedback for all questions on the homework ✴ Grade randomly sampled 1-2 questions on each homework ✴ Post model solutions for 1-2 questions

Slide 34

Slide 34 text

Project 2: feedback Next steps ✴ Use in Fall 2026 and collect data. ✴ Revisit adding follow up chat to the feedback tool. ✴ Share and document the LLM feedback tool (https://mine-cetinkaya- rundel.github.io/aifeedr) and expand it to work with other backends and in other IDEs. ✴ Assess learning outcomes for students using the LLM feedback and evaluate if this approach is “effective” (for a variety of goals).

Slide 35

Slide 35 text

acknowledgements. Mark McCahill Computer Systems Architect Duke University Duke University Of fi ce of Information Technology Marie Neubrander StatSci PhD ‘27 Duke University

Slide 36

Slide 36 text

thank you. Mine Çetinkaya-Rundel Duke University [email protected] Components of the image generated with Chat GPT and iterated on (by me) with Keynote. https://chatgpt.com/share/682c8623-b100-8000-972c-e7384801436f duke.is/llm-feedback-ucsc