mlsanityData to 7 Oct 2026

Generation Probabilities Are Not Enough: Uncertainty Highlighting in AI Code Completions

arXiv 2302.07248 ↗First posted 14 Feb 2023cs.HC cs.AIcited by 20

Not on the map. Why?

Abstract (arXiv)

Large-scale generative models enabled the development of AI-powered code completion tools to assist programmers in writing code. However, much like other AI-powered tools, AI-powered code completions are not always accurate, potentially introducing bugs or even security vulnerabilities into code if not properly detected and corrected by a human programmer. One technique that has been proposed and implemented to help programmers identify potential errors is to highlight uncertain tokens. However, there have been no empirical studies exploring the effectiveness of this technique -- nor investigating the different and not-yet-agreed-upon notions of uncertainty in the context of generative models. We explore the question of whether conveying information about uncertainty enables programmers to more quickly and accurately produce code when collaborating with an AI-powered code completion tool, and if so, what measure of uncertainty best fits programmers' needs. Through a mixed-methods study with 30 programmers, we compare three conditions: providing the AI system's code completion alone, highlighting tokens with the lowest likelihood of being generated by the underlying generative model, and highlighting tokens with the highest predicted likelihood of being edited by a programmer. We find that highlighting tokens with the highest predicted likelihood of being edited leads to faster task completion and more targeted edits, and is subjectively preferred by study participants. In contrast, highlighting tokens according to their probability of being generated does not provide any benefit over the baseline with no highlighting. We further explore the design space of how to convey uncertainty in AI-powered code completion tools, and find that programmers prefer highlights that are granular, informative, interpretable, and not overwhelming.

Key facts. Cited by 20 papers in the map (data through 7 Oct 2026). Builds on 25 of its 75 references that are in the map. First posted on arXiv 14 Feb 2023.

Builds on

25 of 75 references.

References · 25

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2017On Calibration of Modern Neural Networkscited by 4,860
  4. 2022Survey of Hallucination in Natural Language Generationcited by 2,056
  5. 2022Language Models (Mostly) Know What They Knowcited by 1,783
  6. 2022Teaching Models to Express Their Uncertainty in Wordscited by 731
  7. 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 439
  8. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  9. 2020Does the Whole Exceed its Parts? The Effect of AI Explanations on Complementary Team Performancecited by 396
  10. 2022Self-critiquing models for assisting human evaluatorscited by 372
  11. 2020Effect of Confidence and Explanation on Accuracy and Trust Calibration in AI-Assisted Decision Makingcited by 281
  12. 2020Reducing conversational agents' overconfidence through linguistic calibrationcited by 209
13 more
  1. 2022Do Users Write More Insecure Code with AI Assistants?cited by 186
  2. 2020Uncertainty as a Form of Transparency: Measuring, Communicating, and Using Uncertaintycited by 128
  3. 2022Productivity Assessment of Neural Code Completioncited by 97
  4. 2022Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted Programmingcited by 91
  5. 2020"Why is 'Chicago' deceptive?" Towards Building Model-Driven Tutorials for Humanscited by 86
  6. 2022Help me write a poem: Instruction Tuning as a Vehicle for Collaborative Poetry Writingcited by 71
  7. 2022Investigating Explainability of Generative AI for Code through Scenario-based Designcited by 47
  8. 2022What is it like to program with artificial intelligence?cited by 39
  9. 2022Opal: Multimodal Image Generation for News Illustrationcited by 36
  10. 2021Teaching Humans When To Defer to a Classifier via Exemplarscited by 29
  11. 2020Algorithmic Risk Assessments Can Alter Human Decision-Making Processes in High-Stakes Government Contextscited by 22
  12. 2021Show or Suppress? Managing Input Uncertainty in Machine Learning Model Explanationscited by 15
  13. 2022How Readable is Model-generated Code? Examining Readability and Visual Inspection of GitHub Copilotcited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 1; 2024: 1; 2025: 12; 2026: 6.

20 papers.

Sort:

By area:

  1. 2023Sociotechnical Safety Evaluation of Generative AI Systemscited by 154
  2. 2025From Calibration to Collaboration: LLM Uncertainty Quantification Should Be More Human-Centeredcited by 21
  3. 2025QE4PE: Word-level Quality Estimation for Human Post-Editingcited by 6
  4. 2025Surfacing Variations to Calibrate Perceived Reliability of MLLM-generated Image Descriptionscited by 6
  5. 2025Human-AI Experience in Integrated Development Environments: A Systematic Literature Reviewcited by 5
  6. 2025Unsupervised Word-level Quality Estimation for Machine Translation Through the Lens of Annotators (Dis)agreementcited by 4
  7. 2025The Impact of LLM-Assistants on Software Developer Productivity: A Systematic Review and Mapping Studycited by 4
  8. 2025Statistical Methods in Generative AIcited by 4
  9. 2024Cognitive Spillover in Human-AI Teamscited by 3
  10. 2025From Consumption to Collaboration: Measuring Interaction Patterns to Augment Human Cognition in Open-Ended Taskscited by 3
  11. 2025Localized Calibrated Uncertainty in Code Language Modelscited by 3
  12. 2026Overseeing Agents Without Constant Oversight: Challenges and Opportunitiescited by 3
8 more
  1. 2026Functional Entropy: Predicting Functional Correctness in LLM-Generated Code with Uncertainty Quantificationcited by 3
  2. 2025HiLDe: Intentional Code Generation via Human-in-the-Loop Decodingcited by 1
  3. 2026Effects of Generative AI Errors on User Reliance Across Task Difficultycited by 1
  4. 2025Beyond Autocomplete: Designing CopilotLens Towards Transparent and Explainable AI Coding Agentscited by 0
  5. 2025Does In-IDE Calibration of Large Language Models work at Scale?cited by 0
  6. 2026Fine-grained Approaches for Confidence Calibration of LLMs in Automated Code Revisioncited by 0
  7. 2026Choose Your Own Adventure: Non-Linear AI-Assisted Programming with EvoGraphcited by 0
  8. 2026Human agency in initial human-AI proof formalization workflowscited by 0