PreprintCited by 26Software Engineering ResearchSoftware Engineering Techniques and PracticesRecommender Systems and Techniques

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

Open access
Mozannar, Hussein, Bansal, Gagan, Fourney, Adam, Horvitz, Eric·2023·arXiv

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.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2306.04930

Cites

29 of 29 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Mozannar et al. do not consider that some completions, despite being rejected, may help guide the user in their thinking.

    “and do not consider that some completions, despite being rejected, may help guide the user in their thinking.”

    From A Transformer-Based Approach for Smart Invocation of Automatic Code Completion (2024) · cites this paper as Mozannar et al. [32]

  • Mozannar et al. propose a relatively complex ensemble model that can incur additional latency by filtering after a completion is generated.

    “However, they propose a relatively complex ensemble model that can incur additional latency by filtering after a completion is generated”

    From A Transformer-Based Approach for Smart Invocation of Automatic Code Completion (2024) · cites this paper as Mozannar et al. [32]

  • Mozannar et al.'s filter can depend on a completion being generated, which is guaranteed to incur additional latency and compute in practice.

    “Additionally, their filter can depend on a completion being generated, which is guaranteed to incur additional latency and compute in practice.”

    From A Transformer-Based Approach for Smart Invocation of Automatic Code Completion (2024) · cites this paper as Mozannar et al. [32]

  • Optimising the acceptance rate results in shorter and typically less useful suggestions.

    “however, this is critiqued by Mozannar et al. [32], whom find that optimising the acceptance rate results in shorter and typically less useful suggestions.”

    From A Transformer-Based Approach for Smart Invocation of Automatic Code Completion (2024) · cites this paper as Mozannar et al. [32]

  • Mozannar et al.'s filter can hide 53% of completions with the guarantee 91% would have been rejected by the user.

    “They cite it can hide 53% of completions with the guarantee 91% would have been rejected by the user.”

    From A Transformer-Based Approach for Smart Invocation of Automatic Code Completion (2024) · cites this paper as Mozannar et al. [32]

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Mozannar, H., Bansal, G., Fourney, A., & Horvitz, E.
Affiliations
  • Massachusetts Institute of Technology (US)
  • Microsoft (United States) (US)
Venue
arXiv
Publisher
arXiv
Published
2023
Volume
38
Issue
9
Pages
10137-10144
ISSN
2159-5399 (ISSN-L)
OpenAlex
W4393153298
Cited by
22
References
29
Citations by year
2026: 6 · 2025: 7 · 2024: 8 · 2023: 1
FWCI
7.91
Type
conference paper
Language
en
Open access
Locations
  • Proceedings of the AAAI Conference on Artificial Intelligence (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • AAAI Publications (The Association for the Advancement of Artificial Intelligence (AAAI)) (submittedVersion)
  • arXiv (Cornell University)
Funders
Microsoft Research
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
  • Physical Sciences › Computer Science › Information Systems › Recommender Systems and Techniques
Keywords
AI-assisted programming, code recommendation, human feedback, GitHub Copilot, developer productivity, reward signals

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review