atlas

Research map / Large language models / AI and society

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

AAAI 2024 · Large language models › AI and society · approach: Data commons and human baselines · 19 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes CDHF, a utility-guided two-stage cascade that learns from Copilot accept/reject telemetry to hide suggestions likely to be rejected, evaluated retrospectively on 535 programmers.

Problem

When should a code-recommendation system like GitHub Copilot display an inline suggestion, given that many suggestions are rejected, wasting latency and programmer verification time?

Approach

A utility-theoretic criterion shows a suggestion only when its acceptance probability exceeds a threshold P*; CDHF implements this with a cascade where a code-only stage-1 model decides to hide without generating the suggestion, and otherwise a stage-2 model using the suggestion decides, learned from implicit telemetry feedback rather than RLHF.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use CDHF to hide suggestions below the acceptance-based display thresholdCopilot · CDHF retrospective test setsuggestions hidden (%): 25.3% hidden; 94.7% would have been rejected; 12.9% not generatedHelped
use CDHF to hide suggestions at the no-latency-concern operating pointCopilot · CDHF retrospective test setsuggestions hidden (%): 52.9% hidden; 91.3% would have been rejectedHelped
hide 52.9% of suggestions with CDHFCopilot · CDHF counterfactual test setacceptance rate (%): 22.5% -> 45.6% (+23.1 point increase)Helped
include programmer ID and split across sessions for personalizationXGBoost acceptance predictor · Copilot acceptance predictionAU-ROC: 0.780 -> 0.795Helped
remove suggestion features (ablation)XGBoost acceptance predictor · Copilot acceptance prediction, session splitAU-ROC: 0.795 -> 0.631Hurt
include programmer latent state (ablation)Programmer acceptance predictor · 21-participant studyaccuracy: 61.9 ± 1.9 -> 83.6 ± 2.4Helped
rank candidate suggestions by predicted acceptanceCopilot suggestions · HumanEval with solution lines in the prompt (k>0)length of highest-scored suggestion: over 60 of the 164 problems in [0,0.2]; at least 40 problems select the first tokenHurt
rank candidate suggestions by predicted acceptance with docstring-only prompts (k=0)Copilot suggestions · HumanEval, k=0normalized length distribution of highest-rated suggestion: p-value 0.53 (KS=0.06)No clear effect
increase XGBoost stage 2 training data from 1% to 25%XGBoost stage 2 · Acceptance prediction sample complexityAU-ROC: 0.69 -> 0.75Helped

Surprising findings

Limitations

Experimental setup

Datasets: Copilot telemetry logs from 535 Microsoft programmers HumanEval user study telemetry of 21 participants

Benchmarks: HumanEval Copilot telemetry test split

Metrics: AUC accuracy macro F1 true negative rate fraction of suggestions hidden expected calibration error counterfactual acceptance rate

Baselines: Logistic Regression Random Forest FCNN QEBC

Builds on: GitHub Copilot RLHF learning to defer CodeBERTa

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy