arXiv:2610.40006cs.AIOct 2026

Manuscript Offprint

arXiv:2610.40006

Human--AI Interactions as First-Class Data: A Formal Interaction Model and Runtime for Explainable AI Collaboration

Michela Taufer, Kin Ng, Ian Lumsden, Aashish Pandey, Rajasi Gore, Angelina Ju, Sukanya Moudgalya, Ewa Deelman, Sai Swaminathan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Michela Taufer

University of Tennessee

Knoxville, USA

mtaufer@utk.edu

Kin Wai NG

University of Tennessee

Knoxville, USA

kng2@utk.edu

Ian Lumsden

University of Tennessee

Knoxville, USA

ilumsden@vols.utk.edu

Aashish Pandey

University of Tennessee

Knoxville, USA

apande20@utk.edu

Rajasi Gore

University of Tennessee

Knoxville, USA

rgore4@utk.edu

Angelina Ju

University of Tennessee

Knoxville, USA

aju@vols.utk.edu

Sukanya Moudgalya

University of Tennessee

Knoxville, USA

smoudgal@utk.edu

Ewa Deelman

University of Southern California

Marina del Rey, CA, USA

deelman@isi.edu

Sai Swaminathan

University of Tennessee

Knoxville, USA

sai@utk.edu

Abstract—AI assistants are increasingly embedded in computational notebooks, scientific workflows, software engineering tools, and learning systems, yet human–AI interactions are often treated as transient prompt–response exchanges rather than durable data products, hindering reproducibility, explainability, replay, behavioral analysis, and adaptive AI support. We argue that these interactions form a new data class requiring formal representation and introduce the Human–AI Interaction Description Language (HAIDL), a formal interaction model with a Backus–Naur Form-inspired concrete syntax. HAIDL encodes each interaction as a structured object capturing computational context, user request, prompt payload, AI response, feedback, problem context, provenance, and model metadata. We integrate this vision into HAIDL-X, a middleware for JupyterLab that instantiates HAIDL by capturing user-bot state, building contextualized prompts, interfacing with AI providers, collecting feedback, and storing interactions in a repository. We add a learning layer over HAIDL that maps interaction objects and notebook execution traces into reproducible measures of user behavior, including engagement, performance, help-seeking, error-oriented use, and learning personas. HAIDL-X provides a foundation for treating human–AI collaboration as structured, queryable, replayable, analyzable data.

Index Terms—Human-AI interaction, interaction data, AI middleware, provenance, learning analytics, JupyterLab, large language models, Big Data infrastructure

I. INTRODUCTION

Foundation models are being woven into computational work at every scale: they draft and debug code in computational notebooks, steer data analyses, configure scientific workflows [1], and act as agents in campaigns spanning edge, cloud, and HPC systems [2]. Computational results are therefore no longer produced by humans or machines alone but through sustained human–AI exchanges, which now shape what gets computed, how errors are resolved, and which conclusions are drawn. Consider an AI assistant embedded in a computational notebook. A user who never invokes it looks, in the AI logs, like a failure of adoption—but zero interactions are ambiguous: the user may be progressing independently, or stuck and never seeking help, and the logs cannot tell these apart though they call for opposite responses. Heavy use is just as ambiguous: two users may each invoke the assistant a dozen times with nearly identical transcripts, where one is debugging—each request follows a runtime error, each response followed by a code change and a successful re-execution—while the other extracts answers, pasting responses forward without attempts in between. Counted as prompts, these users are identical; as collaborations, they could not be more different. Human–AI collaboration is not explainable: when AI assistance fails, misleads, or simply goes unused, we cannot reconstruct why. This is not for lack of logging—emerging telemetry standards record, in structured form, what the model saw and said: prompts, responses, token counts, tool calls, and latencies [3]—but such records cannot answer what an explanation requires: (1) what computational state led a user to request assistance; (2) what role that assistance played (error recovery, a next step, a concept, validation); (3) across a community of users, who is helped, who overrelies, and who struggles in silence. Nor can such records support auditing or reproducing AI-assisted portions of a result after the fact. Answering these requires recording the human side of each exchange—the computational state that motivated it and the actions that followed; today's logs do neither. Existing approaches each capture one side of this coupling (Section IX surveys these in detail): observability conventions such as OpenTelemetry GenAI [3] instrument the model side but omit user context and downstream actions; provenance models, from W3C PROV [4] to PROV-AGENT [2] and LLMography [5], trace agent actions within workflows but do not treat the request–response–assessment cycle as a first-class unit; and programming-process formats such as ProgSnap2 [6] standardize the human side but predate AI assistance, while transcript-only studies [7] lack the com-putational state needed to ground inferred intent. No existing representation couples both sides of a human–AI exchange or defines semantics for deriving knowledge from it. We provide that representation: the Human–AI Interaction Description Language (HAIDL), a formal language that models each human–AI exchange as a single structured object spanning the computational state that motivated the request, the contextualized prompt, the AI response, the user's assessment, and full provenance. HAIDL pairs this grammar with an explicit derivation relation ( ⇒K\Rightarrow_K) that turns stored interactions into inspectable knowledge—for example, resolving whether a user with zero interactions was progressing independently or was stuck and never sought help. We instantiate HAIDL in HAIDL-X, a human–AI middleware for JupyterLab, and validate it through a semester-long capture of interactions in a university computing course: 35 students, four programming assignments, ≈\approx800 recorded interactions, and 140 student–assignment pairs, reproducing the ambiguities above in real data. This paper makes four contributions:

• The HAIDL representation. A formal model of human–AI interactions as first-class, self-contained data objects, defined by a BNF-inspired grammar over seven semantic components—computational context, request, prompt, response, feedback, problem context, and model provenance—with a derivation relation separating observed data from inferred knowledge (Section III).

• A human–AI middleware for runtime capture. HAIDL-X instantiates HAIDL during live computational work: capturing notebook state per request, constructing contextualized prompts, communicating with interchangeable AI providers, collecting feedback, and persisting interaction objects in a queryable repository (Section IV).

• Knowledge extraction, demonstrated in a case study. We define derivation rules composing HAIDL objects with observed execution evidence to recover the role each request played, the trajectory of use over an assignment, and the collaboration patterns behind it—resolving the opening ambiguities: among 37 student–assignment pairs with no recorded interactions, distinguishing students progressing alone from those stuck and never asking (Sections VI–VII).

• Empirical quantification of system cost. We measure the latency, storage, and retrieval overhead HAIDL-X adds to an AI exchange, showing the cost of turning a transient conversation into a persistent, explainable record (Section VIII).

References (30)