Asking What Matters: Reward-Driven Clarification for Software Engineering Tasks
This paper introduces CLARITI, an 8B-parameter model trained via reward-driven reinforcement learning that optimizes clarification efficiency in software engineering by prioritizing task-relevant and user-answerable information, achieving GPT-5-level resolution rates with 41% fewer questions.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are a master chef (the AI agent) trying to cook a complex dish based on a recipe card handed to you by a customer (the user).
The Problem:
Often, the customer's recipe card is incomplete. They might say, "Make me a spicy pasta," but they forget to mention:
- How spicy is "spicy"? (Is it a hint of heat or a fire hazard?)
- Do they have a gluten allergy?
- What kind of pasta do they have in their pantry?
If the chef guesses wrong, they might burn the kitchen (the software fails) or waste a lot of ingredients (computation time).
The Old Way:
Previously, AI chefs would either:
- Guess wildly: "I'll just add a little chili!" (Often fails).
- Ask everything at once: "What is your name? What is your blood type? What is the exact temperature of your oven? Do you like cilantro? What is the capital of Peru?" (This overwhelms the customer, who gets annoyed and stops talking).
The New Solution: "CLARITI" (The Smart Waiter)
This paper introduces a new AI system called CLARITI. Think of CLARITI not as a chef, but as a highly trained, super-smart waiter who knows exactly what to ask and how to ask it to get the best result without annoying the customer.
Here is how CLARITI works, broken down into three simple steps:
1. The "What Matters" Filter (Task Relevance)
The researchers realized that not all missing information is created equal.
- The Analogy: If the customer forgot to say "I'm allergic to peanuts," that is Critical Information. If they forgot to say "I prefer a blue plate," that is Low Priority Information.
- The Science: The team analyzed thousands of software bugs and used a mathematical tool (Shapley values) to figure out which missing details actually stop the AI from solving the problem. They found that concrete error messages (like "The pot exploded!") are way more important than vague descriptions (like "It didn't taste right").
- CLARITI's Move: Instead of asking about the plate color, CLARITI immediately asks, "Did the pot explode? If so, show me the smoke!" It prioritizes the "peanut allergy" questions over the "blue plate" questions.
2. The "Can You Answer?" Filter (User Answerability)
Asking the right question is useless if the customer doesn't know the answer.
- The Analogy: A waiter shouldn't ask a customer, "What is the internal chemical structure of the flour you bought?" The customer has no idea! They can answer, "I bought the flour from the store on 5th Street," or "Here is the bag."
- The Science: The team studied what makes a question easy for a human to answer. They found that good questions:
- Ask for visible evidence (e.g., "Show me the error message").
- Are specific (e.g., "Which version of Python?" instead of "What version?").
- Have a small scope (e.g., "Show me the code for this one function" instead of "Explain your whole app").
- CLARITI's Move: It avoids asking impossible questions. It asks for things the user can actually see or copy-paste, like a screenshot or a specific error code.
3. The "Less is More" Strategy (Efficiency)
The most surprising finding was that asking fewer questions is better.
- The Analogy: Imagine a waiter asking 10 questions to get a simple order. The customer gets tired and just says, "Whatever, you decide." But if the waiter asks just 2 perfect questions, the customer is happy and gives a great answer.
- The Result: CLARITI manages to solve the same number of software problems as the giant, expensive AI models (like GPT-5), but it asks 41% fewer questions. It cuts out the fluff.
The Secret Sauce: The Reward System
How did they teach CLARITI to be this smart? They didn't just tell it "be helpful." They built a multi-stage reward system (like a video game with levels):
- Level 1 (No Redundancy): If you ask a question the user already answered, you get zero points.
- Level 2 (No Copy-Paste): If you ask the same generic question for every problem, you get zero points.
- Level 3 (Can They Answer?): If the user can't possibly know the answer, you get zero points.
- Level 4 (Does It Matter?): If you asked about the "blue plate" instead of the "peanut allergy," you get fewer points.
By training the AI to maximize points in all four levels, it learned to be the perfect waiter: asking the fewest, most critical, and most answerable questions possible.
The Bottom Line
This paper teaches us that for AI to work well with humans, it shouldn't just be "smart"; it needs to be empathetic and efficient. It needs to know what information actually solves the problem and respect the human's time and knowledge limits.
CLARITI proves that by asking the right questions (rather than more questions), AI can solve complex software problems just as well as the biggest models, but with much less friction for the human user.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.