{"id":25597,"date":"2020-02-21T18:51:57","date_gmt":"2020-02-21T18:51:57","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=25597"},"modified":"2020-02-24T17:40:07","modified_gmt":"2020-02-24T17:40:07","slug":"custom-ai-assisted-intellisense-for-your-team","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/custom-ai-assisted-intellisense-for-your-team\/","title":{"rendered":"Custom AI-Assisted IntelliSense for your team"},"content":{"rendered":"<p><span data-contrast=\"auto\">As you\u2019ve been editing code, you may have noticed\u00a0<\/span><span data-contrast=\"auto\">IntelliCode\u2019s<\/span><span data-contrast=\"auto\">\u00a0starred recommendations in your autocompletion lists. Our previous\u00a0<\/span><span data-contrast=\"none\">IntelliCode blog post<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">explains that these smarter suggestions were\u00a0<\/span><span data-contrast=\"auto\">machine-learned<\/span><span data-contrast=\"auto\">\u00a0over thousands of open sourced GitHub repos.<\/span><span data-contrast=\"auto\">\u00a0Using community knowledge is great for public APIs like the Standard Library, but what if you want\u00a0<\/span><span data-contrast=\"auto\">IntelliCode<\/span><span data-contrast=\"auto\"> suggestions for your APIs and other libraries that wouldn\u2019t commonly be found in open-source code? To address this, in <\/span><a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\"><span data-contrast=\"none\">Visual Studio 2019 v<\/span><span data-contrast=\"none\">ersion\u00a0<\/span><span data-contrast=\"none\">16.5 Preview 3<\/span><\/a><span data-contrast=\"auto\">\u00a0<\/span><b><span data-contrast=\"auto\">you can now<\/span><\/b><b><span data-contrast=\"auto\">\u00a0train custom\u00a0<\/span><\/b><b><span data-contrast=\"auto\">IntelliCode<\/span><\/b><b><span data-contrast=\"auto\">\u00a0model<\/span><\/b><b><span data-contrast=\"auto\">s<\/span><\/b><b><span data-contrast=\"auto\">\u00a0<\/span><\/b><b><span data-contrast=\"auto\">on your own codebase<\/span><\/b><b><span data-contrast=\"auto\">s<\/span><\/b><span data-contrast=\"auto\">.<\/span><b><span data-contrast=\"auto\">\u00a0<\/span><\/b><span data-contrast=\"auto\">This generates something we call a \u201cTeam Completions mode<\/span><span data-contrast=\"auto\">l<\/span><span data-contrast=\"auto\">,<\/span><span data-contrast=\"auto\">\u201d<\/span><span data-contrast=\"auto\"> because you\u2019ll start to get suggestions based on your team\u2019s coding patterns.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Team Completion model training is a Preview Feature. We look forward to your feedback as we continue to iterate.<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">Currently, the training results may vary d<\/span><span data-contrast=\"auto\">epending on the complexity of your configuration and platform settings<\/span><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">How\u00a0<\/span><span data-contrast=\"none\">do I<\/span><span data-contrast=\"none\">\u00a0create and use my own model?<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">First, ensure that \u201c<\/span><i><span data-contrast=\"auto\">C++ team models for completions<\/span><\/i><span data-contrast=\"auto\">\u201d is\u00a0<\/span><i><span data-contrast=\"auto\">Enabled<\/span><\/i><span data-contrast=\"auto\">\u00a0under\u00a0<\/span><i><span data-contrast=\"auto\">Tools &gt; Options &gt;\u00a0<\/span><\/i><i><span data-contrast=\"auto\">IntelliCode<\/span><\/i><i><span data-contrast=\"auto\">\u00a0&gt; General &gt; Preview Features<\/span><\/i><span data-contrast=\"auto\">.\u00a0<\/span><span data-contrast=\"auto\">The simplest way to train<\/span><span data-contrast=\"auto\">\u00a0and test out<\/span><span data-contrast=\"auto\">\u00a0a model\u00a0<\/span><span data-contrast=\"auto\">is via\u00a0<\/span><i><span data-contrast=\"auto\">View &gt; Other Windows &gt; Train\u00a0<\/span><\/i><i><span data-contrast=\"auto\">IntelliCode<\/span><\/i><i><span data-contrast=\"auto\">\u00a0Model for this\u00a0<\/span><\/i><i><span data-contrast=\"auto\">Repository<\/span><\/i><span data-contrast=\"auto\">.\u00a0<\/span><span data-contrast=\"auto\">This will instantly start training a model on your codebase.\u00a0<\/span><span data-contrast=\"auto\">After training, your first member list invocation will load your new Team Completions model, and subsequent invocations will\u00a0<\/span><span data-contrast=\"auto\">begin to use the new model.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\"> <img decoding=\"async\" class=\"alignnone wp-image-25599\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/02\/training.png\" alt=\"Image training\" width=\"862\" height=\"1088\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/02\/training.png 1061w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/02\/training-238x300.png 238w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/02\/training-811x1024.png 811w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/02\/training-768x969.png 768w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/>\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Anyone who has access to the\u00a0<\/span><span data-contrast=\"auto\">repo<\/span><span data-contrast=\"auto\">\u00a0will automatically get the model when they open the repo. This way your whole team can benefit without everyone needing to individually train a model.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><img decoding=\"async\" class=\"alignnone size-full wp-image-25601\" style=\"font-size: 1rem;\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/02\/customCompletion.gif\" alt=\"Image customCompletion\" width=\"645\" height=\"243\" \/><\/p>\n<p><span data-contrast=\"none\">Note<\/span><span data-contrast=\"none\">\u00a0that<\/span><span data-contrast=\"none\">\u00a0<\/span><span data-contrast=\"none\">we don\u2019t upload your raw source code to our servers. You can learn more about what happens when you train a model in\u00a0<\/span><span data-contrast=\"none\">our<\/span><span data-contrast=\"none\">\u202f<\/span><a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/intellicode\/quickstart-team-completions#what-happens-when-you-train-your-model\"><span data-contrast=\"none\">FAQ<\/span><\/a><span data-contrast=\"none\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Manually retraining your model<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">You shouldn\u2019t need to retrain your model often. You\u2019ll benefit from retraining if you\u2019ve made significant code changes that you\u2019d like to be reflected in\u00a0<\/span><span data-contrast=\"auto\">IntelliCode\u2019s<\/span><span data-contrast=\"auto\">\u00a0recommendations. In the case that you do want to retrain, you can\u00a0<\/span><span data-contrast=\"auto\">go through the same manual process from the section above.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Automatically creating and retraining a model via Azure Pipelines<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">If you don\u2019t want to have to think about retraining, you can automatically create and retrain a model as part of your continuous integration pipeline in Azure Pipelines.\u00a0<\/span><span data-contrast=\"auto\">You\u2019ll need to install the\u00a0<\/span><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=VisualStudioExptTeam.VSIntelliCodeTeamModelTraining\"><span data-contrast=\"none\">Visual Studio IntelliCode Team Model Training task<\/span><\/a><span data-contrast=\"auto\">\u00a0from Visual Studio Marketplace to your Azure DevOps organization or Azure DevOps Server. This way, when code changes are pushed to your repo, the build task\u00a0runs\u00a0and your team completions model is retrained. For more detailed instructions, please follow this document on\u00a0<\/span><a href=\"http:\/\/www.aka.ms\/vsic-ci-task\"><span data-contrast=\"none\">configuring and automating the build task<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<h3 aria-level=\"1\"><span data-contrast=\"none\">Give us your feedback<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"none\">Download\u00a0<\/span><span data-contrast=\"none\">Visual Studio 2019 version 16.5 Preview<\/span><span data-contrast=\"none\"> 3 today and give it a try. <\/span><span data-contrast=\"none\">We\u2019d love your input as we continue to improve Team Completions for C++.\u00a0<\/span><span data-contrast=\"none\">We can be reached via the comments below,\u00a0email (<\/span><a href=\"mailto:visualcpp@microsoft.com\"><span data-contrast=\"none\">visualcpp@microsoft.com<\/span><\/a><span data-contrast=\"none\">), and Twitter (<\/span><a href=\"https:\/\/twitter.com\/visualc\"><span data-contrast=\"none\">@VisualC<\/span><\/a><span data-contrast=\"none\">). The best way to file a bug or suggest a feature is via\u00a0<\/span><a href=\"https:\/\/developercommunity.visualstudio.com\/spaces\/8\/index.html\"><span data-contrast=\"none\">Developer Community<\/span><\/a><span data-contrast=\"none\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\" data-wac-het=\"1\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you\u2019ve been editing code, you may have noticed\u00a0IntelliCode\u2019s\u00a0starred recommendations in your autocompletion lists. Our previous\u00a0IntelliCode blog post\u00a0explains that these smarter suggestions were\u00a0machine-learned\u00a0over thousands of open sourced GitHub repos.\u00a0Using community knowledge is great for public APIs like the Standard Library, but what if you want\u00a0IntelliCode suggestions for your APIs and other libraries that wouldn\u2019t commonly [&hellip;]<\/p>\n","protected":false},"author":329,"featured_media":25601,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25597","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>As you\u2019ve been editing code, you may have noticed\u00a0IntelliCode\u2019s\u00a0starred recommendations in your autocompletion lists. Our previous\u00a0IntelliCode blog post\u00a0explains that these smarter suggestions were\u00a0machine-learned\u00a0over thousands of open sourced GitHub repos.\u00a0Using community knowledge is great for public APIs like the Standard Library, but what if you want\u00a0IntelliCode suggestions for your APIs and other libraries that wouldn\u2019t commonly [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/25597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/329"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=25597"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/25597\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/25601"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=25597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=25597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=25597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}