alphaFeedback

WorksComputer Science

AI Cosmos: An Agentic Infra for Situated Learning

AI contributions
Not recorded for this paper
View details

Abstract

Large language models (LLMs) can improve task performance during learning, yet these gains do not necessarily reflect learners' ability to thereafter apply the knowledge and skills independently. We present AI Cosmos, an agentic infrastructure for situated learning that organizes learning around two complementary principles: scenario-based participation and cumulative assets of practice. AI Cosmos organizes learners and role-specialized agents within learning scenarios that integrate task-relevant knowledge and, when needed, executable workbenches. An asset-memory loop preserves the processes and outcomes of practice as reusable assets with explicit provenance and dependencies. We evaluate scenario-based interaction through two preregistered randomized controlled studies examining the acquisition of legal reasoning and programming competence, holding the same underlying LLM across conditions. AI Cosmos achieves greater learning gains than a conventional LLM in legal reasoning and higher mastery of unseen programming problems than an LLM-as-Teacher baseline.

“For education becomes transformative when knowledge is not merely expressed, but enacted, shared, and turned into reusable intellectual assets.” – Manifesto of AI Cosmos

Introduction

Overview of the Scenario–Asset Framework

Figure 1. Overview of the Scenario–Asset Framework. AI Cosmos shifts AI-assisted learning from request–artifact exchange to scenario-based participation, and from one-off outputs to cumulative assets of practice, supporting competence development through sustained practice.

Introduction

In 1929, philosopher Alfred North Whitehead described the problem of inert knowledge in his seminal collection “The Aims of Education”: “...the problem of keeping knowledge alive, of preventing it from becoming inert, which is the central problem of all education” [1]. Nearly a century later, Whitehead’s diagnosis remains relevant, despite successive advances in educational technologies. Today, generative AI appears to offer a promising remedy to this enduring problem by providing intelligence that is continuously accessible, highly interactive, and readily adaptable into explanations and personalized tutorials [2, 3, 4, 5].

Yet, this remedy may not close the gap between knowing and doing but instead widen it in a new form. Across educational settings, learners become more fluent in reproducing AI-provided concepts, explanations, and solutions [6] without commensurate gains in their ability to apply that knowledge independently [7, 8], a discrepancy we refer to as performance–competence decoupling [9]. For instance, an undergraduate student may be able to explain the divide-and-conquer tactic of quicksort yet struggle to implement it robustly [10]; similarly, a bar-exam candidate can fluently state a legal doctrine yet fails to apply it to an unfamiliar case [11]. These examples reflect a structural asymmetry: generative AI has substantially reduced the cost of accessing and reproducing declarative knowledge (“knowing what”) [12], without producing an equivalent improvement in procedural knowledge (“knowing how”) [13].

We should note that this asymmetry no longer stems from LLM capability, but from the interaction scheme in which these models are used [14, 15]. Despite the diversity of AI-assisted educational applications, from content creation to lesson planning [16, 17, 18], a common interaction pattern is the request–artifact exchange, where the learner submits a request, the system produces an explanation or artifact, and the interaction often ends once that artifact is delivered [19]. Question answering is such an epistemic outsourcing example, more accurate and pedagogically appropriate responses may improve immediate task performance without requiring learners to reason through, test, or revise solutions themselves. The limitation, therefore, is not simply the quality of generated outputs, but whether the interaction supports the activities through which competence develops. Learning research emphasizes active participation, feedback, and iterative revision within meaningful, scaffolded activities [20, 21, 22, 23]. When assistance is organized primarily around output delivery, learners’ actions, feedback, and revisions may remain outside the interaction, limiting opportunities to support continued practice and use its outcomes to inform subsequent learning [24, 25].

Recent LLM-based tutoring systems structure pedagogical dialogue and feedback to support learners’ reasoning [27] (Chowdhury et al. 2024), while general-purpose multi-agent frameworks coordinate role-specialized agents to complete complex tasks [28, 29, 30]. Yet the effectiveness of these systems in supporting learners’ sustained competence development cannot be inferred from the quality of instructional guidance or the success of agent task execution alone. One consideration is agency-preserving participation, which emphasizes learners’ active engagement in explaining, testing, and revising their own work within authentic or scaffolded activities, rather than merely receiving generated solutions [21, 20]. Tool-using agents are often designed for autonomous task execution [31, 32]; when applied to educational settings, such designs may position learners primarily as requesters or evaluators of completed work. A second consideration is maintaining cumulative, inspectable record of practice. Constructionism emphasizes the educational value of artifacts that learners can create, examine, and improve over time [33]. Agentic systems also accumulate and refine reusable skills from past experience [34], although their reported gains primarily concern subsequent agent task performance rather than learners’ use of prior practice.

Taken together, these considerations motivate an approach to AI-assisted learning that centers learners’ own reasoning and action within learning activities, while enabling subsequent activities to build on prior practice.

We translate these considerations into two complementary architectural shifts. The first shift moves from request-artifact exchange to scenario-based participation, which organizes learning around learners’ active involvement in socially mediated, tool-supported activities (Lave and Wenger, [21]; Kaptelinin and Nardi, [35]). Each scenario integrates three configurable dimensions of practice: social (learners and role-specialized agents as co-participants), epistemic (task-relevant knowledge resources), and operational (stateful, executable workbenches, i.g., a coding IDE„ when needed). Learners and agents coordinate through dialogue and, when applicable, perform task-relevant operations on shared workbench states. The resulting observations inform subsequent dialogue and actions, supporting learners in applying knowledge, evaluating outcomes, and adapting their approaches through practice. The second shift moves from one-off artifacts to cumulative assets of practice. Rather than treating final outputs as the endpoint of learning activities, this shift makes the processes and outcomes of practice available for reuse. Subsequent scenarios can thus build on accumulated experience, supporting continuity across learning activities. Together, these shifts place learners’ active participation and the accumulation of practical experience at the center of AI-assisted learning, shifting the emphasis from task completion to the development of learners’ competence (Kolb, [36]; Schön, [37]).

