AI-assisted IntelliSense for your team’s codebase
Visual Studio IntelliCode uses machine learning to offer useful, contextually-rich code completion suggestions as you type, allowing you to learn APIs more quickly and code faster. Although IntelliCode’s base model was trained on over 3000 top open source C# GitHub repositories, it does not include all the custom types in your code base. To produce useful, high-fidelity, contextually-rich suggestions, the model needs to be tailored to unique types or domain-specific APIs that aren’t used in open source code. To make IntelliSense recommendations based on the wisdom of your team’s codebase, the model needs to train with your team’s code.
Earlier this year, we extended our ML model training capabilities beyond our initial Github trained base model to enable you to personalize your IntelliCode completion suggestions by creating team models trained on your own code.
Team completions shared and automated easily!
Your team completions become part of your normal developer workflow just by associating a model to your repo. Anyone with access to your repository, automatically gets team completions – no extra configuration steps are required!
Once you’re ready, you can keep your completions up-to-date with our new Azure DevOps task that can retrain your models on CI. When a change is made to your codebase, the model is automatically trained and shared with your team.
2 steps to team completions
Set up and share
Repository-associated models are automatically shared with others working in the same codebase as long as users have enabled automatic acquisition of team models in Visual Studio. To enable automatic acquisition by going to Tools > Options > IntelliCode > Acquire team models for completion. Access to the repository is access to the model. Be sure you are at least Visual Studio 16.4 preview 4 to enable these preview features.
When training, we collect some information about the checked-out commit where the training took place. Anyone who requests that model must have the same commit in their repository and be able to produce the same information that was collected during training to receive the team model.
Please note that you’ll need to be on at least Visual Studio 2019 version 16.4 preview 5 to try out these updates to the IntelliCode team completions experience.
See more details on how to acquire and share team completions here.
Once you’re happy with the team completions on you repo, you should set up to automatically retrain as part of your continuous integration (CI) pipeline in Azure Pipelines. When code changes are pushed to your repository, the build task runs and your team completions are retrained and made available to the repo. In parallel, Visual Studio checks for updates to team completions and will update automatically .
Install the Visual Studio IntelliCode Team Model Training task from Visual Studio Marketplace to your Azure DevOps organization or Azure DevOps Server (formerly TFS).
See more details about how to configure and automate the build task here.
Tell us what you think!
We’d love to understand your current experience with IntelliCode and where we can improve. Try out sharing team completions and automating updates today and tell us what you think of the new experience. Please note that you’ll need to be on at least Visual Studio 2019 version 16.4 preview 5 to try out these updates to the IntelliCode team completions experience.
Please raise issues and comments Visual Studio “report a problem”.
We’re interested to hear feedback about the recommendations themselves, the performance of the feature, or any capabilities you might be missing.
To keep up with the future of AI-assisted development, sign up for our Insiders newsletter.
This sounds overcomplicated and SaaSS, why can we not simply share the completion data on a LAN file share?
Thanks for the comment, László. We are continuing to refine the completions sharing experience and we welcome your feedback. Our goal is to make a seamless experience for acquiring and keeping completions up to date. Which parts of the new experience sound overcomplicated?
Just the fact that it’s forced through an online service that you need to set up, and then all these caveats of having to produce a similar checkout to get it back out.
If making a model is quick seamless I’d expect it to “just work”, but if it’s a computationally-intensive, slow process, then I’d expect to run it somewhere, possibly overnight or a weekend if it’s that slow, save the results into a file, and advertise to my team where to find it and have them either load it into VS or just drop it in some .gitignored location that VS recognizes with no additional configuration.
I haven’t even touched on the subject of many companies’ policies simply not letting developers upload any part of their code to third-party servers unless they’ve been explicitly approved.
Hi László! 🙂 Thanks again for replying back and as I mentioned we have planned work to refine the completions sharing experience. Your feedback is definitely welcomed throughout the refinement process, and, if you are willing, we can talk more in a call. I’d love to hear more feedback about your workflow during the design of the new experience.
All of that sounds very promising.
But, how about IntelliCode for other languages, such as Python?
Is there anything that can be used to achieve the same level of IntelliCode we have with C# solutions, in Python solutions?
Thank you very much!
Thanks for the response. We have our sights on expanding IntelliCode team completions to Python in the future. First, we are spending the time refining the user experience with training and sharing team completions in the current Visual Studio Preview feature. Please let me know if you have any other questions.