Interactive Prompting Assistant: Just-in-Time Requirement Clarification for Agentic Software Development

Cuong Chi Le, Minh Le-Anh, Long Vu, Tien N. NguyenarXiv 2026

TL;DR

Modern IDEs offer autocompletion and bug squiggles while you write code, so why don’t we have something similar for writing the prompts that direct AI coding agents? This paper introduces the Interactive Prompting Assistant (IPA), a system that reads over your shoulder as you type natural-language software requirements and gently flags missing details or contradictions in real time. By decoupling when to look from what to ask, IPA catches spec-breaking bugs before you even hit "Enter"—without burning a mountain of GPU compute on every keystroke.

What Problem Does This Paper Address?

Software engineering is shifting from writing code directly to writing detailed natural-language specs for AI agents to implement. The catch? Humans are notoriously bad at writing airtight requirements on the first try. We leave out edge cases (like what happens when a credit card declines), introduce contradictions (allowing "guest checkout" in paragraph one, then requiring every order to link to a user account in paragraph two), and bake in unexamined assumptions.

Existing "clarification" tools wait until you submit your entire prompt before analyzing it and asking follow-up questions. By then, your mental context has moved on, and later paragraphs might already be entangled in an earlier flawed assumption. The authors ask: what if an assistant could help you clarify requirements in situ, right at the moment an omission or contradiction becomes evident?

Fig. 1. Composing a checkout-system prompt under two interaction styles. Left: turn-based prompting waits until the description is complete. By then, a missing payment-failure requirement [1], a guest-checkout versus account-bound-order inconsistency [2], and an implicit no-fee cancellation assumption [3] have all accumulated. Right: IPA operates within the human turn and surfaces each issue as soon as the evolving prefix makes it evident. After these in-situ revisions, the prompt is completed with no remaining issues.

Methods

Running a massive reasoning LLM on every single keystroke would be prohibitively slow, expensive, and annoying. Instead, IPA mimics a good human listener by splitting the problem into a two-layer architecture:

Fig. 2. Two-layer IPA Architecture. The interaction layer stays with the author as they type and either passes or calls reasoning on the current prefix. Reasoning may ask a question; the author may revise; interaction continues on the updated text.
  1. The Interaction Layer (When to ask): A tiny, fast controller watches your prompt token by token. Instead of running a full transformer forward pass, it looks up frozen token embeddings (from Gemma 4 12B) and feeds them into a lightweight two-layer GRU with causal attention. At each token, a constrained state machine chooses one of three silent stances:
  2. Wait: Everything looks normal.
  3. Track: A potential issue is forming, but let the human finish their thought.
  4. Verify: Enough evidence has accumulated; wake up the big model!
  5. The Reasoning Layer (Whether and what to ask): Triggered only on a Verify signal, a larger LLM inspects the text written so far. If the concern is a false alarm, it stays silent. If genuine, it surfaces a non-modal, evidence-grounded clarification question.

To test this without human memory bias—since a human can't "unsee" a question to replay a control condition—the authors built a rewind-and-resume LLM simulation. When a simulated LLM author accepts a question and gets an answer, the pipeline rewinds to that exact token, lets the author revise the prefix, and generates a fresh continuation so discarded text never pollutes future reasoning.

Datasets

The authors evaluate IPA on HiL-Bench, specifically using 100 publicly available software engineering tasks derived from SWE-Bench Pro. Across these 100 tasks, there are 353 human-validated "blockers"—critical missing details, ambiguities, or contradictions that cannot be safely guessed—along with hidden gold-standard resolutions.

To train and test the token-level controller's timing, the authors also augmented these tasks with token-level onset (Track) and maturity (Verify) labels using a multi-pass LLM annotation and referee pipeline (split 70/30 into train/test sets).

Key Insights and Ideas

  • Punctuation is not meaning: A naive alternative to a learned controller is checking every couple of sentences ("chunking"). The authors show this fails in both directions: periods often happen mid-thought (triggering premature questions), while contradictions can arise mid-sentence (delaying intervention).
  • IPA shines brightest as a contextual reminder: When analyzing how prompts improved, IPA was 2.3x to 5.0x more likely to help authors recover omitted requirements than to trigger repairs of existing contradictions. Catching someone while they are actively thinking about the checkout flow makes it effortless to add a missing failure-handling rule.
  • In-flight and post-hoc checks are teammates, not rivals: Checking while typing doesn't replace a final review; it makes the final review much more effective by preventing early errors from cascading through the rest of the document.

Key Results

Tested across three simulated author/verifier models (DeepSeek-V4-Flash, Kimi-K2.5, and Grok 4.1-Fast):

  • Addressing Blockers: Unassisted authors addressed only 15.6%–31.2% of gold blockers. Post-hoc clarification raised this to 62.6%–75.1%, while combining within-turn IPA + Post-Hoc under the exact same budget pushed Blocker Response Rates to 75.6%–79.6% (a +4.5 to +13.0 percentage point boost over post-hoc alone).
  • Question Quality & Timing: In standalone issue detection, IPA (with a two-sentence safety fallback) beat post-hoc clarification by 12.0–23.0 F1 points, surfacing issues around token ~463–483 rather than waiting for the full ~766–817 token prompt. Furthermore, ~40% of questions that didn't match a benchmark blocker were still judged as valid, helpful reminders for that point in the text.
  • Low Latency: Converting token delays into human typing speeds (48 WPM) plus model wall-clock time, IPA surfaced 65.4%–72.0% of detected blockers within 6.3 to 27.9 seconds of the issue becoming verifiable.

Limitations and Future Work

Because the experiments rely on LLM-as-human simulations for strict counterfactual control, they don't capture real human cognitive load, annoyance, or UI ergonomics—actual user studies are an essential next step. Additionally, the evaluation measured whether authors addressed blockers rather than downstream code-generation pass rates, and roughly 30% of "hard" blockers still suffered long delays (~220s) while waiting for more text context before triggering verification. Looking ahead, the authors envision IPA as the first step toward full-fledged "Prompt IDEs" featuring consistency linters, missing-requirement diagnostics, and automated prompt refactoring.

Summary updated

BibTeX
@misc{le2026interactive,
  author = {Cuong Chi Le and Minh Le-Anh and Long Vu and Tien N. Nguyen},
  title = {{Interactive Prompting Assistant: Just-in-Time Requirement Clarification for Agentic Software Development}},
  year = {2026},
  eprint = {2611.35585},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.35585},
}
Figure