We instantiate these shifts in AI Cosmos (https://aicosmos.ai/), an agentic infrastructure for situated learning that organizes learner–agent participation in structured scenarios and preserves records of practice for reuse. A scenario control plane configures each learning activity from a learner’s request by specifying its objective, participant roles, relevant knowledge resources, and executable workbenches when needed. A task execution plane coordinates dialogue and workbench operations over shared task states, dynamically scheduling learners and agents to participate in iterative problem solving, execution, and revision. To connect successive scenarios, an asset–memory loop extracts and validates reusable assets from scenario configurations and records of practice. By retaining provenance and dependencies, these assets make prior outcomes and the associated reasoning, feedback, and revisions available for inspection and adaptation in subsequent activities. We evaluate scenario-based interaction through two preregistered randomized controlled studies examining the acquisition of legal reasoning and programming competence, finding greater learning gains than a conventional LLM in the former and stronger programming mastery than an LLM-as-Teacher baseline in the latter.

The Scenario–Asset Framework

The Scenario

Definition 2.1 (Scenario). A scenario is a configured learning activity specified by the tuple S=⟨oS,PS,KS,WS⟩S = \langle o_S, \mathcal{P}_S, \mathcal{K}_S, \mathcal{W}_S \rangle, where oSo_S is the learning objective around which the activity is organized, and the remaining components operationalize three complementary dimensions of practice:

  • PS\mathcal{P}_S (social): The participant configuration, comprising role-specialized agents PSagent\mathcal{P}^{\mathrm{agent}}_S (e.g., explainer, mentor) and human learners PShuman\mathcal{P}^{\mathrm{human}}_S. Their assigned roles determine how responsibility and action are distributed within the scenario;

  • KS\mathcal{K}_S (epistemic): The task-relevant knowledge resources available to participants are queryable, e.g., reference materials, datasets, and retrieved from memory;

  • WS\mathcal{W}_S (operational): The set of stateful workbenches through which participants act, e.g., a coding IDE. Each w∈WSw \in\mathcal{W}_S maintains a mutable state and exposes operations for inspecting, creating, modifying, executing, or evaluating task-relevant objects.

The epistemic and operational components may be empty, where WS=∅\mathcal{W}_S = \varnothing, participation is entirely discursive, and KS=∅\mathcal{K}_S = \varnothing, no external knowledge resource is explicitly bound to the activity. A scenario proceeds through three stages: initialization configures its components, execution advances the scenario through successive state transitions directed toward oSo_S, and completion packages its residue and outputs for asset extraction.

The Asset

Definition 2.2 (Asset). An asset is a typed, provenance-bearing unit of reusable outcome, [a=⟨τa,ca,sa,Aaprior⟩]\left[a = \langle\tau_a, c_a, s_a, \mathcal{A}^{\mathrm{prior}}_a \rangle\right], where τa\tau_a is its type, cac_a is its content, sas_a identifies its originating scenario, and Aaprior\mathcal{A}^{\mathrm{prior}}_a contains the prior assets on which it directly depends. We distinguish five asset types:

  • Role specification: a reusable definition of a participant role, including its responsibilities, behavioral instructions, and applicable task conditions;

  • Scenario specification: a complete or partial configuration ⟨o,P,K,W⟩\langle o, \mathcal{P}, \mathcal{K}, \mathcal{W} \rangle that can be instantiated or adapted in subsequent scenarios;

  • Knowledge artifact: a task-relevant object created or revised through a workbench, such as a slide deck, annotated document, or code module;

  • Process record: an inspectable sequence of participant actions, feedback, critiques, and revisions through which an outcome emerged;

  • Experience trace: structured evidence abstracted from execution, e.g., operation outcomes, failure cases, or observed relationships between configuration choices and task performance.

By preserving content together with its provenance and dependencies, assets can be inspected, retrieved, adapted, and extended across scenarios. In particular, scenario specifications, process records, and experience traces retain the conditions and actions surrounding an outcome, making records of prior practice available to future participants rather than preserving only the final product.

The Asset–Memory Feedback Loop

Definition 2.3 (Asset Memory). At system update tt, the asset memory Mt\mathcal{M}_t is the set of admitted assets, denoted as a asset-dependency graph Gt=(Mt,Et)\mathcal{G}_t = (\mathcal{M}_t, \mathcal{E}_t), where Et={(a′,a)∣a∈Mt;a′∈Aaprior}\mathcal{E}_t = \{(a', a) \mid a \in\mathcal{M}_t; a' \in\mathcal{A}^{\mathrm{prior}}_a\}. An edge a′→aa' \to a denotes that aa depends on or is derived from a′a'. As dependencies refer only to prior assets, Gt\mathcal{G}_t forms a directed acyclic graph. Scenarios interact with asset memory via three operations:

  • Retrieval: At initialization and, when needed, during execution R(qS,t,Mt)→AS,tin⊆MtR(q_{S,t}, \mathcal{M}_t) \to\mathcal{A}^{\mathrm{in}}_{S,t} \subseteq\mathcal{M}_t. The query is initialized from the learning objective and scenario configuration and may subsequently incorporate the evolving scenario’s runtime state. Retrieved assets can configure roles, supply knowledge resources, or inform the selection and use of workbenches.

  • Production: During execution, the system records artifacts, participant interactions, and workbench traces. At completion, the system distills these records into candidate assets, S→ASoutS \to\mathcal{A}^{\mathrm{out}}_S, each of which records its originating scenario and dependencies on retrieved assets or earlier candidates.

  • Admission: Candidates are evaluated using a type-specific predicate Vτa(a)∈{0,1}\mathcal{V}_{\tau_a}(a) \in\{0,1\}. Let AS+\mathcal{A}^{+}_S be the largest dependency-closed subset of validated candidates: AS+={a∈ASout∣Vτa(a)=1}\mathcal{A}^{+}_S = \{a \in\mathcal{A}^{\mathrm{out}}_S \mid\mathcal{V}_{\tau_a}(a) = 1\}. The memory is updated as Mt+1=Mt∪AS+\mathcal{M}_{t+1} = \mathcal{M}_t \cup\mathcal{A}^{+}_S, with the related dependency edges added to Et+1\mathcal{E}_{t+1}.

With these three operations, later scenarios can inspect, compose, and extend validated contributions from prior activities, enabling assets and records of practice to accumulate across interactions.

System Architecture of AI Cosmos

AI Cosmos implements the Scenario–Asset Framework via three interconnected components (Figure 2). The scenario control plane configures learning objectives, participant roles, knowledge resources, and optional workbenches from learner requests and relevant prior assets. The task execution plane coordinates learner–agent interactions and workbench operations via history-dependent scheduling. Learners and agents operate on shared workbench states, with resulting observations informing subsequent interactions. The asset–memory substrate derives reusable assets from scenario configurations and records of practice, manages their validation and admission, and preserves provenance and dependencies for reuse in subsequent scenarios.

Architecture of AI Cosmos showing the scenario control plane, task execution plane, and asset–memory substrate

Figure 2. Architecture of AI Cosmos. The scenario control plane configures learning environments, the task execution plane coordinates participant interactions and workbench operations, and the asset–memory substrate preserves and reuses validated assets across scenarios.

The Scenario Control Plane

The Scenario Control Plane

This plane instantiates the scenario-configuration operator Fconfig\mathcal{F}_{\mathrm{config}}, mapping an initial learning request to an executable scenario for the task execution plane. Rather than relying on a fixed agent team and tool set, it configures the three dimensions according to the learning objective. Let uu be a user input, comprising a request and a (possibly empty) set U\mathcal{U} of uploaded resources. The operator is defined as:

Fconfig(u;M)↦S=⟨oS,PS,KS,WS⟩.(1)\mathcal{F}_{\mathrm{config}}(u;\mathcal{M}) \mapsto S = \langle o_S, \mathcal{P}_S, \mathcal{K}_S, \mathcal{W}_S\rangle. \tag*{(1)}

It first grounds the request into the objective oSo_S through intent parsing. This objective then conditions the scenario configuration that may reuse previously admitted assets through relevance-gated retrieval: ASin=R(oS,M)\mathcal{A}^{\mathrm{in}}_S = R(o_S,\mathcal{M}), which returns only assets whose relevance to oSo_S exceeds a predefined threshold, otherwise ASin=∅\mathcal{A}^{\mathrm{in}}_S = \varnothing. We write ASin,P\mathcal{A}^{\mathrm{in},\mathcal{P}}_S, ASin,K\mathcal{A}^{\mathrm{in},\mathcal{K}}_S, and ASin,W\mathcal{A}^{\mathrm{in},\mathcal{W}}_S for the asset subsets used in three dimensions.

Social configuration. This dimension is realized as a shared, multiparty interaction space comprising both agents and human participants: PS=PSagent∪Phuman\mathcal{P}_S = \mathcal{P}^{\mathrm{agent}}_S \cup\mathcal{P}^{\mathrm{human}}. Given the objective oSo_S and any retrieved role specifications, it determines the roles required by the scenario and instantiates one agent per role, with both the number of roles nn and each profile determined adaptively:

{r1,…,rn}=Roles⁡(oS,ASin,P),PSagent={agent⁡(ri)}i=1n.(2)\{r_1,\ldots,r_n\} = \operatorname{Roles}\left(o_S,\mathcal{A}^{\mathrm{in},\mathcal{P}}_S\right), \qquad\mathcal{P}^{\mathrm{agent}}_S = \{\operatorname{agent}(r_i)\}_{i=1}^{n}. \tag*{(2)}

Each role profile $ rir_i specifies the participant’s task responsibility, expertise, interaction policy, and access to knowledge resources and workbench operations. When ASin,P≠∅\mathcal{A}^{\mathrm{in},\mathcal{P}}_S \ne\varnothing, Roles⁡(⋅)\operatorname{Roles}(\cdot) reuses or adapts roles from previously admitted configurations; otherwise, it synthesizes new role profiles from scratch.

Epistemic configuration. This dimension is realized as a knowledge base that remains queryable throughout scenario execution. AI Cosmos holds a library Σ\Sigma of modular skills that can be loaded on demand ((Anthropic, 2025)). For each uploaded resource ρ∈U\rho\in\mathcal{U}, the control plane selects a compatible skill σρ∈Σ\sigma_\rho\in\Sigma and applies it to produce a set of indexed, retrievable units σρ(ρ)\sigma_{\rho}(\rho). Let ASin,K⊆ASin\mathcal{A}_{S}^{\mathrm{in},\mathcal{K}} \subseteq\mathcal{A}_{S}^{\mathrm{in}} denote the retrieved knowledge-bearing assets, and Index⁡(ASin,K)\operatorname{Index}(\mathcal{A}_{S}^{\mathrm{in},\mathcal{K}}) denote the indexed units derived from the retrieved assets. The knowledge base is

KS=⋃ρ∈Uσρ(ρ)  ∪  Index⁡(ASin,K).(3)\mathcal{K}_{S} = \bigcup_{\rho\in\mathcal{U}} \sigma_{\rho}(\rho) \;\cup\; \operatorname{Index}\left(\mathcal{A}_{S}^{\mathrm{in},\mathcal{K}}\right). \tag*{(3)}

During execution, authorized participants access KS\mathcal{K}_{S} through a retrieval service. When neither uploaded resources nor previously accumulated knowledge is required, KS=∅\mathcal{K}_{S} = \varnothing.

Operational configuration. This dimension is realized by selecting and binding workbenches through which participants execute task-relevant objects. Let W\mathcal{W} denote the registry of available workbenches (e.g., a coding IDE or domain-specific instrument), the plane selects the subset required by the objective:

WS=Select⁡(oS,W,ASin,W)⊆W.(4)\mathcal{W}_{S} = \operatorname{Select}(o_{S}, \mathcal{W}, \mathcal{A}_{S}^{\mathrm{in},\mathcal{W}}) \subseteq\mathcal{W}. \tag*{(4)}

For a purely discursive objective, WS=∅\mathcal{W}_{S} = \varnothing. Each workbench w∈WSw \in\mathcal{W}_{S} maintains a shared, mutable state xwx_{w} and exposes a typed action interface Iw\mathcal{I}_{w}. The interface consists of named operations for inspecting or transforming that state, such as creating, modifying, executing, or querying a task-relevant object. Binding a workbench connects its action interface to the scenario’s shared interaction stream. An authorized agent invokes an operation in Iw\mathcal{I}_{w} through a structured tool call, whereas a human participant acts through a graphical interface whose interactions are mapped to the same underlying operations. An operation updates xwx_{w} and emits an observation that is recorded in the shared interaction history. Thus, conversation and operation remain synchronized: dialogue can initiate changes to the workbench, and workbench observations can immediately inform subsequent dialogue and action. The access scope encoded in each role profile rir_{i} determines which workbenches in WS\mathcal{W}_{S}, and which operations in their Iw\mathcal{I}_{w}, the corresponding agent is authorized to invoke.

The Task Execution Plane

The task execution plane runs a configured scenario SS toward its objective oSo_{S} by coupling deliberation in the shared interaction space with action in the bound workbenches.

Outer loop: multi-party scheduling. At each outer step, the execution plane selects the next system-mediated participant according to the current interaction history HtH_{t} and objective:

pt=Schedule⁡(Ht,oS)∈PS.(5)p_{t} = \operatorname{Schedule}(H_{t}, o_{S}) \in\mathcal{P}_{S}. \tag*{(5)}

The selected participant contributes to the shared interaction or invokes a bound workbench. Since scheduling is conditioned on the evolving history rather than a fixed turn order, the scenario can move dynamically among explanation, questioning, critique, tool use, and human handoff. All agent actions remain subject to the role and access policies established by the scenario control plane. Each scheduled action and its resulting observation are recorded in the history and inform subsequent scheduling.

Grounding agent turns with hybrid retrieval. When a knowledge base KS\mathcal{K}_{S} is available, the task execution plane derives a query qtKq_{t}^{K} from the interaction history HtH_{t} and scores each entry kk by combining normalized BM25 ([39]) and embedding-based cosine similarity:

score⁡(qtK,k)=λBM25⁡~(qtK,k)+(1−λ)Cos⁡~(eqtK,ek),(6)\operatorname{score}(q_{t}^{K}, k) = \lambda\widetilde{\operatorname{BM25}}(q_{t}^{K}, k) + (1-\lambda)\widetilde{\operatorname{Cos}}(e_{q_{t}^{K}}, e_{k}), \tag*{(6)}

where λ∈[0,1]\lambda\in[0,1] balances lexical and semantic relevance, and both similarity scores are normalized to a common range. Entries with score⁡(qtK,k)≥τ\operatorname{score}(q_{t}^{K}, k) \geq\tau are provided as grounding context for subsequent agent actions.

The workbench: sandboxed state and intent-level operations. Each workbench w∈WSw \in\mathcal{W}_{S} comprises an isolated execution environment, which maintains its persistent state xwx_{w} and a typed action interface Iw\mathcal{I}_{w}. The sandbox preserves task state across operations and confines untrusted model-generated execution from the host environment and other scenarios. The interface exposes a small vocabulary of operations:

Iw⊆I={CREATE, MODIFY, EXECUTE, QUERY, …}.(7)\mathcal{I}_{w} \subseteq\mathcal{I} = \{\mathrm{CREATE},\ \mathrm{MODIFY},\ \mathrm{EXECUTE},\ \mathrm{QUERY},\ \ldots\}. \tag*{(7)}

Here, CREATE\mathrm{CREATE} creates or initializes a task-relevant object, MODIFY\mathrm{MODIFY} changes an existing object, EXECUTE\mathrm{EXECUTE} runs a computation or executable object, and QUERY\mathrm{QUERY} inspects the current state. Each workbench implements only the operations supported by its capabilities. For agent invocations, operations are specified at the level of intent: the agent provides an operation and a natural-language sub-goal, which a workbench-specific adapter translates into platform primitives [40]. Thus, heterogeneous environments can share the same higher-level scheduling and execution logic while differing only in their runtime and adapter.

Inner loop: executing a workbench operation. When a scheduled agent action requires workbench ww, the agent invokes an operation ιw∈Iw\iota_{w} \in\mathcal{I}_{w}, authorized by its role profile rir_{i}, with a sub-goal ogo_{g} through a structured tool call [31]. The operation executes within the sandbox through iterative generation and execution of platform-specific primitives, using diagnostic feedback to guide retries. Let jj index execution attempts, with xw(0)=xwx_{w}^{(0)} = x_{w} denoting the initial workbench state. At each attempt,

cw(j)=Gen⁡w(ιw,og,xw(j),ϵ(j)),(xw(j+1),yw(j))=Exec⁡w(xw(j),cw(j)),(8)c_{w}^{(j)} = \operatorname{Gen}_{w}\left(\iota_{w}, o_{g}, x_{w}^{(j)}, \epsilon^{(j)}\right), \qquad\left(x_{w}^{(j+1)}, y_{w}^{(j)}\right) = \operatorname{Exec}_{w}\left(x_{w}^{(j)}, c_{w}^{(j)}\right), \tag*{(8)}

where Gen⁡w\operatorname{Gen}_{w} is an LLM-based generator of workbench-specific primitives cw(j)c_{w}^{(j)} (e.g., Python cells in Jupyter), while Exec⁡w\operatorname{Exec}_{w} executes these primitives in an isolated sandbox, yielding the updated state xw(j+1)x_{w}^{(j+1)} and observation yw(j)y_{w}^{(j)}. The diagnostic input ϵ(j)\epsilon^{(j)} captures feedback from the preceding failed attempt, with ϵ(0)=∅\epsilon^{(0)} = \varnothing. After each attempt, the workbench evaluates the result against the sub-goal:

Verify⁡(og,yw(j))∈{0,1}.(9)\operatorname{Verify}(o_{g}, y_{w}^{(j)}) \in\{0, 1\}. \tag*{(9)}

If verification fails and the retry budget permits, diagnostic feedback guides the next generation attempt. The loop terminates upon successful verification or budget exhaustion. The complete invocation trace, including intermediate failures and repairs, is retained for later inspection and asset extraction, while the terminal observation and execution status are incorporated into the shared interaction history Ht+1H_{t+1} without exposing every intermediate attempt.

Interruptible human participation. Human participants may intervene during scenario execution without waiting for scheduler-selected turns. Subject to scenario permissions, they can inspect or modify bound workbenches through a graphical interface, operating on the same persistent state and underlying operations as authorized agents. These interventions are recorded in the shared interaction history, allowing subsequent scheduling and agent actions to account for the updated workbench state.

The Asset–Memory Substrate

The two planes above orchestrate an individual scenario, while the asset–memory substrate connects successive scenarios through the feedback loop in § 3.3, which manages four stages of the asset lifecycle.

Production: deriving assets from practice. At configuration, each instantiated role profile rir_{i} yields a role specification, and the configured tuple ⟨OS,PS,KS,WS⟩\langle O_{S}, P_{S}, K_{S}, W_{S}\rangle yields a scenario specification. During execution, durable task-relevant objects created or materially revised in a workbench become candidate knowledge artifacts, while dialogue, retrieval events, workbench operations, observations, failures and repairs, and human interventions accumulate in the execution history. At completion, the resulting history HSH_S is persisted as a process record. An offline pass further distills reusable experience traces:

Distill⁡(HS)={⟨κη,βη,ℓη⟩:η∈Seg⁡(HS)}.(10)\operatorname{Distill}(H_S)=\left\{\langle\kappa_\eta,\beta_\eta,\ell_\eta\rangle:\eta\in\operatorname{Seg}(H_S)\right\}. \tag*{(10)}

Here, Seg⁡(⋅)\operatorname{Seg}(\cdot) partitions the execution record at dialogue-turn and workbench-attempt boundaries. For each episode η\eta, κη\kappa_\eta summarizes the triggering context, βη\beta_\eta abstracts the action taken, and ℓη∈{+,−}\ell_\eta\in\{+,-\} denotes its task-level outcome:

ℓη={μ±[Prog⁡(Hend⁡(η),oS)>Prog⁡(Hstart⁡(η),oS)],η is a dialogue turn,μ±[Verify⁡(og,yw(j))=1],η is a workbench attempt.(11)\ell_\eta= \begin{cases} \mu^{\pm}\left[\operatorname{Prog}(H_{\operatorname{end}(\eta)},o_S)>\operatorname{Prog}(H_{\operatorname{start}(\eta)},o_S)\right], & \eta\text{ is a dialogue turn},\\ \mu^{\pm}\left[\operatorname{Verify}(o_g,y_w^{(j)})=1\right], & \eta\text{ is a workbench attempt}. \end{cases} \tag*{(11)}

where Prog⁡(⋅)\operatorname{Prog}(\cdot) is the scheduler’s progress assessment, Verify⁡(⋅)\operatorname{Verify}(\cdot) the inner-loop self-check, and μ±[Δ]\mu^{\pm}[\Delta] returns + if Δ\Delta holds and − otherwise. A failed attempt often followed by a successful repair therefore yields distinct negative and positive traces. These labels capture task-level utility rather than pedagogical effectiveness.

Admission: type-specific validation. Process records are admitted without quality filtering to preserve execution histories. For other candidate assets, an LLM-based evaluator applies a type-specific acceptance rubric Φτa(oS)\Phi_{\tau_a}(o_S), with access to asset content, provenance, and scenario context:

Vauto(a)=⋀ϕ∈Φτa(oS)Judge⁡(ϕ,a),Judge⁡(ϕ,a)∈{0,1}.(12)\mathcal{V}_{\mathrm{auto}}(a)=\bigwedge_{\phi\in\Phi_{\tau_a}(o_S)}\operatorname{Judge}(\phi,a),\qquad\operatorname{Judge}(\phi,a)\in\{0,1\}. \tag*{(12)}

where τa\tau_a denotes the asset type. Knowledge artifacts additionally require human approval. The final admission criterion is

V(a)={1,if a is a process record,Vauto(a)∧HumanGate⁡(a),if a is a knowledge artifact,Vauto(a),otherwise.(13)\mathcal{V}(a)= \begin{cases} 1, & \text{if }a\text{ is a process record},\\ \mathcal{V}_{\mathrm{auto}}(a)\wedge\operatorname{HumanGate}(a), & \text{if }a\text{ is a knowledge artifact},\\ \mathcal{V}_{\mathrm{auto}}(a), & \text{otherwise}. \end{cases} \tag*{(13)}

Only assets satisfying V(a)=1\mathcal{V}(a)=1 are admitted to reusable memory.

Persistence: memory and provenance. Each admitted asset is stored as a=⟨τa,ca,sa,Aaprior,st⁡a⟩a=\langle\tau_a,c_a,s_a,\mathcal{A}_a^{\mathrm{prior}},\operatorname{st}_a\rangle, where st⁡a∈{active,deprecated}\operatorname{st}_a\in\{\mathrm{active},\mathrm{deprecated}\} denotes its lifecycle status. Assets form a directed provenance graph G\mathcal{G}, with an edge a′→aa'\to a for each dependency a′∈Aapriora'\in\mathcal{A}_a^{\mathrm{prior}}. Asset content and dependencies remain immutable: when a new asset a′′a'' supersedes aa, it references aa as a dependency, and st⁡a\operatorname{st}_a is set to deprecated. By default, retrieval is restricted to active assets:

Mactive={a∈M∣st⁡a=active}.(14)\mathcal{M}_{\mathrm{active}}=\{a\in\mathcal{M}\mid\operatorname{st}_a=\mathrm{active}\}. \tag*{(14)}

Deprecated assets remain available for provenance inspection and rollback. Since dependencies point from earlier to later assets, G\mathcal{G} remains acyclic.

Reuse: asset-specific integration. During scenario configuration, retrieved scenario specifications can initialize new configurations, while role specifications can be reused or adapted. Validated knowledge artifacts are indexed into KS\mathcal{K}_S for retrieval, whereas process records remain available for provenance and inspection without being treated as trusted knowledge by default. During execution, experience traces are retrieved using a query qtexpq_t^{\mathrm{exp}} derived from the current interaction history:

Atexp=Rexp(qtexp,Mactive).(15)\mathcal{A}_t^{\mathrm{exp}}=\mathcal{R}_{\mathrm{exp}}\left(q_t^{\mathrm{exp}},\mathcal{M}_{\mathrm{active}}\right). \tag*{(15)}

Positive traces identify actions that advanced similar task states, while negative traces denote actions associated with failure. These traces provide auxiliary context for Schedule⁡(⋅)\operatorname{Schedule}(\cdot) without determining its decisions.

Compounding via reuse. The substrate closes the feedback loop by allowing validated assets and execution experience from one scenario to inform subsequent scenarios. When relevant prior assets exist, reuse can reduce repeated configuration and reconstruction while preserving the provenance of the reused material.

Experiments

Human Study: Situated Learning for Bar-Examination Preparation

Legal problem solving provides a demanding test of application-oriented learning: success requires not only recalling legal doctrine but also identifying relevant rules and applying them to novel fact patterns. We therefore use bar-examination preparation to test whether restructuring LLM interaction from conventional chat into a structured scenario improves learning of applied legal reasoning.

Study Design and Measures

Design and participants. We conducted a pre-registered, three-arm, parallel-group randomized controlled trial. A total of 131 students were assigned in a 1:1:1 ratio to one of three learning conditions: (i) vanilla LLM, a conventional request–response assistant, (ii) LLM-as-Teacher in which the same LLM was prompted to adopt an expert-tutor, or (iii) AI Cosmos. All conditions used the same underlying LLM, holding model capability constant while varying the interaction architecture. Following our preregistered data-integrity criteria, we excluded participants whose learning logs failed to meet minimum-engagement requirements (e.g., insufficient interaction or exceptionally short inputs), leaving an analyzed sample of N=111N = 111 (37 per arm). We observed no statistically significant between-group differences in the measured pre-intervention characteristics, including sex, prior legal training, age, AI literacy, self-efficacy, and pre-test performance (all p≥0.27p \ge0.27; Table 1 in Appendix § 10.§ 2).

Vanilla LLMLLM-as-TeacherAI CosmosTest (pp)
Female (%)73.081.186.5χ2\chi^2, 0.34
Prior legal training (%)24.327.021.6χ2\chi^2, 0.86
Age (years)23.2±2.123.2 \pm2.123.8±3.023.8 \pm3.023.0±2.023.0 \pm2.0FF, 0.41
AI literacy (/170)119.7±15.0119.7 \pm15.0119.8±13.8119.8 \pm13.8116.1±14.3116.1 \pm14.3FF, 0.44
Self-efficacy, GSES15.1±4.015.1 \pm4.015.1±4.315.1 \pm4.313.6±3.713.6 \pm3.7FF, 0.27
Pre-test, total (%)50.3±11.850.3 \pm11.850.4±13.950.4 \pm13.947.0±11.047.0 \pm11.0FF, 0.42
- objective items (%)48.8±12.948.8 \pm12.948.6±16.048.6 \pm16.044.3±12.544.3 \pm12.5FF, 0.29
- open-response items (%)56.2±18.456.2 \pm18.457.4±13.857.4 \pm13.858.1±15.258.1 \pm15.2FF, 0.88

Table 1. Participant statistics by arm, with tests of equivalence. Values are presented as mean ±\pm s.d.

Procedure and measures. Participants completed four phases: (1) Pre-test: An AI-literacy inventory, the General Self-Efficacy Scale (GSES, Schwarzer and Jerusalem [41]), and a legal-knowledge assessment covering civil and criminal law. This assessment combined objective single- and multiple-choice items with open-response questions. (2) Learning: Participants studied matched civil- and criminal-law problems using only their assigned system. (3) Immediate post-test: A new, difficulty-matched legal assessment with the same composition, followed by the GSES and the NASA-TLX workload index (Hart and Staveland [42]). (4) Delayed post-test (≈4\approx4 weeks later): A randomly selected subsample (n=18n = 18 per condition) completed a new assessment of the same composition to probe retention. All legal assessments were scored on a 0–100 scale, with objective items weighted at 80% and open-response items at 20%. The open responses were scored by three law PhDs whose ratings showed high agreement (Cronbach’s α=0.95\alpha= 0.95 pre-test, 0.96 post-test) and were averaged. The outcome was the learning gain, defined as the post-test minus pre-test change in total score.

Statistical analysis. We report group means and standard deviations for all primary outcomes. Unadjusted differences in learning gain were examined using one-way ANOVA1, with the Kruskal–Wallis test as a nonparametric robustness check. Shapiro–Wilk tests did not reject normality of the gain distributions (all p>0.05p > 0.05), and Levene’s test indicated no evidence of unequal variances (p=0.95p = 0.95). The primary between-group inference used ANCOVA on immediate post-test scores, with pre-test score entered as a covariate. This approach adjusts for chance baseline variation and generally provides greater precision than analysis of raw change scores. The homogeneity-of-regression-slopes assumption was supported by the condition-by-pre-test interaction test (p=0.77p = 0.77). We report the omnibus ANCOVA effect together with η2\eta^2 and model-adjusted contrasts between AI Cosmos and the control conditions. For complementary unadjusted comparisons of raw learning gains, we report Welch’s tt tests and standardized effect sizes (Cohen’s dd or bias-corrected Hedges’ gg) with bootstrap 95% confidence intervals [43]. Subgroup and assessment-component analyses were exploratory and were not adjusted for multiplicity. All hypothesis tests were two-sided with α=0.05\alpha= 0.05.

Results

Learning efficacy. All three conditions showed large pre–post gains (paired tt, all p<10−8p < 10^{-8}; dz=1.22d_z = 1.22, 1.45, and 1.88 for the vanilla, LLM-as-teacher, and AI Cosmos). AI Cosmos yielded the largest raw gain (22.8 ± 12.1 pp), followed by LLM-as-teacher (18.5 ± 12.7) and vanilla LLM (15.7 ± 12.9; Figure 3b). The omnibus ANOVA on raw gains approached, but did not reach, statistical significance (F(2,108)=2.94F(2, 108) = 2.94, p=0.057p = 0.057, η2=0.052\eta^2 = 0.052). However, the primary planned contrast was clear: AI Cosmos outperformed the vanilla LLM by 7.0 pp (Welch t(71.8)=2.42t(71.8) = 2.42, p=0.018p = 0.018), a medium effect size (d=0.56d = 0.56, bootstrap 95% CI [0.10, 1.05]). An ANCOVA adjusting for the AI Cosmos group’s slightly lower baseline reproduced this advantage on adjusted post-test means (i.e., post-test scores predicted at the common pre-test mean, i.e., adjusted means 70.2 vs. 65.8; group effect F(2,107)=3.00F(2, 107) = 3.00, p=0.054p = 0.054, partial η2=0.053\eta^2 = 0.053; AI Cosmos vs. vanilla b=4.47b = 4.47, p=0.018p = 0.018), with the pre-test serving as a significant covariate (b=0.20b = 0.20, p=0.001p = 0.001). The advantage of AI Cosmos over the stronger LLM-as-teacher was positive but not statistically significant (Δ=4.2\Delta= 4.2 pp, p=0.146p = 0.146, d=0.34d = 0.34), while LLM-as-teacher itself did not significantly outperform vanilla LLM (Δ=2.8\Delta= 2.8 pp, p=0.121p = 0.121 adjusted). With the underlying model held constant, these results indicate a reliable advantage of AI Cosmos over conventional LLM interaction, whereas prompting the same model with a teacher persona alone did not yield a statistically detectable benefit.

Four-panel comparison of baseline equivalence, immediate learning gain, interaction signature, and learning trajectory for Vanilla LLM, LLM-as-Teacher, and AI Cosmos

Figure 3. Reorganizing the interaction as a structured scene improves bar-exam learning over a vanilla assistant. Three arms (n=37n = 37 each) shared a single base model, differing only in interaction architecture. (a) Pre-test scores. Dots are individuals, markers denote mean ±95%\pm95\% CI. The arms were equivalent at baseline (F(2,108)=0.88F(2, 108) = 0.88, p=0.42p = 0.42), with AI Cosmos being numerically the lowest. (b) Immediate learning gain (post − pre). Gains increased monotonically across arms of increasing interaction structure (15.7→18.5→22.815.7 \to18.5 \to22.8 pp; linear-trend contrast p=0.018p = 0.018). The bracket highlights the a priori primary contrast, AI Cosmos vs. vanilla (Δ=+7.0\Delta= +7.0 pp, Cohen’s d=0.56d = 0.56, bootstrap 95%95\% CI [0.10,1.05][0.10, 1.05]; p=0.018p = 0.018); an ANCOVA adjusting for the pre-test reproduced this finding (+4.5+4.5 pp, p=0.018p = 0.018, partial η2=0.053\eta^2 = 0.053). The LLM-as-Teacher arm did not differ significantly from vanilla (p=0.12p = 0.12), locating the performance effect in the architecture rather than the persona prompt. (c) Interaction dynamics. Each point is one participant, and ×\times are group centroids. AI Cosmos elicited ∼1.7×\sim1.7\times more dialogue turns (51.051.0 vs. 29.2/29.629.2/29.6; F(2,108)=21.8F(2, 108) = 21.8, p<10−7p < 10^{-7}, η2=0.29\eta^2 = 0.29, g≈1.2g \approx1.2) while requiring a statistically identical total input (∼7,100\sim7{,}100 characters, p=0.88p = 0.88). This yielded ∼40%\sim40\% fewer characters per turn (162162 vs. 276276; p≈0.001p \approx0.001, g=−0.80g = -0.80), which is a behavioral signature of active participation replacing one-shot delivery. (d) Cumulative gain over each arm’s own baseline at three time points within the delayed-test subsample (n=18n = 18 per arm; mean, ±\pm, 95%95\%, CI). AI Cosmos retained the largest net gain at one month (+18.9+18.9 pp). Note: this subsample analysis is exploratory, and the omnibus was not significant (p=0.62p = 0.62).

Interaction structure. The clearest behavioral difference emerged in the structure of interaction (Figure 3c). Total student input did not differ across conditions (median approximately 7,100 Chinese characters; F(2,108)=0.13F(2, 108) = 0.13, p=0.88p = 0.88), nor did session counts (p=0.71p = 0.71). However, AI Cosmos elicited approximately 1.7× as many dialogue turns as either control (51.0 ± 21.1 vs. 29.6 ± 13.2 and 29.2 ± 13.2; F(2,108)=21.8F(2, 108) = 21.8, p=1.1×10−8p = 1.1 \times10^{-8}, η2=0.288\eta^2 = 0.288; both pairwise p<10−5p < 10^{-5}; g=1.23g = 1.23 [0.79, 1.76]). Correspondingly, students produced approximately 40% fewer characters per turn (162 vs. 259/276; F(2,108)=7.66F(2, 108) = 7.66, p<0.001p < 0.001; AI Cosmos vs. Vanilla LLM p≈0.001p \approx0.001, g=−0.80g = -0.80). Thus, despite similar total input volume, AI Cosmos produced a substantially more iterative, turn-rich interaction pattern. Raw interaction volume itself was only weakly associated with learning gain (rounds: r=0.16r = 0.16, p=0.09p = 0.09; characters: r=0.07r = 0.07, n.s.), and the association between dialogue turns and gain was further attenuated after controlling for condition (r=0.06r = 0.06, n.s.). These results suggest that the observed advantage cannot be explained simply by greater interaction volume and is instead consistent with differences in how participation was structured.

Durability. At the four-week follow-up, the descriptive ordering observed immediately after learning was preserved. Relative to pre-test, the AI Cosmos subsample showed the largest retained gain (+18.9 pp), followed by LLM-as-Teacher (+16.8 pp) and Vanilla LLM (+14.7 pp; Figure 3d). The AI Cosmos–Vanilla LLM difference remained positive (Δ=4.2\Delta= 4.2 pp, d=0.34d = 0.34) but was smaller than the immediate effect. With only 18 participants per condition, however, the follow-up analysis was underpowered and yielded no significant between-group difference (F(2,51)=0.48F(2, 51) = 0.48, p=0.62p = 0.62). Forgetting from the immediate to delayed post-test also did not differ significantly across conditions (p=0.43p = 0.43). The follow-up therefore provides directionally consistent but inconclusive evidence regarding retention, and a larger delayed-test sample is needed to determine whether the immediate advantage persists over time.

Structured application versus open argumentation. Decomposing the learning gains by item type suggested that the overall advantage was concentrated in the objective, scenario-based items (Figure 4). Gains on these items were 18.2, 21.2, and 26.5 pp for Vanilla LLM, LLM-as-Teacher, and AI Cosmos (F(2,108)=2.89F(2, 108) = 2.89, p=0.060p = 0.060, η2=0.051\eta^2 = 0.051). AI Cosmos exceeded Vanilla LLM by 8.3 pp (95% CI [1.8, 14.9], d=0.56d = 0.56, $p = 0.018; ANCOVA-adjusted p=0.038p = 0.038). By contrast, gains on open-response items were smaller and did not differ across conditions (5.6–7.8 pp; F(2,108)=0.23F(2, 108) = 0.23, p=0.80p = 0.80; AI Cosmos vs. Vanilla LLM d=0.13d = 0.13, n.s.). A mixed-design ANOVA showed a strong main effect of item type (F(1,108)=55.6F(1, 108) = 55.6, p<0.001p < 0.001,

Learning gains by study arm and effect localization across objective and subjective test sections

Figure 4. The advantage concentrates in the applied scenario-based choice, rather than open-ended argumentation. Each test was split into objective (scenario-based choice) and subjective (open-response) sections, each renormalized to 0–100. (a) Learning gain by arm and section (bars indicate mean ± 95% CI; points indicate individuals). On the objective section gains were ordered 18.2 < 21.2 < 26.5 pp (F(2,108)=2.89F(2, 108) = 2.89, p=0.060p = 0.060, η2=0.051\eta^2 = 0.051; ANCOVA-adjusted AI Cosmos vs. vanilla p=0.038p = 0.038). The subjective section improved equivalently across arms (5.6–7.8 pp; F(2,108)=0.23F(2, 108) = 0.23, p=0.80p = 0.80). (b) AI Cosmos − baseline gain for each section against both controls (point estimate, 95% bootstrap CI; grey indicates vs. vanilla; blue indicates vs. LLM-as-Teacher). On the objective section the advantage over vanilla excludes zero (+8.3 pp [1.8, 14.9]) and over the teacher baseline is positive but unresolved (+5.3 pp [−1.5, 12.2]). On the subjective section, neither contrast significantly differs from zero (+2.1 [−4.9, 9.3]; −0.1 [−7.1, 7.1]). The group × section interaction in a mixed-design ANOVA was not significant (F(2,108)=0.95F(2, 108) = 0.95, p=0.39p = 0.39). Thus, the localization is descriptive. Inter-rater reliability for subjective scoring was high (Cronbach’s α=0.95\alpha= 0.95–0.96).

Human Study: An Instrumented Workbench for Skill Acquisition in Competitive Programming

ηp2=0.34\eta_p^2 = 0.34 but no condition-by-item-type interaction (F(2,108)=0.95F(2, 108) = 0.95, p=0.39p = 0.39). Accordingly, the apparent concentration of the AI Cosmos advantage in structured application items should be interpreted descriptively rather than as evidence of moderation by item type. The present study thus provides stronger evidence for gains in applying legal doctrine to structured fact patterns than for improvements in extended written argumentation.

Robustness across learners. Exploratory subgroup analyses examined whether the AI Cosmos advantage was restricted to particular learner profiles. Across median splits on prior knowledge and AI literacy, the AI Cosmos–Vanilla LLM effect remained directionally positive, although the small subgroup sizes (15–22 participants per condition) produced wide confidence intervals and no multiplicity correction was applied (Figure 5). These analyses are therefore treated as consistency checks rather than tests of moderation. A complementary split at the median pre-test score (46.7) showed the same descriptive ordering in both prior-knowledge strata. Among lower-scoring learners, gains were +28.4, +26.0, and +21.8 pp across the three conditions, whereas among higher-scoring learners they were +14.5, +9.6, and +10.6 pp (Figure 6). Lower-pre-test learners gained more overall (F(1,105)=46.8F(1, 105) = 46.8, p<10−4p < 10^{-4}), but the condition-by-prior-knowledge interaction was not significant (F(2,105)=0.55F(2, 105) = 0.55, p=0.58p = 0.58). Together with the pre-test-adjusted ANCOVA, these results argue against the overall AI Cosmos effect being attributable solely to its slightly lower baseline performance.

Forest plots comparing learning-gain differences for AI Cosmos against the Vanilla LLM and LLM-as-Teacher across learner subgroups

Figure 5. The advantage over the vanilla assistant is directionally consistent across learner subgroups. AI Cosmos − baseline difference in immediate learning gain (Cohen’s dd, 95% bootstrap CI) against a, the vanilla assistant and b, the LLM-as-Teacher, for the full sample (diamond; shaded band and dotted line mark the overall estimate) and four strata from median splits on prior knowledge (median = 46.7) and AI literacy. Against vanilla, the effect is positive in every stratum and most precisely estimated overall (dd = 0.56 [0.10, 1.05]). Against the teacher baseline, it remains positive throughout but lacks statistical resolution at this sample size (overall dd = 0.34 [−0.10, 0.82]). Subgroup cells contain 15–22 participants per arm and are uncorrected for multiplicity.

Learning gains in legal-knowledge scores for Vanilla LLM, LLM-as-Teacher, and AI Cosmos, split by lower and higher prior knowledge

Figure 6. AI Cosmos shows the largest learning gains across both aptitude strata. Participants were split at the median pre-test score (46.7) into (a) lower- and (b) higher-prior-knowledge strata. Translucent points are individual pre/post scores; filled markers are group means ±\pm 95% CI. The slope of each connecting line is the mean learning gain (annotated). Within each stratum, the arms were statistically equivalent at pre-test (p=0.92p = 0.92 and p=0.39p = 0.39), yet AI Cosmos gained most in both (+28.4 vs. +26.0/+21.8 pp, lower; +14.5 vs. +9.6/+10.6 pp, higher). As expected given their greater headroom, lower-prior-knowledge learners gained more across all arms (aptitude main effect F(1,105)=46.8F(1, 105) = 46.8, p<10−4p < 10^{-4}); the group ×\times aptitude interaction was not significant (F(2,105)=0.55F(2, 105) = 0.55, p=0.58p = 0.58). Because the arms were baseline-equivalent within each stratum, the consistent advantage of AI Cosmos indicates the overall effect is not a statistical artifact of its slightly lower aggregate starting point.

Self-efficacy and cognitive load. Self-efficacy gains were descriptively largest for AI Cosmos (+5.2 vs. +4.8 and +3.9 GSES points; d=0.35d = 0.35 vs. Vanilla LLM), but the between-group difference was not significant (F(2,80)=1.02F(2, 80) = 1.02, p=0.37p = 0.37). Perceived workload also did not differ significantly across conditions (NASA-TLX: 19.4, 18.2, 17.5; F(2,78)=2.31F(2, 78) = 2.31, p=0.11p = 0.11). Thus, we found no evidence that the larger learning gains and more iterative interaction observed with AI Cosmos were accompanied by greater perceived workload.

Human Study: An Instrumented Workbench for Skill Acquisition in Competitive Programming

Whereas the bar-examination study (§ 5.1) primarily examined scenario-based social interaction, this study focuses on the operational dimension: the executable workbench. Competitive programming provides a demanding test of procedural competence, because success requires learners not only to understand an algorithm but also to implement, execute, and debug it as a correct and efficient program. We thus examine whether integrating an executable coding workbench into the learning interaction improves the translation of conceptual understanding into implementation skill, and whether the effect varies with prior aptitude.

Study Design and Measures

Design and participants. We conducted a preregistered, three-arm randomized controlled study stratified by two aptitude-defined curriculum tracks. From the 140 students recruited, 100 completed the diagnostic pre-test, and 54 completed the full multi-session protocol and constituted the analysis sample (93% male; mean age 18.9 years; 89% first-year undergraduates). Participants were assigned to one of three learning conditions: (i) Vanilla LLM, a unconstrained conventional request–response assistant; (ii) LLM-as-Teacher baseline; and (iii) AI Cosmos, which used the same underlying model within a configured scenario equipped with an executable coding workbench for implementation, execution, and iterative debugging. Both LLM-as-Teacher and AI Cosmos conditions followed the same restriction against supplying complete solutions, providing a focused comparison of the additional operational affordances available in AI Cosmos. The Vanilla LLM condition did not impose this restriction. All three conditions used the same base model, which was independently verified to be capable of solving the experimental tasks. The diagnostic pre-test was designed to align training content with prior mastery. Participants who had not yet mastered search and dynamic programming entered the basic-algorithm track, whereas those who had mastered these topics but not the advanced material entered the data-structure track, which covered segment trees and leftist heaps. Participants already proficient in both sets of material did not proceed to the training phase. Within each track, participants were randomized across the three conditions (nn = 19 AI Cosmos, 18 LLM-as-Teacher, and 17 Vanilla LLM overall; cell sizes 7–11). Thus, the tracks determined what participants studied, whereas the experimental conditions determined how they studied it. We observed no statistically significant between-condition differences in measured baseline characteristics, including pre-test performance within and across tracks and track composition (all p≥0.20p \ge0.20; Table 2 in Appendix § 10.§ 3; Figure 7a).

Pre- and post-test scores for Vanilla LLM, LLM-as-Teacher, and AI Cosmos

Figure 7. Results of pre- and post-test. Three arms (n=17n = 17–1919) shared a single base model; both AI Cosmos and the teacher baseline withheld complete code, whereas the vanilla assistant was unconstrained. (a) Pre-test scores (dots represent individuals; markers denote mean ±95%\pm95\% CI). The arms were statistically equivalent at baseline (F(2,51)=0.12F(2, 51) = 0.12, p=0.89p = 0.89). (b) Post-test scores. AI Cosmos outperformed the teacher baseline by a near-significant margin (Δ=18.2\Delta= 18.2 points, g=0.56g = 0.56; Welch p=0.092p = 0.092) and performed comparably to the unconstrained vanilla assistant (g=0.21g = 0.21, n.s.). The LLM-as-Teacher baseline was the weakest arm overall. Given the sample size, the omnibus test was not significant (F(2,51)=1.65F(2, 51) = 1.65, p=0.20p = 0.20).

Vanilla LLMLLM-as-TeacherAI CosmosTest (pp)
Female (%)11.811.10.0χ2\chi^2, 0.31
Age (years)18.5±0.618.5 \pm0.618.7±0.718.7 \pm0.719.3±1.919.3 \pm1.9FF, 0.20
First-year (%)94.188.984.2χ2\chi^2, 0.64
Basic-algorithm track (%)47.138.947.4χ2\chi^2, 0.85
Data-structure track (%)52.961.152.6χ2\chi^2, 0.85
Pre-test (overall score)33.0±24.033.0 \pm24.031.8±26.531.8 \pm26.536.0±29.036.0 \pm29.0FF, 0.89
- basic-algorithm track (score)45.056.252.1FF, 0.72
- data-structure track (score)22.416.421.5FF, 0.67
Pre-test problems below criterion (%)91.286.186.8χ2\chi^2, 0.75

Table 2. Participant characteristics by arm, with tests of equivalence. Values are mean ±\pm s.d.. Pre-test scores are within-track comparable. The two tracks were assessed on different target algorithms. Pre-test problems below criterion reports the share of pre-test submissions an expert graded below G4 (not yet a substantially complete, correct implementation of the target algorithm).

Procedure and measures. Each participant completed two training sessions organized around a fixed three-stage practice cycle: (1) Learn: participants studied one problem interactively with their assigned system and submitted a solution to the online judge (OJ). (2) Self-check: they attempted a second problem targeting the same algorithmic concept, with assistance available only when needed. (3) Quiz: they independently solved a third problem that tested the same concept under a different problem framing. Advancement required a full-score OJ submission on all three problems. One week later, participants completed a contest-style post-test containing two previously unseen problems that required variants or combinations of the trained algorithms. The post-test thus assessed generalization of the trained implementation skills to novel problems. To minimize benchmark contamination and memorization, all problems used in the study were newly authored by two competitive-programming experts with NOI/ACM gold-medal credentials and had no online counterparts. The base model used in all three conditions was separately verified to be capable of solving each task, ensuring that task difficulty did not exceed the model’s underlying problem-solving capability. Because conventional OJ scores provide limited diagnostic information about partially correct implementations, the two problem authors also rescored all submitted source code while blind to experimental condition. They first established a common error codebook covering compilation failures, incomplete algorithmic structures, invariant-maintenance errors, boundary and memory faults, complexity or termination failures, and degeneration to brute-force solutions (Appendix § 10.§ 4). These error categories were mapped to standardized deductions on a five-level mastery scale (G1–G5), anchored in the completeness and correctness of the target algorithm’s implementation. The experts independently scored each submission, and their scores were then averaged. Expert scores were strongly correlated with OJ scores (Pearson r=0.92r = 0.92–0.960.96 across assessment phases) but captured partial algorithmic competence that binary test-case outcomes could miss. At post-test, expert rescoring increased the scores of 33 submissions, decreased none, and produced a mean adjustment of +10.8 points. We report three complementary post-test outcomes: (i) continuous expert-rescored performance (0–100); (ii) criterion mastery, defined as grade G4 or higher, corresponding to a substantially complete and correct implementation of the target algorithm; and (iii) score–mastery dissociation, capturing cases in which a submission earns partial credit without demonstrating criterion-level implementation of the target algorithm.

Statistical analysis. We report condition means and standard deviations and examine unadjusted between-condition differences using one-way ANOVA, with the Kruskal–Wallis test as a nonparametric robustness check. The primary between-group inference uses ANCOVA on post-test score, adjusting for pre-test performance and curriculum track. For complementary unadjusted pairwise comparisons, we report Welch’s tt tests and bias-corrected Hedges’ gg with bootstrap 95%95\% confidence intervals. Given the modest per-condition sample sizes (n=17n = 17–1919) and the bounded or zero-inflated distributions of several outcomes, we additionally report permutation-based pp-values and Mann–Whitney UU tests where appropriate. Criterion-mastery proportions are compared using Fisher’s exact test, whereas participant-level mastery counts are compared using the Mann–Whitney UU test. Score-based results are interpreted jointly with criterion mastery, which captures algorithm-specific implementation competence not fully reflected by OJ performance alone. Track-stratified and submission-level analyses are exploratory and are not adjusted for multiplicity. All statistical tests are two-sided with α=0.05\alpha= 0.05.

Results

Skill acquisition. Post-test scores showed a descriptive advantage for AI Cosmos (68.0 ±\pm 32.3), followed by the vanilla LLM (61.5 ±\pm 28.1) and LLM-as-Teacher (49.8 ±\pm 31.7; Figure 7b). The omnibus difference was not statistically significant at this sample size (F(2,51)=1.65F(2, 51) = 1.65, p=0.20p = 0.20, η2=0.061\eta^2 = 0.061; Kruskal–Wallis p=0.22p = 0.22), and the ANCOVA group effect after adjusting for pre-test score and training track showed a similar pattern (F(2,49)=1.89F(2, 49) = 1.89, p=0.16p = 0.16, partial η2=0.072\eta^2 = 0.072). Despite the limited statistical power, the pairwise estimates reveal a consistent architectural advantage. AI Cosmos outperformed the LLM-as-Teacher baseline by 18.2 points, yielding a medium effect size (Welch t(35.0)=1.73t(35.0) = 1.73, p=0.092p = 0.092; permutation p=0.091p = 0.091; Mann–Whitney p=0.096p = 0.096; Hedges’ g=0.56g = 0.56, 95% CI [−0.06, 1.30]). In contrast, the LLM-as-Teacher condition produced the lowest numerical performance, scoring 11.7 points below the vanilla assistant (g=−0.38g = -0.38). Within-condition analyses further show that relative to their respective pre-tests, participants using AI Cosmos and vanilla LLM both improved significantly on trained material (paired tt-tests: p=0.0004p = 0.0004 and p=0.0008p = 0.0008, respectively; dz=1.00d_z = 1.00), whereas the LLM-as-Teacher condition showed only a non-significant increase (p=0.12p = 0.12, dz=0.39d_z = 0.39). Together, these results suggest that integrating guidance with an executable environment provides a stronger pathway from conceptual explanation to procedural programming ability than dialogue-based guidance alone.

Equal scores, unequal mastery. The similar aggregate scores of AI Cosmos and vanilla LLM conceal a more fundamental difference in what learners actually achieved (Figure 8). Both conditions produced successful online-judge submissions at comparable rates (82% vs. 85%), explaining their similar raw scores. Yet, automated judging primarily measures whether a program passes test cases, not whether the learner has acquired the intended algorithmic skill. Among submissions receiving positive OJ credit, AI Cosmos achieved criterion mastery (grade ≥G4\ge G4) in 68% of cases, compared with 45% for vanilla LLM and 32% for LLM-as-Teacher (AI Cosmos vs. LLM-as-Teacher, Fisher’s exact p=0.009p = 0.009; vs. vanilla, p=0.12p = 0.12). Conversely, non-mastery passing solutions, i.e., submissions that obtained test credit without substantially implementing the target algorithm, were less frequent under AI Cosmos (26%) than under vanilla LLM (47%) or LLM-as-Teacher (53%; AI Cosmos vs. LLM-as-Teacher, p=0.031p = 0.031). The results reveal a central limitation of score-based evaluation in AI-assisted programming: passing tests and acquiring transferable procedural knowledge are not identical outcomes. While a conventional assistant may help learners produce partially successful solutions, AI Cosmos’s executable workbench encourages learners to construct, test, and repair their own implementations, resulting in a higher proportion of solutions that reflect genuine algorithmic understanding. Thus, the primary advantage of AI Cosmos is not merely higher task performance, but a closer alignment between measured performance and underlying competence.

Post-test submission outcomes by arm

Figure 8. Post-test submission outcomes by arm. (a) Rates of scored submissions (>0> 0; pale bars) versus criterion mastery (grade ≥G4\geq G4; solid bars). AI Cosmos and the vanilla assistant earned partial credit at nearly identical rates (82% vs. 85%) but diverged sharply on true mastery (55% vs. 38%), explaining their converging mean scores despite disparate learning outcomes. (b) Proportion of scored submissions achieving genuine mastery. Among credit-earning submissions, 68% under AI Cosmos reached mastery, compared to 45% for vanilla and 32% for the LLM-as-Teacher baseline (Fisher’s exact: AI Cosmos vs. LLM-as-Teacher p=0.009p = 0.009; vs. vanilla p=0.12p = 0.12). Equivalently, AI Cosmos roughly halved the rate of hollow submissions—code that secures points without actually implementing the target algorithm.

Criterion mastery. Because automated scores can obscure differences in solution quality, we next examined criterion mastery: whether learners produced substantially complete and correct implementations of the target algorithms (grade ≥G4\ge G4). This measure captures a stricter form of procedural competence than passing test cases alone (Figure 9a). AI Cosmos learners achieved criterion mastery on an average of 1.11 out of the two post-test problems, compared with 0.76 for vanilla LLM and 0.50 for LLM-as-Teacher. The difference between AI Cosmos and LLM-as-Teacher was significant (Mann–Whitney p=0.024p = 0.024). Moreover, 36.8% of AI Cosmos learners achieved mastery on both problems, compared with 17.6% for vanilla LLM and 11.1% for LLM-as-Teacher. The expert-derived error taxonomy further reveals how this advantage manifested in learners’ code (Figure 9b). AI Cosmos produced the highest proportion of flawless implementations (E0K: 52.6% vs. 38.2% for vanilla LLM and 25.0% for LLM-as-Teacher; Fisher’s exact test, AI Cosmos vs. LLM-as-Teacher, p=0.019p = 0.019), and the lowest proportion of incomplete algorithmic structures (E02: 5.3% vs. 8.8–11.1% in the control conditions). The ordinal mastery analysis showed a similar pattern: post-test submissions were concentrated at the two extremes of the scale, corresponding to either incomplete attempts or fully correct implementations. A proportional-odds model further indicated that AI Cosmos learners had higher odds of achieving a stronger mastery level than LLM-as-Teacher learners (odds ratio = 2.59, 95% CI [1.10, 6.07], p=0.029p = 0.029). Together, these results suggest that AI Cosmos primarily improves the quality of acquired programming skill rather than merely increasing the likelihood of obtaining a passing submission.

Criterion mastery and failure modes

Figure 9. Criterion mastery and failure modes. (a) Proportion of learners achieving criterion mastery (grade ≥\geq G4) on 0, 1, or 2 post-test problems. AI Cosmos learners mastered both problems (darkest band) at more than double the rate of controls (36.8% vs. 17.6% vanilla, 11.1% LLM-as-Teacher), significantly outperforming the LLM-as-Teacher baseline in per-student mastery count (Mann–Whitney p=0.024p = 0.024). (b) Post-test failure-mode rates. AI Cosmos achieved the highest flawless-implementation rate (EOK, 52.6%; Fisher vs. teacher p=0.019p = 0.019) and the lowest incomplete-template rate (E02). Brute-force degeneration (E06, i.e., exploiting test cases without using the intended algorithm) appeared only under the unconstrained vanilla arm (5.9%), never under either code-withholding condition.

Why the workbench matters: executable practice beyond guidance. The preceding analyses suggest that the advantage of AI Cosmos does not arise from providing more instructional content, but from changing how learners interact with that content via an executable environment (Figure 10). First, the benefit of the workbench was largest among learners who required greater external scaffolding. Decomposing the AI Cosmos advantage over LLM-as-Teacher by curriculum track revealed a substantial difference in the basic-algorithm track: AI Cosmos improved post-test scores by 31.4 points, corresponding to Hedges’ g=0.94g = 0.94 for scores and g=1.16g = 1.16 for criterion mastery (the latter reaching significance, Mann–Whitney p=0.039p = 0.039). The advantage was smaller in the more advanced data-structure track (+10.5 points; g=0.32g = 0.32 for scores and g=0.58g = 0.58 for mastery). Although the condition ×\times track interaction was not significant (p=0.34p = 0.34), this pattern is consistent with the interpretation that executable environments provide greater support when learners have not yet developed stable internal models of algorithm execution. For novice programmers, the ability to construct, execute, and debug within the same environment provides a concrete feedback loop that abstract explanations alone cannot provide. Second, the programming study complements the pattern observed in the bar-examination study. In the legal domain, where competence is expressed primarily through argumentation, additional dialogue structure produced progressively larger benefits. Yet, in programming, competence must ultimately be expressed through executable artifacts. Accordingly, instructional guidance without an integrated environment did not produce the same benefit as a workbench-linked scenario. Together, the two studies suggest that effective AI learning systems must align interaction structure with the form of the target competence. Structured dialogue supports domains where reasoning itself is the object of practice, whereas executable workbenches support domains where competence emerges through construction, testing, and revision. AI Cosmos operationalizes this alignment by coupling guidance with the artifacts through which learners practice.

Differential impact of the execution workbench across learner aptitudes

Figure 10. Differential impact of the execution workbench across learner aptitudes. (a) AI Cosmos advantage over the LLM-as-Teacher baseline (Hedges’ gg, 95% CI) on post-test scores and criterion mastery, by track. The advantage is significant for mastery among novices in the basic-algorithm track (Mann–Whitney p=0.039p = 0.039). Conversely, the effect is small and statistically unresolved for the stronger data-structure track, despite the latter covering harder algorithms (arm ×\times track interaction p=0.34p = 0.34). (b)&(c) Pre- to post-test trajectories by arm within each track (faint lines represent individuals; markers denote mean ±\pm 95% CI; annotated values indicate mean change). In the basic-algorithm track, the LLM-as-Teacher baseline actually regressed from its pre-test level (−22 points) while AI Cosmos achieved the highest gains. In the data-structure track, all arms improved, and performance gaps narrowed.

Validity: whether performance reflects learner capability. Finally, we conducted an exploratory construct-validity analysis examining whether observed programming performance remained associated with learners’ prior ability (Figure 11). Within the AI Cosmos condition, pre-test standing was positively correlated with subsequent criterion mastery (Pearson r=0.59r = 0.59, p=0.008p = 0.008; Spearman ρ=0.57\rho= 0.57), and this relationship remained stable under leave-one-out resampling (r∈[0.53,0.65]r \in[0.53, 0.65]). In contrast, the corresponding correlations were near zero in both control conditions (vanilla LLM: r=0.08r = 0.08, p=0.76p = 0.76; LLM-as-Teacher: r=−0.06r = -0.06, p=0.80p = 0.80). The difference between AI Cosmos and LLM-as-Teacher was significant (Fisher’s zz, p=0.040p = 0.040), with a similar but non-significant trend against vanilla LLM (p=0.11p = 0.11). This pattern suggests that different interaction architectures may produce different relationships between measured performance and learner capability. When learners can rely heavily on generated code, final submissions may partially reflect system assistance rather than the learner’s own implementation ability. By requiring learners to participate in construction, execution, and debugging, AI Cosmos makes observed performance more closely coupled with the learner’s demonstrated competence. Thus, the findings highlight an important consideration for AI-assisted learning evaluation: improving performance is insufficient if the resulting measure no longer reflects what learners can independently do.

Within-arm correlation plots for Vanilla LLM, LLM-as-Teacher, and AI Cosmos

Figure 11. Within-arm correlation between prior aptitude (within-track pre-test zz-score) and criterion mastery. Lines indicate OLS fits, and points represent vertically jittered individuals. (a) Vanilla and (b) LLM-as-Teacher baselines exhibit no predictive relationship (r=0.08r = 0.08 and r=−0.06r = -0.06, respectively; both n.s.). When an assistant can freely supply code, recorded outcomes decouple from actual learner ability. (c) AI Cosmos shows a strong, stable correlation (r=0.59r = 0.59, p=0.008p = 0.008; robust to leave-one-out resampling, r∈[0.53,0.65]r \in[0.53, 0.65]) that significantly differs from the LLM-as-Teacher baseline (Fisher’s zz, p=0.040p = 0.040). Requiring learners to construct and repair algorithms restores construct validity, making the score a faithful measure of the person.

Related Work

AI-Assisted Learning and Pedagogically Structured Interaction Evidence from mathematics and programming education shows that improved performance with LLM assistance does not necessarily result in better performance on subsequent unassisted assessments [44, 45]. Research on LLM tutoring has investigated ways to guide students during problem solving rather than directly supply answers. Earlier work uses annotated tutoring dialogues [46] and explicit pedagogical policies to study and organize multi-turn guidance [48] (Pal Chowdhury et al. 2024). More recent methods train pedagogical policies [49], adapt feedback using learner-state estimates and task verification [50], and maintain instructional plans across interactions [51, 52]. Tutoring benchmarks further assess instructional behavior beyond answer correctness [53, 54]. These studies demonstrate progress in adaptive instructional support. However, evaluations of tutoring quality or success on guided tasks do not by themselves establish what learners can do independently. An important question is how students’ own actions during assisted problem solving affect their later performance on unfamiliar tasks without assistance.

Human–Agent Participation in Interactive Task Environments Agent coordination can support human participation rather than only automate task completion. Co-STORM allows users to guide discussions among agents and reports higher-quality exploratory outputs than its comparison systems [55]. In a course-based multi-agent learning environment, students exhibited distinct patterns of knowledge co-construction and co-regulation, associated with prior knowledge and learning gains [56]. Participation in executable tasks also requires actions that change task state and produce feedback. CodeAct and SWE-agent improve agent performance through execution feedback and task-specific interfaces [57, 58], while TutorGym evaluates tutoring agents on intermediate actions in interactive learning systems and identifies substantial errors in their judgments of incorrect steps [59]. Magentic-UI and Collaborative Gym further allow users to participate during agent execution [60]; the latter reports better collaborative task outcomes than autonomous execution [61]. These results establish capabilities for conversational participation and shared task execution. For learning applications, however, task success alone does not establish which reasoning and operations learners performed themselves.

Knowledge Building and Reusable Practice Records Learning activities can produce resources that remain useful after a task is completed. In knowledge-building environments, students improve shared ideas through successive contributions, while Learning by Design incorporates earlier design attempts into later inquiry [62, 63]. More recent tools make learners’ activity records accessible: Watanabe et al. [64] combines programming and browsing histories and identifies distinct problem-solving patterns that are not evident from final submissions alone. Related research on LLM agents shows that experience can also be reused for subsequent execution. Agent Workflow Memory extracts reusable routines and improves web-task success [65], G-Memory retrieves collaboration histories together with generalized insights [66], and Skill-Pro validates procedural skills for reuse across tasks and agents [67]. These results establish two uses of prior activity: improving an agent’s later actions and helping people examine and revise earlier work [34, 68]. The distinction matters for educational systems, where a reusable solution does not necessarily preserve the decisions, feedback, and revisions through which learners developed it.

Conclusions

In this paper, we introduce AI Cosmos, an agentic infrastructure for situated learning that organizes AI-assisted learning around two complementary principles: scenario-based participation and cumulative assets of practice. Through the Scenario–Asset Framework, AI Cosmos enables learners and role-specialized agents to participate in structured learning activities, while preserving the processes and outcomes of practice as reusable assets across scenarios. Two preregistered controlled studies in learning legal reasoning and competitive programming demonstrate the potential of structured participation to improve learners’ independent competence.

Contribution

Contributors’ names are listed in alphabetical order by first name.

Core Contributors

Fangming Chang, Mingyu Su, Yifan Zhu, Yuan Wang

Contributors

Bo Zhang, Bosi Wen, Chenhao Yuan, Chenwen Liao, Dazhi Jiang, Deyao Hong, Erle Zhu, Genrui Zhang, Guchan Li, Hongwen Gan, Huichao Bi, Jiahao Yan, Jincheng Fan, Kehan Zheng, Qinren Luo, Qiran Liu, Ruoqi Cao, Shizhi Zhang, Sihan Chen, Siyan Deng, Xuehan Zhou, Xujun Li, Yang Dang, Yanzhuo Zhu, Yu Zhang, Zheyu Chen

Tech Leads

Jinfeng Zhou, Yuxuan Chen

Advisors

Hongning Wang, Manli Li

Experiments

Human Study: Situated Learning for Bar-Examination Preparation

Participant Statistics

Detailed distribution statistics of the participants are presented in Table 1.

Human Study: An Instrumented Workbench for Skill Acquisition in Competitive Programming

Participant Statistics

Detailed distribution statistics of the participants are presented in Table 2.

Expert Re-grading Rubric: Mastery Scale and Error Codebook

To convert the coarse, test-case-based online-judge (OJ) score into a measure of genuine algorithmic competence (§ 6), two NOI/ACM gold-medalist experts re-graded every submission, blind to arm, using the two-part rubric reproduced here: a five-level mastery scale (G1–G5; Table 3) that summarizes how completely and correctly a submission realizes the problem’s target algorithm, and an error codebook (Table 4) that records the specific failure mode underlying that grade. Each submission is tagged in the form [code:name] together with a grade. Throughout, the “target algorithm” is the intended solution for the problem at hand (e.g., flood-fill or dynamic programming on the basic-algorithm track; a segment tree or leftist heap on the data-structure track). Two grading conventions are central and explain why the expert grade can diverge from the raw OJ score. First, a submission that merely passes test cases by means of a brute-force or otherwise non-target method is not credited as mastering the target algorithm: it is normally graded G1, regardless of the points it earns. Second, every submission that “looks like the target algorithm but falls short of full marks” was re-run locally and assigned a specific failure code before being graded, so that the grade reflects a diagnosed failure mode rather than the OJ verdict alone. The criterion-mastery threshold used in the main text is grade ≥\ge G4 (i.e., G4 or G5); the “flawless-implementation” rate (EOK) reported there is exactly the G5 rate.

GradeAnchorDescription
G1Target algorithm not formedImplementation direction is inconsistent with the target algorithm, or no valid algorithmic intent can be identified. A brute-force or non-target solution is graded here even when it earns partial credit.
G2Intent present, key errorsThe target algorithm is attempted, but with defects in complexity, boundary handling, memory safety, or a critical invariant.
G3Main flow present, details unstableThe target algorithm’s main framework exists but still contains key implementation errors.
G4Framework essentially completeOnly minor, non-fundamental defects remain. (Criterion-mastery threshold.)
G5Correct and completeThe target algorithm is implemented correctly and passes; corresponds to error code EOK.

Table 3. The five-level mastery scale used by the expert re-graders. Each grade is anchored to how completely and correctly a submission realizes the problem’s target algorithm. The criterion-mastery threshold used in the main text is grade ≥\ge G4.

CodeNameDefinitionSeverity
E00Not submitted / incompleteNo valid submission, or no assessable result was produced.medium
E01Compilation / syntax errorCode does not compile, or the submitted file is not executable source.high
E02Incomplete skeletonThe basic structure of the target algorithm was never formed.high
E03Critical maintenance errorA core invariant or key maintenance step is wrong, yielding incorrect results.high
E04State / boundary errorThe main flow is present, but a conditional branch or boundary case is mishandled.medium
E05Complexity / termination errorComplexity is inadequate or the termination strategy is unstable, failing some test cases.high
E06Brute-force degenerationA non-target, brute-force implementation degrades the complexity (time-limit exceeded).high
E07Boundary / memory-safety errorOut-of-bounds or illegal access, stack-overflow risk, or another runtime fault.high
E99-S0Source missingNo analyzable source code is available for the problem.medium
E99-S1Intent unclearA file exists, but no valid algorithmic intent can be determined.medium
EOKNo errorThe target algorithm is implemented correctly and passes (grade G5).none
N01Non-standard but passingA non-standard yet theoretically valid solution that passes all local tests (flagged separately).note
N02Non-target implementationThe approach is inconsistent with the target algorithm; not counted as target-algorithm mastery.note

Table 4. Error codebook. Every submission is tagged [code:name]; the code records the specific failure mode underlying the grade. “Severity” reflects how far the failure is from a correct target-algorithm implementation. Codes E01–E07 and E00 are mutually informative failure modes; N01/N02 are annotations rather than errors; sub-variant suffixes (e.g., -S0/-S1) distinguish source-availability and intent sub-cases and are merged into their base code for the aggregate analysis.

The two parts are coupled: the error code localizes what went wrong, and the mastery grade places that failure on a single ordinal scale of target-algorithm competence. Thus an E06 (brute-force) or N02 (non-target) submission is graded G1 however many test cases it passes, an E02 (incomplete skeleton) typically maps to G2–G3, a submission with only minor defects maps to G4, and an EOK submission is G5. The main-text failure-mode analysis (Figure ??b) reports the rates of the three most diagnostic outcomes on the post-test problems—EOK (correct), E06 (brute-force degeneration), and E02 (incomplete skeleton)—computed over all submissions in each arm.

References

  1. [1]Alfred North Whitehead. The aims of education and other essays. 1929.
  2. [2]Lena Ivannova Ruiz-Rojas, Patricia Acosta-Vargas, Javier De-Moreta-Llovet, and Mario Gonzalez-Rodriguez. Empowering education with generative artificial intelligence tools: Approach with an instructional design matrix. Sustainability, 15(15):11524, 2023.
  3. [3]David Baidoo-Anu and Leticia Owusu Ansah. Education in the era of generative artificial intelligence (ai): Understanding the potential benefits of chatgpt in promoting teaching and learning. Journal of AI, 7(1):52–62, 2023.
  4. [4]Keng-Boon Ooi, Garry Wei-Han Tan, Mostafa Al-Emran, Mohammed A Al-Sharafi, Alexandru Capatina, Amrita Chakraborty, Yogesh K Dwivedi, Tzu-Ling Huang, Arpan Kumar Kar, Voon-Hsien Lee, et al. The potential of generative artificial intelligence across disciplines: Perspectives and future directions. Journal of Computer Information Systems, 65(1):76–107, 2025.
  5. [5]Jinfeng Zhou, Zhuang Chen, Dazhen Wan, Bosi Wen, Yi Song, Jifan Yu, Yongkang Huang, Pei Ke, Guanq​​un Bi, Libiao Peng, JiaMing Yang, Xiyao Xiao, Sahand Sabour, Xiaohan Zhang, Wenjing Hou, Yijia Zhang, Yuxiao Dong, Hongning Wang, Jie Tang, and Minlie Huang. CharacterGLM: Customizing social characters with large language models. In Franck Dernoncourt, Daniel Preotiuc-Pietro, and Anastasia Shimorina, editors, Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track, pages 1457–1476, Miami, Florida, US, November 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.emnlp-industry.107. URL https://aclanthology.org/2024.emnlp-industry.107/.DOI
  6. [6]Kunal Handa, Drew Bent, Alex Tamkin, Miles McCain, Esin Durmus, Michael Stern, Mike Schiraldi, Saffron Huang, Stuart Ritchie, Steven Syverud, Kamya Jagadish, Margaret Vo, Matt Bell, and Deep Ganguli. Anthropic education report: How university students use claude, 2025. URL https://www.anthropic.com/news/anthropic-education-report-how-university-students-use-claude.
  7. [7]Yizhou Fan, Luzhen Tang, Huixiao Le, Kejie Shen, Shufang Tan, Yueying Zhao, Yuan Shen, Xinyu Li, and Dragan Gašević. Beware of metacognitive laziness: Effects of generative artificial intelligence on learning motivation, processes, and performance. British Journal of Educational Technology, 56(2):489–530, December 2024a. ISSN 1467-8535. doi: 10.1111/bjet.13544. URL http://dx.doi.org/10.1111/bjet.13544.
  8. [8]Hamsa Bastani, Osbert Bastani, Alp Sungu, Haosen Ge, Özge Kabakcı, and Rei Mariman. Generative ai without guardrails can harm learning: Evidence from high school mathematics. Proceedings of the National Academy of Sciences, 122(26): e2422633122, 2025a. doi: 10.1073/pnas.2422633122. URL https://www.pnas.org/doi/abs/10.1073/pnas.2422633122.DOI
  9. [9]Lixiang Yan, Samuel Greiff, Jason M Lodge, and Dragan Gašević. Distinguishing performance gains from learning when using generative ai. Nature Reviews Psychology, 4(7):435–436, 2025.DOI
  10. [10]Matthias Lehmann, Philipp B. Cornelius, and Fabian J. Sting. Ai meets the classroom: When do large language models harm learning?, 2025. URL https://arxiv.org/abs/2409.09047.
  11. [11]Tonya Kowalski. True north: Navigating for the transfer of learning in legal education. Seattle University Law Review, 34(1):51, 2010.
  12. [12]Jordan Usdan, Allison Connell Pensky, and Harley Chang. Generative ai’s impact on graduate student writing productivity and quality. Available at SSRN 4941022, 2024.
  13. [13]Hao-Ping Lee, Advait Sarkar, Lev Tankelevitch, Ian Drosos, Sean Rintel, Richard Banks, and Nicholas Wilson. The impact of generative ai on critical thinking: Self-reported reductions in cognitive effort and confidence effects from a survey of knowledge workers. In Proceedings of the 2025 CHI conference on human factors in computing systems, pages 1–22, 2025.DOI
  14. [14]Zijian Ding and Joel Chan. Mapping the design space of interactions in human-ai text co-creation tasks, 2023. URL https://arxiv.org/abs/2303.06430.
  15. [15]Jingyu Shi, Rahul Jain, Hyungjun Doh, Ryo Suzuki, and Karthik Ramani. An hci-centric survey and taxonomy of human-generative-ai interactions, 2024. URL https://arxiv.org/abs/2310.07127.
  16. [16]Jifan Yu, Zheyuan Zhang, Daniel Zhang-li, Shangqing Tu, Zhanxin Hao, Rui Miao Li, Haoxuan Li, Yuanchun Wang, Hanming Li, Linlu Gong, Jie Cao, Jiayin Lin, Jinchang Zhou, Fei Qin, Haohua Wang, Jianxiao Jiang, Lijun Deng, Yisi Zhan, Chaojun Xiao, Xus​​heng Dai, Xuan Yan, Nianyi Lin, Nan Zhang, Ruixin Ni, Yang Dang, Lei Hou, Yu Zhang, Xu Han, Manli Li, Juanzi Li, Zhiyuan Liu, Huiqin Liu, and Maosong Sun. From mooc to maic: Reshaping online teaching and learning through llm-driven agents, 2024. URL https://arxiv.org/abs/2409.03512.
  17. [17]Haoxiang Fan, Guanzheng Chen, Xingbo Wang, and Zhenhui Peng. Lessonplanner: Assisting novice teachers to prepare pedagogy-driven lesson plans with large language models. In Proceedings of the 37th Annual ACM Symposium on User Interface Software and Technology, page 1–20. ACM, October 2024b. doi: 10.1145/3654777.3676390. URL http://dx.doi.org/10.1145/3654777.3676390.
  18. [18]Hao Zheng, Xinyan Guan, Hao Kong, Jia Zheng, Weixiang Zhou, Hongyu Lin, Yaojie Lu, Ben He, Xianpei Han, and Le Sun. Pptagent: Generating and evaluating presentations beyond text-to-slides, 2025. URL https://arxiv.org/abs/2501.03936.
  19. [19]Po-Yao Chao, Yu-Chen Cheng, Kuan-Chieh Chen, Ying-Siou Chen, Shu-Hao Wu, Cai-Ting Wen, Chin-Ling Weng, Pei-Jung Tsai, Chia-Hui Chang, Hui-Chun Hung, and Chen-Chung Liu. Operationalizing cognitive apprenticeship through generative ai pedagogical agents: Proactive and contextualized guidance in simulation-based learning. Computers & Education, 253:105706, 2026. ISSN 0360-1315. doi: https://doi.org/10.1016/j.compedu.2026.105706. URL https://www.sciencedirect.com/science/article/pii/S0360131526001454.
  20. [20]Miche­lene TH Chi and Ruth Wylie. The icap framework: Linking cognitive engagement to active learning outcomes. Educational psychologist, 49(4):219–243, 2014.
  21. [21]Jean Lave and Etienne Wenger. Situated learning: Legitimate peripheral participation. Cambridge university press, 1991.
  22. [22]Allan Collins and Manu Kapur. Cognitive apprenticeship, volume 291. na na, 2006.
  23. [23]Cindy E Hmelo-Silver, Ravit Golan Duncan, and Clark A Chinn. Scaffolding and achievement in problem-based and inquiry learning: a response to kirschner, sweller, and. Educational psychologist, 42(2):99–107, 2007.
  24. [24]Diana Laurillard. Rethinking university teaching: A conversational framework for the effective use of learning technologies. Routledge, 2013.
  25. [25]Russell Beale. Dialogic pedagogy for large language models: Aligning conversational ai with proven theories of learning, 2025. URL https://arxiv.org/abs/2506.19484.
  26. [27]Liang Zhang, Jionghao Lin, Ziyi Kuang, Sheng Xu, and Xiangen Hu. Spl: A socratic playground for learning powered by large language model, 2024. URL https://arxiv.org/abs/2406.13919.
  27. [28]Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu, Beibin Li, Erkang Zhu, Li Jiang, Xiaoyun Zhang, Shaokun Zhang, Jiale Liu, Ahmed Hassan Awadallah, Ryen W White, Doug Burger, and Chi Wang. Autogen: Enabling next-gen llm applications via multi-agent conversation, 2023. URL https://arxiv.org/abs/2308.08155.
  28. [29]Sirui Hong, Mingchen Zhuge, Jiaqi Chen, Xiawu Zheng, Yuheng Cheng, Ceyao Zhang, Jinlin Wang, Zili Wang, Steven Ka Shing Yau, Zijuan Lin, Liyang Zhou, Chenyu Ran, Linfeng Xiao, Chenglin Wu, and Jürgen Schmidhuber. Metagpt: Meta programming for a multi-agent collaborative framework, 2024. URL https://arxiv.org/abs/2308.00352.
  29. [30]Chen Qian, Wei Liu, Hongzhang Liu, Nuo Chen, Yufan Dang, Jiahao Li, Cheng Yang, Weize Chen, Yusheng Su, Xin Cong, Juyuan Xu, Dahai Li, Zhiyuan Liu, and Maosong Sun. Chatdev: Communicative agents for software development, 2024. URL https://arxiv.org/abs/2307.07924.
  30. [31]Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. React: Synergizing reasoning and acting in language models, 2023. URL https://arxiv.org/abs/2210.03629.
  31. [32]John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. Swe-agent: Agent-computer interfaces enable automated software engineering, 2024a. URL https://arxiv.org/abs/2405.15793.
  32. [33]Seymour Papert and Idit Harel. Situating constructionism. constructionism, 36(2):1–11, 1991.
  33. [34]Genrui Zhang, Erle Zhu, Jinfeng Zhou, Caiyan Jia, and Hongning Wang. Skillevolver: Skill learning as a meta-skill, 2026a. URL https://arxiv.org/abs/2605.10500.
  34. [35]Victor Kaptelinin and Bonnie A. Nardi. Activity theory: Basic concepts and applications. In CHI’97 extended abstracts on human factors in computing systems, pages 158–159. 1997.
  35. [36]David A Kolb. Experiential learning: Experience as the source of learning and development. FT press, 2014.
  36. [37]Donald A Schön. The reflective practitioner: How professionals think in action. Routledge, 2017.
  37. [39]Christopher D Manning. Introduction to information retrieval. Syngress Publishing,, 2008.
  38. [40]Bo Zhang, Jinfeng Zhou, Yuxuan Chen, Jianing Yin, Minlie Huang, and Hongning Wang. Grounding llms in scientific discovery via embodied actions. arXiv preprint arXiv:2602.20639, 2026b.arxiv.org/abs/2602.20639
  39. [41]Ralf Schwarzer and Matthias Jerusalem. Generalized self-efficacy scale. J. Weinman, S. Wright, & M. Johnston, Measures in health psychology: A user’s portfolio. Causal and control beliefs, 35(37):82–003, 1995.
  40. [42]Sandra G Hart and Lowell E Staveland. Development of nasa-tlx (task load index): Results of empirical and theoretical research. In Advances in psychology, volume 52, pages 139–183. Elsevier, 1988.DOI
  41. [43]Jacob Cohen. Statistical power analysis for the behavioral sciences. routledge, 2013.
  42. [44]Hamsa Bastani, Osbert Bastani, Alp Sungu, Haosen Ge, Özge Kabakcı, and Rei Mariman. Generative ai without guardrails can harm learning: Evidence from high school mathematics. Proceedings of the National Academy of Sciences, 122(26):e2422633122, 2025b.DOI
  43. [45]Patrick Bassner, Ben Lenk-Ostendorf, Ramona Beimstengel, Tobias Wasner, and Stephan Krusche. Less stress, better scores, same learning: The dissociation of performance and learning in ai-supported programming education. Computers and Education: Artificial Intelligence, page 100537, 2025.DOI
  44. [46]Jakub Macina, Nico Daheim, Sankalan Chowdhury, Tanmay Sinha, Manu Kapur, Iryna Gurevych, and Mrinmaya Sachan. Mathdial: A dialogue tutoring dataset with rich pedagogical properties grounded in math reasoning problems. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5602–5621, 2023.
  45. [48]Romain Puech, Jakub Macina, Julia Chatain, Mrinmaya Sachan, and Manu Kapur. Towards the pedagogical steering of large language models for tutoring: A case study with modeling productive failure. In Findings of the Association for Computational Linguistics: ACL 2025, pages 26291–26311, 2025.
  46. [49]David Dinucu-Jianu, Jakub Macina, Nico Daheim, Ido Hakimi, Iryna Gurevych, and Mrinmaya Sachan. From problem-solving to teaching problem-solving: Aligning llms with pedagogy using reinforcement learning. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 272–292, 2025.
  47. [50]Jian Wang, Yinpei Dai, Yichi Zhang, Ziqiao Ma, Wenjie Li, and Joyce Chai. Training turn-by-turn verifiers for dialogue tutoring agents: The curious case of llms as your coding tutors. In Findings of the Association for Computational Linguistics: ACL 2025, pages 12416–12436, 2025.arxiv.org/abs/2502.13311
  48. [51]Zechen Li, Qianman Zhu, Mei Wang, Jia Li, and Hua Huang. Planning-guided tutoring with assessment-driven memory for pedagogical llm tutors. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7165–7188, 2026a.
  49. [52]Jones David and Shreya Ghosh. Intellicode: A multi-agent llm tutoring system with centralized learner modeling. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 3: System Demonstrations), pages 129–138, 2026.
  50. [53]Kaushal Kumar Maurya, Kv Aditya Srivatsa, Kseniia Petukhova, and Ekaterina Kochmar. Unifying ai tutor evaluation: An evaluation taxonomy for pedagogical ability assessment of llm-powered ai tutors. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 1234–1251, 2025.
  51. [54]Jakub Macina, Nico Daheim, Ido Hakimi, Manu Kapur, Iryna Gurevych, and Mrinmaya Sachan. Mathtutorbench: A benchmark for measuring open-ended pedagogical capabilities of llm tutors. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 204–221, 2025.
  52. [55]Yucheng Jiang, Yijia Shao, Dekun Ma, Sina Semnani, and Monica Lam. Into the unknown unknowns: Engaged human learning through participation in language model agent conversations. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 9917–9955, 2024.arxiv.org/abs/2408.15232
  53. [56]Zhanxin Hao, Jie Cao, Ruimiao Li, Jifan Yu, Zhiyuan Liu, and Yu Zhang. Mapping student-ai interaction dynamics in multi-agent learning environments: Supporting personalised learning and reducing performance gaps. Computers & Education, page 105472, 2025.
  54. [57]Xingyao Wang, Yangyi Chen, Lifan Yuan, Yizhe Zhang, Yunzhu Li, Hao Peng, and Heng Ji. Executable code actions elicit better llm agents. arXiv preprint arXiv:2402.01030, 2024a.arxiv.org/abs/2402.01030
  55. [58]John Yang, Carlos Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. Swe-agent: Agent-computer interfaces enable automated software engineering. Advances in Neural Information Processing Systems, 37:50528–50652, 2024b.arxiv.org/abs/2405.15793
  56. [59]Daniel Weitekamp, Momin N. Siddiqui, and Christopher J. MacLellan. Tutorgym: A testbed for evaluating ai agents as tutors and students. In International Conference on Artificial Intelligence in Education, pages 361–376. Springer, 2025.arxiv.org/abs/2505.01563
  57. [60]Hussein Mozannar, Gagan Bansal, Cheng Tan, Adam Fourney, Victor Dibia, Jingya Chen, Jack Gerrits, Tyler Payne, Matheus Kunzler Maldaner, Madeleine Grunde-McLaughlin, et al. Magentic-ui: Towards human-in-the-loop agentic systems. arXiv preprint arXiv:2507.22358, 2025.arxiv.org/abs/2507.22358
  58. [61]Yijia Shao, Vinay Samuel, Yucheng Jiang, John Yang, and Diyi Yang. Collaborative gym: A framework for enabling and evaluating human-agent collaboration. In International Conference on Learning Representations, volume 2026, pages 99616–99649, 2026.
  59. [62]Marlene Scardamalia and Carl Bereiter. A brief history of knowledge building. Canadian Journal of Learning and Technology/La revue canadienne de l’apprentissage et de la technologie, 36(1), 2010.DOI
  60. [63]Janet L Kolodner, Paul J Camp, David Crismond, Barbara Fasse, Jackie Gray, Jennifer Holbrook, Sadhana Puntambekar, and Mike Ryan. Problem-based learning meets case-based reasoning in the middle-school science classroom: Putting learning by design (tm) into practice. The journal of the learning sciences, 12(4):495–547, 2003.DOI
  61. [64]Ko Watanabe, Yuki Matsuda, Yugo Nakamura, Yutaka Arakawa, and Shoya Ishimaru. Trackthinkdashboard: Understanding student self-regulated learning in programming study. International Journal of Activity and Behavior Computing, 2025(1):1–17, 2025.arxiv.org/abs/2503.19460
  62. [65]Zora Zhiruo Wang, Jiayuan Mao, Daniel Fried, and Graham Neubig. Agent workflow memory. arXiv preprint arXiv:2409.07429, 2024b.arxiv.org/abs/2409.07429
  63. [66]Guibin Zhang, Muxin Fu, Kun Wang, Frank Wan, Miao Yu, and Shuicheng Yan. G-memory: Tracing hierarchical memory for multi-agent systems. Advances in Neural Information Processing Systems, 38:12988–13018, 2026c.arxiv.org/abs/2506.07398
  64. [67]Qirui Mi, Zhijian Ma, Mengyue Yang, Haoxuan Li, Yisen Wang, Haifeng Zhang, and Jun Wang. Skill-pro: Learning reusable skills from experience via non-parametric ppo for llm agents. arXiv preprint arXiv:2602.01869, 2026.arxiv.org/abs/2602.01869
  65. [68]Xujun Li, Kehan Zheng, Mingyuan Zhao, Yize Geng, Jinfeng Zhou, Qi Zhu, Fei Mi, Lifeng Shang, Minlie Huang, and Hongning Wang. You live more than once: Towards hierarchical skill meta-evolving, 2026b. URL https://arxiv.org/abs/2605.28390.

Paper details

vlnc:W_2a6nnmah
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

Not recorded for this paper · View statement →

Looking for related papers…
Contents