.NET Smart Components experiment the “Visual Basic” of AI programming?

.NET Smart Components experiment the “Visual Basic” of AI programming?
AI programming

Microsoft has introduced experimental .NET Smart Components as an effort to make AI programming within reach for every developer.

The components are for .NET 6 or higher and designed for Blazor or ASP. NET (Razor or MVC), where they can be dropped in as replacements for their built-in equivalents. The initial set comprises Smart Paste, which interprets clipboard contents and attempts to complete forms intelligently; Smart TextArea, which adds prompts and completions when typing; and Smart ComboBox, which does semantic rather than character-based matching as a user types.

The smart components are configurable using presets. An example for the Smart TextArea given in the official repository is for a maintainer responding to GitHub issues, where the AI is informed about the role of the user and sample phrases include “could you please post a screenshot” and “we’ll need a repro.” 

Code for a Smart TextArea showing how presets identify the user role and example phrases

Although not an advanced use of AI, developers may respond to the obvious productivity gain for users of things like smart paste – presuming that it works well in practice – combined with the ease of implementation. Microsoft .Net developer and architect Steve Sanderson said in a video presentation that developers may find diving into AI programming challenging, having to learn about “Models, prompt engineering, OpenAI APIs, Semantic kernel, embedding, vector databases, quantization, Retrieval Augmented Generation” and more. By contrast, using the Smart Components looks familiar for any ASP.NET developer.

When Microsoft introduced Visual Basic for Windows programming, it made the previously intimidating task of developing a graphical user interface accessible to almost anyone. More than thirty years later, it may hope that Smart Components will do something similar for AI development – the goal, of course, being to promote use of its Azure AI services.

Regarding Smart Paste, an early response from a developer was that “I managed to integrate a PoC into an existing product in perhaps 30 minutes that worked like magic. After cautiously showing this to a couple of product people they immediately drew up a wish list.”

The project is not open source, but Sanderson wrote in a GitHub comment that “we haven’t yet got clearance to open the code, but hopefully that’s just a matter of time.”

There are concerns regarding confidentiality of data. “These components are intended to be used as part of forms that would submit to your server anyway. The data also gets sent to Azure OpenAI, which has a strict privacy policy,” said principal product manager Daniel Roth in a comment to the official post.

Another complaint is that the components are for web applications, and not for Windows desktop applications (though it is possible to wrap Blazor to run on the desktop). “We wanted to get feedback from the community first on how useful these components are before we expand them to other UI frameworks,” explained Roth. Nevertheless, the priority given to web and Blazor perhaps demonstrates how Microsoft now puts these frameworks first, with Windows desktop a secondary concern.

Developers either need to supply an OpenAI or Azure OpenAI key in order to use the new commponents, or use an alternative endpoint that is compatible with the OpenAI API schema. According to the documentation, best results require “GPT 3.5 Turbo or better.”