Pythia: AI-assisted Code Completion System

Alexey Svyatkovskiy, Ying Zhao, Shengyu Fu, Neel Sundaresan
11/29/2019
cs.SEcs.LG

Official code: microsoft/PTVS (2,564 stars, C#, Apache-2.0, last commit 2026-11-13).

Abstract

In this paper, we propose a novel end-to-end approach for AI-assisted code completion called Pythia. It generates ranked lists of method and API recommendations which can be used by software developers at edit time.

Show full abstract

The system is currently deployed as part of Intellicode extension in Visual Studio Code IDE. Pythia exploits state-of-the-art large-scale deep learning models trained on code contexts extracted from abstract syntax trees. It is designed to work at a high throughput predicting the best matching code completions on the order of 100 $ms$. We describe the architecture of the system, perform comparisons to frequency-based approach and invocation-based Markov Chain language model, and discuss challenges serving Pythia models on lightweight client devices. The offline evaluation results obtained on 2700 Python open source software GitHub repositories show a top-5 accuracy of 92\%, surpassing the baseline models by 20\% averaged over classes, for both intra and cross-project settings.

View on arXivView PDF

Code Implementations(1)

microsoft/PTVSOfficial100%
Apache-2.0

Python Tools for Visual Studio

2,564681C#, PythonMar 18, 20152 weeks agoApache-2.0
ptvspythonvisual-studio

Similar Papers

Cite this paper

@article{svyatkovskiy2019pythia,
  title  = {Pythia: AI-assisted Code Completion System},
  author = {Alexey Svyatkovskiy and Ying Zhao and Shengyu Fu and Neel Sundaresan},
  year   = {2019},
  eprint = {1912.00742},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1912.00742}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1912.00742.svg)](https://codeofpaper.com/paper/1912.00742)

Discussion