TutorTrace: A Dataset and Taxonomy for Classifying Learner Behavioral States during AI-Assisted Programming Education
Organizations: Virginia Tech Blacksburg, Virginia, USA · Sepuluh Nopember Institute of Technology Surabaya, Jawa Timur, Indonesia
Abstract
AI programming tutors provide scalable support, yet lack the behavioral context human tutors rely on to adapt support to learners' needs. We present TutorTrace, a dataset and behavioral abstraction pipeline that makes learners' behavioral context visible and computable in real time from low-level IDE telemetry. Across four deployments in two introductory Python courses (N=480), TutorTrace captures approximately 180K telemetry events, 13,633 behavioral segments, and 27 continuously computed metrics. From this foundation, we derive a taxonomy of learner activity before the first AI query, between consecutive queries, and across the full session, enabling systems to respond not just to what learners say, but to what they have done leading up to the help-seeking moment. In a preliminary classroom evaluation, behavior-aware prompts were associated with a decrease in intervals between queries with no independent work from 50.0% to 20.7%. As an additional demonstration of downstream utility, we evaluate TutorTrace on two held-out prediction tasks: whether a learner will query within the next 60 seconds (AUROC=.726) and whether an upcoming query reflects guided or dependent help-seeking (AUROC=.717). Together, these findings show how behavioral context can enable adaptive AI tutoring at scale.
Figures & tables
| Property | CSEDM | ProgSnap2 ∗ | CodeAid | CodeWatcher † | TutorTrace (ours) |
|---|---|---|---|---|---|
| Real classroom deployment | ✓ | ✓ | ✓ | ✗ | ✓ |
| Longitudinal coverage (semester) | ✓ | ✓ | ✓ | ✗ | ✗ |
| Raw IDE telemetry | ✗ | ✓ | ✗ | ✓ | ✓ |
| AI query & response logs | ✗ | ✗ | ✓ | ✗ | ✓ |
| Task outcome data | ✓ | ✓ | ✗ | ✗ | ✓ |
| Behavioral classification (expert-validated) | ✗ | ✗ | ✗ | ✗ | ✓ |
| Region | Example Events | Example Payload |
| Code Editor | TYPE, DELETE, PASTE, | Characters, cursor |
| (11 types) | COPY, CUT, UNDO, | position, selection |
| REDO, SELECT, INDENT | range | |
| Terminal | RUN, OUTPUT, ERROR, | stdout, error type |
| (6 types) | RESULT, SELECT, COPY | and message, test |
| pass/fail counts |
| Behavior | Subtype | Definition | Derived rule |
|---|---|---|---|
| Implementing | — | Writing new code | CODE_EVENT with no unresolved terminal error |
| Debugging | — | Fixing an error | CODE_EVENT s while an unresolved error or failed test exists |
| Testing | — | Executing tests | Automatically marked at each TERMINAL_RUN event |
| Thinking | Task | Reading the task | 3s inactivity before any CODE, TERMINAL, or CHAT EVENT |
| Code | Reviewing code | 6s gap between code edit events | |
| Error | Reading an error | 3s inactivity after TERMINAL_ERROR |
| Self vs Expert | Expert vs Auto | Self vs Auto | ||||
| Behavior | Agr. | Agr. | Agr. | |||
| Implementing | 0.93 | 97% | 0.95 | 98% | 0.98 | 99% |
| Debugging | 0.76 | 96% | 0.88 | 98% | 0.71 | 94% |
| Seeking Help | 0.90 | 98% | 1.00 | 100% | 0.90 | 98% |
| Thinking: | ||||||
| Task | 0.92 | 96% | 0.96 | 98% | 0.95 | 98% |
| Observable Area | Metrics | |
| Code activity | code_edits | code_edit_rate |
| chars_inserted | chars_deleted | |
| code_deletes | net_code_growth | |
| delete_type_ratio | code_pastes † | |
| Terminal activity | terminal_runs | terminal_errors |
| max_consecutive_errors | mean_time_between_runs_s | |
| Deployment | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| Instructor | A | A | B | B |
| Time limit | 15 min | 15 min | 10 min | 10 min |
| Task | Playlist | Playlist | Grade Book | Grade Book |
| Total students | 190 | 113 | 70 | 107 |
| Used AI | 94 | 90 | 48 | 85 |
| AI Interactions | 428 | 540 | 190 | 228 |
| Raw Telemetry | +Observable Metrics | +Behavioral Sequences | |||||
|---|---|---|---|---|---|---|---|
| Prediction Task | Description | AUROC | AUROC | AUROC | |||
| Query imminence | Will the learner submit an AI query within the next 60 seconds? | 0.689 | — | 0.726 | +0.037 | 0.719 | +0.030 |
| Help-seeking type | Will the learner’s upcoming query reflect guided or dependent help-seeking? | 0.690 | — | 0.717 | +0.027 | 0.705 | +0.015 |
| Profile | Labeled | Guided | Dependent |
|---|---|---|---|
| Window 1: Before the First Query | |||
| Cold Start | 30 | 3.3% | 96.7% |
| Oriented | 97 | 69.1% | 30.9% |
| Struggling | 21 | 71.4% | 28.6% |
| Window 2: Between Queries | |||
| Passive | 318 | 25.8% | 74.2% |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Date | Change |
|---|---|
| Feb 2 | Initial codebook: Implementing, Debugging, Thinking (with subtypes: Task, Code, Error, LLM Response), Idle, Off-Topic, Unknown. |
| Feb 3 | Added Seeking Help (“Typing a query or reading LLM response”). |
| Feb 9 | Revised Seeking Help description to “Typing a query” only, removing “reading LLM response” to resolve overlap with Thinking: LLM Response subtype. |
| Feb 10 | Added Testing (“Running code and reviewing results”). |
| Mar 11 | Removed Testing from manual labeling codebook (captured by auto-segmentation rules). Added Thinking: Pre-query subtype (“Asking LLM”) to capture formulation pauses before chat queries. |
| Mar 11 | Codebook finalized. All labelers confirmed agreement on category definitions and segmentation rules. |
| Event Type | Description | Example Payload |
| Code Editor (11 types) | ||
| CODE_TYPE | Typed characters | {code:"l", changes:[{to:0, from:0, text:"l"}], raw_action:"input.type"} |
| CODE_DELETE | Backspace/Delete | {code:"...grade_boo", changes:[{to:101, from:100, text:""}], raw_action:"delete.backward"} |
| CODE_DELETE_SEL. | Deleted selection | {code:"", changes:[{to:145, from:0, text:""}], raw_action:"delete.selection"} |
| CODE_PASTE | Pasted content | {code:"...append([78,84,91])", changes:[{to:75, from:75, text:"[78,84,91]"}], raw_action:"input.paste"} |
| CODE_COPY | Copied to clipboard | {selected_text:"grade_book = [[88,92,75],...]"} |
| Layer | Representation | Scale |
| A: Raw Telemetry | Timestamped IDE events | 180K |
| B: Observable Metrics | Effort intensity per window | 27 features |
| C: Behavioral Sequences | Auto-classified segments | 13,633 |
| D: Behavioral Profiles | Clustered profiles | 10 profiles |
| Student sessions | 480 | |
| AI interactions | 1,386 |
| Task | Window | Test | Positive | Raw | +Obs. | +Seq. |
|---|---|---|---|---|---|---|
| Query imminence | 15 s | 11,160 | 37.4% | 0.657 | 0.690 | 0.707 |
| 30 s | 10,825 | 38.2% | 0.689 | 0.726 | 0.719 | |
| 45 s | 10,492 | 38.7% | 0.701 | 0.734 | 0.720 | |
| 60 s | 10,165 | 39.1% | 0.700 | 0.730 | 0.713 | |
| Help-seeking type | 15 s | 499 | 33.1% | 0.690 | 0.717 | 0.705 |
| 30 s | 499 | 33.1% | 0.696 | 0.680 | 0.694 |
| Feature | Imp. | Feature | Imp. |
|---|---|---|---|
| metric__time_in_chat_s | 0.1465 | metric__error_to_edit_s | 0.0060 |
| metric__longest_idle_s | 0.0761 | raw__TERMINAL_OUTPUT | 0.0058 |
| raw__event_density_per_s | 0.0575 | raw__CODE_SELECT | 0.0057 |
| metric__time_in_editor_s | 0.0573 | metric__failed_test_to_edit_s | 0.0053 |
| raw__event_count | 0.0573 | raw__TEST_CASE_RESULT | 0.0043 |
| raw__MOUSE_MOVE | 0.0525 | metric__max_consecutive_errors | 0.0040 |
| Feature | Imp. | Feature | Imp. |
|---|---|---|---|
| metric__longest_idle_s | 0.1442 | raw__TERMINAL_OUTPUT | 0.0064 |
| metric__time_in_editor_s | 0.0984 | metric__max_consecutive_errors | 0.0054 |
| raw__event_count | 0.0922 | raw__WINDOW_RESIZE | 0.0050 |
| raw__event_density_per_s | 0.0881 | raw__TERMINAL_ERROR | 0.0049 |
| metric__time_in_chat_s | 0.0868 | raw__TERMINAL_SELECT | 0.0048 |
| raw__MOUSE_MOVE | 0.0786 | metric__terminal_errors | 0.0045 |
| Behavioral context | Windows | Share | Positive rate |
|---|---|---|---|
| W2: Iterating | 1,837 | 17.0% | 80.8% |
| After last query | 1,787 | 16.5% | 0.0% |
| No query this session | 1,600 | 14.8% | 0.0% |
| W2 context (invalid interval) | 1,289 | 11.9% | 21.5% |
| W1: Oriented | 1,072 | 9.9% | 52.6% |
| W2: Passive | 1,061 | 9.8% | 91.3% |
| Preceding profile | Queries | Share | Guided |
|---|---|---|---|
| W2: Passive | 186 | 37.3% | 22.6% |
| W2: Iterating | 166 | 33.3% | 33.7% |
| W1: Oriented | 47 | 9.4% | 72.3% |
| W2: Debugging | 28 | 5.6% | 35.7% |
| W2 (invalid interval) | 25 | 5.0% | 36.0% |
| W1: Cold Start | 20 | 4.0% | 0.0% |
Intelligent Tutoring Systems
Intelligent tutoring systems model learner knowledge and adapt instruction, practice, hints, and feedback to support learning.
See all 154 papers