TL;DR
This paper introduces personalized ambiguity adaptation, a new task where AI coding assistants leverage a user's past resolved coding sessions to infer their intent in new, underspecified requests. To evaluate this capability, the authors present CAPA, a benchmark of 600 coding sessions mapping personalized ambiguity patterns, and propose a lightweight history gating method that significantly reduces unnecessary clarification questions while improving code correctness.
What Problem Does This Paper Address?
When you ask a coding assistant to "normalize a feature," do you mean min-max scaling or z-score standardization? A human colleague who knows your habits would instantly know your preference based on past projects. Current AI coding assistants, however, treat every session as an isolated blank slate. They either guess blindly (often incorrectly) or repeatedly ask for clarification, increasing the user's cognitive load.
While existing research tackles ambiguity resolution locally within a single session, or explores long-term memory for retrieving user facts, it largely ignores how patterns of ambiguity recur in user-specific ways across different tasks. This paper bridges that gap by formalizing cross-session personalized ambiguity adaptation.
Methods
The authors formalize the task by providing an LLM with a user's past resolved multi-turn coding history alongside a new, ambiguous request. The model must infer the underlying ambiguity-resolution pattern and apply it to generate the correct code in as few turns as possible.
The 6 Ambiguity Mechanisms
The paper adapts linguistic ambiguity types into six coding-specific mechanisms:
- Domain-cognitive polysemy: Using project-specific jargon instead of standard CS terms.
- Structural logic misalignment: Omitting explicit logical relations, scopes, or thresholds.
- Habitual context omission: Leaving out established conventions (e.g., specific schemas or defaults).
- System-boundary misconception: Assuming the LLM can directly interact with the user's local environment or file system.
- Conversational context misalignment: Relying on ambiguous pronouns or context-dependent references.
- Implicit constraint under-specification: Omitting secondary constraints like edge-case validation or security hardening.
Same-User History Gating
To help models better exploit past context, the authors propose a lightweight, parameter-free history gating method. A "gate LLM" reviews past sessions to check for consistent ambiguity-resolution evidence. If found, it highlights the relevant history; if not, it generates explicit clarification guidance for the base model.
Datasets
The authors introduce CAPA (Cross-Session Adaptation to Personalized Ambiguity), a benchmark built on top of HumanEval tasks.
CAPA features a controlled three-stage generation pipeline:
- Structure: 600 coding sessions organized into 60 balanced user-ambiguity cells. Each cell contains 10 sessions (5 for history, 5 for evaluation) matching 10 distinct simulated user profiles (e.g., "The Over-Engineering Architect", "The Deadline Scripter") with pairs of the 6 ambiguity mechanisms.
- Validation: Includes an execution-based evaluation environment and a cross-session consistency check to ensure the simulated user's behavior remains stable over time.
Key Insights and Ideas
- Efficiency Over Accuracy: Providing same-user history improves eventual Executable Success (ES) modestly, but drastically boosts First-Turn Executable Success (FT-ES) and reduces Turns-to-Completion (TTC). History helps models get the code right the first time, cutting down on tedious back-and-forth clarification.
- Generic vs. Personalized Learning: Using "shuffled history" (past sessions from other users) improves performance due to generic in-context learning of coding patterns. However, correctly matched same-user history provides a substantial additional boost, proving models can successfully decode personalized intent.
- The Failure of General Memory Systems: Standard memory frameworks like Mem0 or A-mem actually underperformed raw history. This is because they focus on extracting static facts or notes, whereas personalized disambiguation requires recognizing procedural, recurring patterns of omission.
Key Results
The authors evaluated 12 recent LLMs (including closed-source frontier, open-access frontier, and compact models).
- Top Performer: Claude Opus 4.8 achieved the highest performance, with its first-turn success (FT-ES) skyrocketing from 24.3% (no history) to 60.3% (with same-user history).
- History Gains: GPT-5.5 saw its FT-ES increase by 28.7 percentage points and its average turns-to-completion drop by 1.447 turns when given access to user history.
- Gating Method Success: The proposed history gating workflow consistently improved first-turn success across models. For instance, it raised GPT-5.5's FT-ES from 31.00% (raw history) to 44.33% (gated history) while maintaining overall success rates.
Limitations and Future Work
- Scope of Code Base: CAPA is built on HumanEval, which focuses on standalone, function-level Python tasks. Real-world software engineering involves complex multi-file repositories where ambiguities span across large codebases.
- Simulated Users: The benchmark relies on LLM-simulated user personas and synthetic ambiguities. Validating these patterns against real-world developer telemetry remains an open challenge.
- In-Context Constraints: History is currently fed entirely into the prompt context window. Future work should explore how models can adapt via parameter updates or long-term episodic retrieval without exhausting context limits.
Summary updated