Lune

AAAI2024Top-tier venue

When to Show a Suggestion? Integrating Human Feedback in AI-Assisted Programming

Hussein Mozannar, Gagan Bansal, Adam Fourney, Eric Horvitz

Abstract

AI powered code-recommendation systems, such as Copilot and CodeWhisperer, provide code suggestions inside a programmer's environment (e.g., an IDE) with the aim of improving productivity. We pursue mechanisms for leveraging signals about programmers' acceptance and rejection of code suggestions to guide recommendations. We harness data drawn from interactions with GitHub Copilot, a system used by millions of programmers, to develop interventions that can save time for programmers. We introduce a utility-theoretic framework to drive decisions about suggestions to display versus withhold. The approach, conditional suggestion display from human feedback (CDHF), relies on a cascade of models that provide the likelihood that recommended code will be accepted. These likelihoods are used to selectively hide suggestions, reducing both latency and programmer verification time. Using data from 535 programmers, we perform a retrospective evaluation of CDHF and show that we can avoid displaying a significant fraction of suggestions that would have been rejected. We further demonstrate the importance of incorporating the programmer's latent unobserved state in decisions about when to display suggestions through an ablation study. Finally, we showcase how using suggestion acceptance as a reward signal for guiding the display of suggestions can lead to suggestions of reduced quality, indicating an unexpected pitfall.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

11 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Grounded Copilot: How Programmers Interact with Code-Generating Models cites Language Models are Few-Shot Learners
  • Differentiable Learning Under Triage cites Consistent Estimators for Learning to Defer to an Expert
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Language Models are Few-Shot Learners
  • Need Help? Designing Proactive AI Assistants for Programming cites Grounded Copilot: How Programmers Interact with Code-Generating Models
  • "My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistants cites Grounded Copilot: How Programmers Interact with Code-Generating Models
  • "My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistants cites When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model Inference
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers11

  1. Need Help? Designing Proactive AI Assistants for ProgrammingValerie Chen, Alan Zhu, Sebastian Zhao, Hussein Mozannar et al.CHI 2025 · 23 citations
  2. Navigating Rifts in Human-LLM Grounding: Study and BenchmarkOmar Shaikh, Hussein Mozannar, Gagan Bansal, Adam Fourney et al.ACL 2025 · 21 citations
  3. Utilizing Human Behavior Modeling to Manipulate Explanations in AI-Assisted Decision Making: The Good, the Bad, and the ScaryZhuoyan Li, Ming YinNeurIPS 2024 · 15 citations
  4. When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model InferenceZhensu Sun, Xiaoning Du, Fu Song, Shangwen Wang et al.ICSE 2024 · 13 citations
  5. "My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding AssistantsYunbo Lyu, Zhou Yang, Jieke Shi, Jianming Chang et al.ASE 2025 · 8 citations

Builds on8

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
  3. Grounded Copilot: How Programmers Interact with Code-Generating ModelsShraddha Barke, Michael B. James, Nadia PolikarpovaOOPSLA 2023 · 408 citations
  4. Consistent Estimators for Learning to Defer to an ExpertHussein Mozannar, David A. SontagICML 2020 · 267 citations
  5. Differentiable Learning Under TriageNastaran Okati, Abir De, Manuel Gomez-RodriguezNeurIPS 2021 · 99 citations

Related papers

  1. Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted ProgrammingHussein Mozannar, Gagan Bansal, Adam Fourney, Eric HorvitzCHI 2024 · 88 citations
  2. An Eye for AI: Eye-Tracking the Micro-Interruptions of GenAI Code SuggestionsTarek Alakmeh, Sarah D’Angelo, Thomas FritzICSE 2026 · 1 citation
  3. A Large-Scale Survey on the Usability of AI Programming Assistants: Successes and ChallengesJenny T. Liang, Chenyang Yang, Brad A. MyersICSE 2024 · 126 citations
  4. Validating AI-Generated Code with Live ProgrammingKasra Ferdowsi, Ruanqianqian (Lisa) Huang, Michael B. James, Nadia Polikarpova et al.CHI 2024 · 27 citations
  5. An Empirical Study of Knowledge Transfer in AI Pair ProgrammingAlisa Welter, Niklas Schneider, Tobias Dick, Kallistos Weis et al.ASE 2025
Dusk over the sea between two cliffs drawn in fine vertical lines