AI-Driven Stack Overflow Bot from Microsoft: First look

 

bot7I guess there would be very few developers who do not use StackOverflow in their day to day life. StackOverflow is part of a developer’s life.

Whenever we have some issues or doubts we go to the browser -> opens StackOverflow or search for the question on the browser -> StackOverflow link opens and then we can clear our doubts or issues.

Now imagine you have an active bot in your Visual Studio Code and as soon as you have any issues, just ask that to the bot without leaving Visual Studio Code.

Sounds interesting right?

It is possible with AI driven StackOverflow bots as Microsoft has teamed up with Stack Overflow to create a bot that will answer your programming questions from inside the Visual Studio code editor.

Let us see what are the things required to run the bot.

Requirement:

  • Node 8.1.4 or more
  • StackBot directory

Steps to run:

  • Run npm install in StackBot directory
  • Run npm start in StackBot directory
  • Navigate to http://localhost:portNumber/ to interact with bot

Please note that as this bot uses a number of services(including Bing Custom Search, LUIS, QnA Maker, and Text Analytics), you will need to create applications and generate keys for each one. Microsoft has created a GitHub page with the necessary details which can help you to guide on how to do this.

For this article, we will concentrate more on Visual Studio Code capability to run StackOverflow bot.

Configuration of the bot in Visual Studio Code

As I explained earlier, Visual Studio Code allows developers to quickly call the bot using some simple commands.

Steps:

bot8

  • From the Bot dashboard, add ‘Direct Line’ channel which will communicate with your bot’s backend service

bot9

  • Add site with appropriate name which will then redirect to the page where you can generate the tokens

bot10

Once you add a site:

bot11

  • Click on Show to view the keys:

bot12

  • Copy the tokens and go back to Visual Studio Code
  • Open user settings and add the new field named StackCode.directLineToken, assign the token you copied earlier into this field
  • If everything is done correctly, a pan would be opened which is the interactive window, nothing but the bot

Microsoft has given the bot demo in Ignite conference last month where they showed how powerful the bot is.

Let us see some examples of the bot:

Whenever you want to get help from StackOverflow, just start the StackOverflow bot:

bot1

Which will open the StackOverflow bot:

bot2

Now you can just write down your question in the text and bot will give the answers:

bot3

It can even help you if you need the code.

For example, you are in a need to convert Name+Surname into Surname, First Initial of your name.

Just ask this to the bot:

bot4

And the bot will reply the code for you with the code:

bot5

It can even read the image you uploaded into the bot.

For example, you have an exception, you take the screenshot of the exception and just upload that image into the bot:

bot6

It is really mind-blowing.

 

 

4 thoughts on “AI-Driven Stack Overflow Bot from Microsoft: First look

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s