Prototyping Multimodal GenAI Real-Time Agents with Counterfactual Replays and Hybrid Wizard-of-Oz

Frederic Gmeiner, Kenneth Holstein, Nikolas MartelaroarXiv 2025 · DOI

Abstract

Designing proactive, real-time multimodal agents that provide timely assistance in complex environments remains a significant challenge. Traditional evaluation methods often rely on static tabular comparisons that fail to account for the temporal context of user actions. This paper introduces a novel prototyping pipeline utilizing "Counterfactual Replays"—testing new prompt strategies against historical user session videos—and a "Hybrid Wizard-of-Oz" (WoZ) approach for live, human-mediated refinement. We demonstrate this workflow through the development of SocraBot, an AI assistant for mechanical engineers using Autodesk Fusion 360. Our results show that iterative refinement through this pipeline led to a significant increase in design outcome scores (from 1.6 to 4.4 out of 5.0) and a shift toward more targeted, phase-aware agent interventions.

Introduction

Building a real-time agent that observes a user's screen and provides proactive advice is fundamentally different from building a standard chatbot. In domain-specific tasks like mechanical engineering, context is paramount. An AI suggestion that appears correct in a spreadsheet might be redundant or disruptive if it ignores the user's immediate history or current design phase. Current development is often hindered by a lack of standard benchmarks and the "blindfolded" nature of prompt engineering in time-sensitive, multimodal environments.

Methodology

The researchers developed a two-stage prototyping pipeline to address these challenges:

  1. Counterfactual Video Replay Prompting: A custom toolkit allows designers to replay recorded user sessions. At any timestamp, designers can trigger the AI using modified prompts to observe how the agent would have responded. This enables rapid "what-if" testing without requiring new live sessions.
  2. Hybrid Wizard-of-Oz (WoZ): During live sessions, a human "wizard" monitors AI-generated suggestions. The wizard can approve, edit, or suppress messages before they reach the user, providing a safety net and generating high-quality data on model failures.
The Replay Prompter interface enables designers to load user sessions, modify LLM instructions, and evaluate generated responses against video context.

The study utilized a dataset of 15 unique user sessions (videos and logs) for counterfactual testing and recruited 10 mechanical engineers for live evaluation. The target application, SocraBot, assists users within the Autodesk Fusion 360 environment.

Iterative Design and Key Insights

The core finding was the "Contextual Immediacy" trap: AI responses that are logically plausible often fail if the timing is incorrect. The bottleneck was not the content of the messages, but the model's ability to classify the user's current task phase (e.g., distinguishing between "setting up constraints" and "evaluating results").

The iterative evolution of the prototyping process, showing the transition from monolithic prompts to a chained architecture across five evaluation steps.

To solve this, the team moved from a monolithic prompt to a chained architecture. This approach first classifies the task phase and then generates a phase-specific support message. This structure allows the human wizard to intervene at the classification stage, ensuring downstream relevance.

Results

The iterative process yielded substantial improvements:

  • Quantitative Gains: The average "Design Outcome Score" rose from 1.6/5.0 in the first Hybrid WoZ cycle to 4.4/5.0 in the second.
  • Qualitative Improvements: Messages became less repetitive and more targeted. In the final cycle, all participants successfully passed structural analysis requirements, a significant improvement over baseline groups.
  • Open Source: The Counterfactual Replay Toolkit has been released to the community to support multimodal prompt engineering.

Conclusion and Future Work

This research highlights that prompt engineering for real-time agents is an experiential design task. Immersing designers in user video context helps develop the intuition needed to handle model quirks. While currently human-intensive and domain-specific, future work aims to scale these methods by integrating replay capabilities into standard IDEs and using WoZ corrections to fine-tune models automatically.

Summary updated

BibTeX
@misc{gmeiner2025prototyping,
  author = {Frederic Gmeiner and Kenneth Holstein and Nikolas Martelaro},
  title = {{Prototyping Multimodal GenAI Real-Time Agents with Counterfactual Replays and Hybrid Wizard-of-Oz}},
  year = {2025},
  eprint = {2510.06872},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.06872},
}
Figure