AI coding agents do better work when they poke around the codebase first — but not for the reason you'd expect.
Can AI agents improve task success by exploring a problem before asking questions?
This explores whether AI agents do better when they first look around a problem on their own (reading the code, checking the context, trying things out) before going back to the user with clarifying questions, and what that does to the quality of the questions they ask.
This explores whether agents get better results when they investigate a problem before they ask the user anything. The short answer from the corpus is yes. The surprise is the reason: exploring doesn't mainly cut down how many questions an agent needs. It changes what kind of questions it asks. In a comparison of five models on software engineering tasks, the winners asked fewer questions. Those questions came after looking around the codebase and were about concrete behavior ("should this fail silently or raise an error?") rather than generic or implementation-level ones. Raw information gain turned out to be a weak predictor of success. What mattered more was whether the questions were ones the user could actually answer, and how well the agent used the answers How do models balance asking many questions with asking the right ones?.
The payoff from getting this right is large. When software tasks are deliberately left vague, live clarification wins back 74–80% of the performance lost to the missing details. The catch is that models almost never ask unless they're prompted to. That points to a training gap, not a capability gap Can asking for clarification recover lost software engineering performance?. The passivity is built in: training that rewards the next reply discourages initiative, and conversational models are tuned to respond rather than lead Why can't conversational AI agents take the initiative?. Behaviors like seeking clarification can be trained back in, rising from almost zero to about 74% with reinforcement learning Why do AI agents fail to take initiative?. Training can also target question quality directly by splitting "a good question" into separate traits like clarity, relevance and specificity. That works better than training on a single overall score, especially in clinical settings where the right question shapes the diagnosis Can models learn to ask genuinely useful clarifying questions?.
There's a tension here too. Exploring on your own can slide into drifting. Tool-using agents often chain search after search silently and wander away from what the user meant. Conversation analysis offers a vocabulary for when to break off and check in: short side-exchanges (insert-expansions) that confirm intent or scope before the agent commits When should AI agents ask users instead of just searching?. A related idea is giving the agent an explicit list of what it still doesn't know about the user. That cut harmful advice and sycophancy by 50–75% and roughly halved hallucination Do language models know what they don't know about users?. So a good exploration phase should show the agent where its knowledge stops, not just pile up context.
One more angle: exploration isn't only something agents do at run time. It can also be learned in training. Models trained on full, messy search traces, dead ends and backtracking included, solved 25% more problems than models trained only on clean, optimal solutions Does training on messy search processes improve reasoning?. Put the two findings together and they suggest something the corpus doesn't test directly: an agent that has learned how to explore may also be the one that knows which question is worth asking. The corpus doesn't directly test the best balance between exploring and asking, or how it changes outside software engineering.
Sources 8 notes
Across five models tested on software engineering tasks, those asking fewer but exploration-informed, behaviorally-specific questions outperformed those asking more generic or implementation-heavy questions. Information gain alone poorly predicts task performance; how models integrate answers matters as much as how many they extract.
Testing AI agents on ambiguous software engineering tasks showed that live clarification exchanges recover 74–80% of the performance drop caused by incomplete instructions. However, models rarely initiate these queries without explicit prompting, suggesting a training rather than capability gap.
Research shows LLMs including ChatGPT cannot initiate topics, plan strategically, or lead conversations because their training optimizes for responding to queries, not creating dialogue from agent goals. This passivity is reinforced by alignment objectives and masked by fluent-sounding outputs.
Research shows next-turn reward optimization structurally removes initiative from models, but proactive behaviors like critical thinking and clarification-seeking are trainable (0.15% to 73.98% with RL). The core challenge is balancing proactivity with civility to avoid intrusion.
The ALFA framework breaks down question quality into theory-grounded attributes (clarity, relevance, specificity) and trains models on 80K attribute-specific preference pairs. Attribute-specific optimization outperforms single-score training, especially in clinical reasoning where asking the right clarifying question directly impacts decision quality.
Show all 8 sources
Tool-enabled LLMs drift from user intent through silent tool chaining. Conversation analysis reveals insert-expansions—clarifying intent, scoping responses, enhancing appeal—as a formal framework for proactive user consultation that prevents misunderstanding instead of recovering from it.
Research shows assistants suffer from sycophancy and hallucination because they have no representation of what remains unknown about users. Adding a schema of labeled unknowns to prompts reduced harmful advice and sycophancy by 50–75% and cut hallucination rates by roughly half.
Stream of Search pretraining, which represents exploration and backtracking as serialized strings, achieves 25% higher accuracy than optimal-trajectory-only training. Models learn internal world models for search and adaptive strategies rather than fixed external methods.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- HumanAgencyBench: Scalable Evaluation of Human Agency Support in AI Assistants
- Knowing but Not Showing: LLMs Recognize Ambiguity but Rarely Ask Clarifying Questions
- DiscussLLM: Teaching Large Language Models When to Speak
- Ambig-SWE: Interactive Agents to Overcome Underspecificity in Software Engineering
- ClarifyMT-Bench: Benchmarking and Improving Multi-Turn Clarification for Conversational Large Language Models
- Proactive Conversational Agents with Inner Thoughts
- When Single-User-Oriented LLM-based Assistants Involve Others: A Scoping Review of Pathways, Risks, and Responses
- Intent Mismatch Causes LLMs to Get Lost in Multi-Turn Conversation