Dynamic Prompt Middleware: Contextual Prompt Refinement Controls for Comprehension Tasks
- Ian Drosos ,
- Jack Williams ,
- Advait Sarkar ,
- Nicholas Wilson ,
- Sean Rintel ,
- Payod Panda
Published by ACM
Microsoft Foundry Labs
FIGURE: Left: Dynamic PRC interface. Right: System flow diagram for Dynamic PRC.
ABSTRACT
Effective prompting of generative AI is challenging for many users, particularly in expressing context for comprehension tasks such as explaining spreadsheet formulas, Python code, and text passages. Prompt middleware aims to address this barrier by assisting in prompt construction, but barriers remain for users in expressing adequate control so that they can receive AI-responses that match their preferences. We conduct a formative survey (n=38) investigating user needs for control over AI-generated explanations in comprehension tasks, which uncovers a trade-off between standardized but predictable support for prompting, and adaptive but unpredictable support tailored to the user and task. To explore this trade-off, we implement two prompt middleware approaches: Dynamic Prompt Refinement Control (Dynamic PRC) and Static Prompt Refinement Control (Static PRC). The Dynamic PRC approach generates context-specific UI elements that provide prompt refinements based on the user’s prompt and user needs from the AI, while the Static PRC approach offers a preset list of generally applicable refinements. We evaluate these two approaches with a controlled user study (n=16) to assess the impact of these approaches on user control of AI responses for crafting better explanations. Results show a preference for the Dynamic PRC approach as it afforded more control, lowered barriers to providing context, and encouraged exploration and reflection of the tasks, but that reasoning about the effects of different generated controls on the final output remains challenging. Drawing on participant feedback, we discuss design implications for future Dynamic PRC systems that enhance user control of AI responses. Our findings suggest that dynamic prompt middleware can improve the user experience of generative AI workflows by affording greater control and guide users to a better AI response.
KEYWORDS: Dynamic UX Generation, Prompt Middleware | Featured on Microsoft Foundry Labs (opens in new tab)
Ian Drosos, Jack Williams, Advait Sarkar, Nicholas Wilson, Sean Rintel, and Payod Panda. 2025. Dynamic Prompt Middleware: Contextual Prompt Refinement Controls for Comprehension Tasks. In Proceedings of the 4th Annual Symposium on Human-Computer Interaction for Work (CHIWORK '25). Association for Computing Machinery, New York, NY, USA, Article 24, 1–23. https://doi.org/10.1145/3729176.3729203
Related Tools
Promptions
November 25, 2025
Promptions is a simple, flexible dynamic prompt middleware technique for AI that uses ephemeral UI. From a single, simple prompt, the system helps users steer the AI by suggesting parameterized choices as dynamically generated, ephemeral UI components. As users click on choices, the same output updates immediately—not just as additional chat responses. The dynamic UI can be configured per prompt.
Promptions
Promptions (“Prompt” plus “options”) dynamically generates UI to help users steer AI responses more effectively. It’s simple, effective, and easily customizable, making it suitable for developers from individual vibe-coders to enterprise software engineers.