AI-Powered Autocomplete For Code? Microsoft and GPT-3 Have You Covered

Turn natural speech into snippets of code

Antony Terence
Level Up Coding

--

Photo by Joshua Aragon on Unsplash

Last year, Microsoft expanded its partnership with OpenAI, an artificial intelligence research firm based in San Francisco. Here’s the kicker: Microsoft now has access to an exclusive license to the GPT-3 language model. If you’ve seen AI-written articles or the text-based adventure game that flexes its AI chops, you know that this merits a second look.

And now the Redmond giant has developed yet another use case for the model: transforming natural language into code. The new tool can only develop formulas in Microsoft Power Fx (a language based on Microsoft Excel queries). But it’s a start. And the possibilities are endless.

Autocomplete: A coder’s dream come true

Microsoft’s Power Fx was developed with the goal of blurring the line between makers and developers. Its “low code, no code” is primarily targeted at the enterprise level. But with the help of a predictive model like GPT-3, these benefits could soon trickle down to programmers working on data analytics and visualization.

Microsoft demonstrated GPT-3's prowess with a real-life scenario, that of beverage behemoth Coca-Cola. The firm uses an app to keep track of its cola concentrate supplies. The app could be modified as if it were no less than a Word document. I’ve seen friends across domains find this sort of data organization an absolute mess and it’s great to see technology offer a solution. As for specific queries, these still require Microsoft Power Fx formulas to function. And this is where Microsoft’s new tool enters the picture.

A glance at Microsoft’s Power Fx code made me think of SQL queries. And while those aren’t notorious for their difficulty, learning basic queries would still add some friction to one’s workflow. Thanks to a new update, users can simply write their queries in natural language. GPT-3 takes care of the rest, converting it into Power Fx database queries. Non-coders now have access to a tool that has the potential to revamp their workflows.

A preview of Microsoft’s natural language translation in action. Source: Microsoft.

Autocomplete isn’t complete just yet

While this tool is a step in the right direction, it is by no means perfect. AI language models have the tendency to mix words and phrases to deliver results entirely out of context. And this means that one might need coding experience to verify the results of said programs, defeating the tool’s very purpose. But with simple code like Microsoft’s Power Fx, that might not be a constraint.

“It’s data-binding, single-line expressions; there’s no concept of build and compile. What you write just computes instantly.”
— Charles Lamanna, CVP of Microsoft’s Low Code Application Platform

The Verge notes that Power Apps will require users to confirm all Power Fx formulas generated as an additional buffer. I hope people don’t just click the first autocomplete suggestion as if it were a Google search. And while these language models have had instances of demonstrating bias in the past, I believe it will not hamper the user’s ability to work with (most) database queries. Microsoft seems to have a couple of fixes in mind for this as well.

Combating bias tendency

Resolving bias in our machine learning models is no simple feat. And it has had repercussions in the past, especially in the domain of hiring employees. One does not simply forget the medical AI chatbot that told a mock patient to kill themselves. Any form of inconsistency is absolutely unacceptable in fields like healthcare. The Verge reports that if Microsoft’s system produces something that it deems a cause for concern, it will prompt users to reach out to tech support. While this no-code solution is by no means flawless, it is still a step in the right direction.

No code queries can have applications beyond Microsoft’s expansive suite of business-focused applications. Coders could one day blur the line between basic programming and a weaker no-code alternative. It gives millions of users the ability to develop things they could not create before. With these tools more accessible than ever, there’s no telling what’s in store for the future. There’s no doubt that AI autocomplete is here to stay. And it intends to make your stay better too.

--

--

0.2M+ views. 5x Top Writer. Warping between games, tech, and fiction. Yes, that includes to-do lists. Words in IGN, Kotaku AU, SUPERJUMP, The Startup, and more.