Reasoning-Trace Analysis Using Large Language Models for Interpretable Q-Matrix Construction

Jihong Zhang, Zijing Jin, Mingfeng XuearXiv 2026

TL;DR

Researchers have developed Reasoning-Trace Analysis (RTA), a framework that uses Chain-of-Thought prompting to make AI-generated Q-matrices—the maps linking test questions to specific skills—transparent and inspectable. While direct AI generation is more stable, RTA reveals why an AI assigns a skill to a question, allowing human experts to catch "hidden" reasoning errors that simple accuracy metrics miss.

What Problem Does This Paper Address?

In the world of educational measurement, Diagnostic Classification Models (DCMs) are used to provide fine-grained feedback on what a student knows. The heart of a DCM is the Q-matrix: a table where rows are test items and columns are the cognitive attributes (skills) required to solve them.

Traditionally, building a Q-matrix requires grueling hours of expert deliberation. While Large Language Models (LLMs) have recently shown they can generate these matrices automatically, they usually do so as a "black box." We see the final matrix, but we don't see the reasoning. If the AI is wrong, we don't know if it’s because it misunderstood the math, used a different solution path, or simply hallucinated. This lack of transparency is a major hurdle for the "responsible use of AI" in high-stakes testing.

Methods

The authors propose Reasoning-Trace Analysis (RTA), which moves away from asking an LLM for a final matrix and instead asks it to "show its work" using a specific format.

  1. Trace Generation (Step 0): Using Chain-of-Thought (CoT) prompting, the LLM solves an item step-by-step. Crucially, it must label each step with the specific skill (e.g., [A4]: borrowing from whole number) it is exercising.
  2. Trace Analysis (Steps 1-4):
    • Inspection: Researchers check if the labels match the actual operations described in the text.
  3. Reconstruction: A Q-vector is built for the item based on which labels appeared in the trace.
  4. Comparison: This reconstructed vector is compared against a human-expert "reference" Q-matrix.
  5. Discrepancy Inspection: If the AI and human disagree, researchers look back at the reasoning trace to find the source of the conflict.

The study compared this CoT workflow against a Direct workflow (where the LLM just outputs the matrix) across four models: GPT-4o mini, DeepSeek v4 Flash, Claude Haiku 4.5, and Kimi K2.6.

Datasets

The researchers utilized the classic Tatsuoka (1990) fraction subtraction dataset, a benchmark in psychometrics.

  • Simulation Data: 10 "perturbed" items (slight numerical variations of a base problem) and 6 variants designed to test if the AI could correctly withhold skills that weren't needed.
  • Empirical Data: 11 items from the original set and real-world response data from 536 examinees to evaluate how well the AI-generated matrices fit actual student performance.

Key Insights and Ideas

  • Accuracy is not a proxy for validity: Interestingly, a model like GPT-4o mini could solve only 50% of the math problems correctly but still recovered 80% of the correct skill mappings. This suggests that "labeling" a skill and "executing" a skill are distinct processes within the model.
  • The "Folding" Phenomenon: Many "errors" in the AI's Q-matrix weren't actually errors in reasoning. Instead, the models often "folded" two operations into one step but only applied one label. For example, a model might separate a whole number and subtract fractions in one breath, but only label it as "subtraction."
  • Stability vs. Transparency: Direct generation produced more stable results across multiple runs. However, the authors warn this might be "retrieval" (the AI remembering the famous Tatsuoka matrix from its training data) rather than active reasoning. The CoT workflow was more volatile but provided the "inspectable evidence" required for human oversight.

Key Results

  • Alignment: CoT-derived matrices had a mean overlap of .809 with expert references. While this was lower than the Direct workflow (.877), it provided the necessary context to explain disagreements.
  • Model Fit: Matrices generated via RTA performed comparably to expert matrices when fitted to real student data. In one case (DeepSeek v4 Flash), the AI-derived matrix actually showed a slightly better statistical fit than the human-defined reference.
  • Discrepancy Sources: By inspecting traces, the authors identified four specific sources of disagreement, ranging from "narrow labeling rules" in the prompt to "alternative solution paths" taken by the AI.

Limitations and Future Work

The study is currently limited to the domain of fraction subtraction, which is highly procedural. It remains to be seen how RTA performs in more subjective domains like reading comprehension or abstract problem-solving.

Additionally, the authors noted that none of the generated matrices (or even the expert reference) perfectly satisfied the "strict identifiability" conditions required for certain mathematical models (DINA). Future work should focus on automating the "discrepancy inspection" phase and testing RTA on entirely new, non-public item sets to rule out the effects of training data contamination.

Summary updated

Abstract

Large language models (LLMs) can generate Q-matrices for diagnostic classification models that approximate expert specifications, but evaluations have focused on the final matrices, leaving the basis of individual item-attribute assignments unexamined. This opacity limits the responsible use of AI in measurement. We propose Reasoning-Trace Analysis (RTA), a framework in which an LLM generates attribute-labeled reasoning steps through chain-of-thought (CoT) prompting and these steps are analyzed to reconstruct, compare, and inspect each assignment. RTA is intended to supplement expert review and empirical validation. In a simulation study with perturbed fraction subtraction items, four LLMs recovered the required attributes and withheld attributes the items did not require. In an empirical study with 11 fraction subtraction items, responses from 536 examinees, four LLMs, up to three temperatures, and 100 replications per condition, CoT-derived Q-matrices overlapped substantially with the reference Q-matrix (mean overlap .809) but less than directly generated Q-matrices (.877), and they varied more across replications. Inspection of the traces linked disagreements to item-type coding, labeling rules, and how operations were expressed as steps. Q-matrices with similar overlap differed in fit to examinee responses. RTA provides inspectable evidence that matrix-level agreement and fit do not.
BibTeX
@misc{zhang2026reasoning,
  author = {Jihong Zhang and Zijing Jin and Mingfeng Xue},
  title = {{Reasoning-Trace Analysis Using Large Language Models for Interpretable Q-Matrix Construction}},
  year = {2026},
  eprint = {2611.26422},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.26422},
}
Figure