SYS-CON MEDIA Authors: Pat Romanski, Gary Arora, Zakia Bouachraoui, Yeshim Deniz, Liz McMillan

Blog Feed Post

How to: Use QnA Maker with Azure Function Bots

I have been working with bots a bit lately and wanted to share some of my experiences.  QnA Maker makes it really easy to built a bot to serve up a knowledge base based on simple question and answer pairs that you populate it with.  After you publish your knowledgebase with QnA Maker, it's a bit tricky to figure out what to do next.  When you click Publish, you get a screen like this.

Screen Shot 2018-03-09 at 10.19.30 AM

While this is useful information if you were going to interact with your bot directly via REST.  It doesn't tell you how to turn this into a bot.  In fact if you look for information on how to do this with an Azure Functions Bot, you'll find very little on it.  That's because all of the documentation and examples out there tell you how to do it with Bot Framework / Bot Service which is deprecated in lieu of the new Azure Functions Bot or Web App Bot. That's why I created this post to walk you through it.

Start by creating a new Functions Bot or Web App Bot.  The difference really just depends on how you want to pay for your consumption.  If you are just experimenting, I would probably go with a Functions Bot.  You can find both under AI + Cognitive Services.

Screen Shot 2018-03-09 at 10.37.34 AM

You'll need to give your bot a unique name.  You'll select the typical things like the Location, Azure Storage account, and Resource Group.  The key things you want to set are the Pricing tier and the Bot template.  For Pricing tier use F0 which includes 10K Premium Messages

Screen Shot 2018-03-09 at 10.40.47 AM

For the Bot template, click on it choose either C# or Node.js and be sure and choose Question and Answer.

Screen Shot 2018-03-09 at 10.40.13 AM

You also want to set your Hosting Plan.  I am going with Consumption Plan but this is really up to you.

Once your bot is provisioned, we now need to adjust a few settings.  This part used to be clearer with the old Bot Service stuff.  Click on Application Settings.

Screen Shot 2018-03-09 at 10.46.35 AM

Now we need a few values from QnA Maker.  Remember the publish screen?  It has the values we need.  We need the values for QnAKnowledgebaseId and QnASubscriptionKey.

Screen Shot 2018-03-09 at 10.19.30 AM

You can find QnAKnowledgebaseId in the GUID of the first line of the POST statement.  So in this case, mine is 73d71520-4c66-45ee-8fbf-acfeef3d1b05.

You can find QnASubscriptionKey in the third line Ocp-Apim-Subscription-Key.  In this case, mine is 9343c969f7ab4ac28b559c87ae6eb3d0.

Now we need to set these values in our Application Settings at the very bottom of the list.

Screen Shot 2018-03-09 at 10.53.32 AM

That's all you need to do.  Once you have configured those settings, your QnA bot is ready to go.  Try it out for yourself!

Read the original blog entry...

More Stories By Corey Roth

Corey Roth, a SharePoint Server MVP, is an independent consultant specializing in Cloud technologies such as Azure and Office 365. He also specializes in mobile development. Corey serves as the product manager for two cloud-first mobile app platforms: BrewZap and HappenZap.

Latest Stories
Every organization is facing their own Digital Transformation as they attempt to stay ahead of the competition, or worse, just keep up. Each new opportunity, whether embracing machine learning, IoT, or a cloud migration, seems to bring new development, deployment, and management models. The results are more diverse and federated computing models than any time in our history.
On-premise or off, you have powerful tools available to maximize the value of your infrastructure and you demand more visibility and operational control. Fortunately, data center management tools keep a vigil on memory contestation, power, thermal consumption, server health, and utilization, allowing better control no matter your cloud's shape. In this session, learn how Intel software tools enable real-time monitoring and precise management to lower operational costs and optimize infrastructure...
"Calligo is a cloud service provider with data privacy at the heart of what we do. We are a typical Infrastructure as a Service cloud provider but it's been designed around data privacy," explained Julian Box, CEO and co-founder of Calligo, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Isomorphic Software is the global leader in high-end, web-based business applications. We develop, market, and support the SmartClient & Smart GWT HTML5/Ajax platform, combining the productivity and performance of traditional desktop software with the simplicity and reach of the open web. With staff in 10 timezones, Isomorphic provides a global network of services related to our technology, with offerings ranging from turnkey application development to SLA-backed enterprise support. Leadin...
While a hybrid cloud can ease that transition, designing and deploy that hybrid cloud still offers challenges for organizations concerned about lack of available cloud skillsets within their organization. Managed service providers offer a unique opportunity to fill those gaps and get organizations of all sizes on a hybrid cloud that meets their comfort level, while delivering enhanced benefits for cost, efficiency, agility, mobility, and elasticity.
DevOps has long focused on reinventing the SDLC (e.g. with CI/CD, ARA, pipeline automation etc.), while reinvention of IT Ops has lagged. However, new approaches like Site Reliability Engineering, Observability, Containerization, Operations Analytics, and ML/AI are driving a resurgence of IT Ops. In this session our expert panel will focus on how these new ideas are [putting the Ops back in DevOps orbringing modern IT Ops to DevOps].
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the University of Cambridge, Darktrace's Enterprise Immune System is the first non-consumer application of machine learning to work at scale, across all network types, from physical, virtualized, and cloud, through to IoT and industrial control systems. Installed as a self-configuring cyber defense platform, Darktrace continuously learns what is ‘normal' for all devices and users, updating its understa...
Enterprises are striving to become digital businesses for differentiated innovation and customer-centricity. Traditionally, they focused on digitizing processes and paper workflow. To be a disruptor and compete against new players, they need to gain insight into business data and innovate at scale. Cloud and cognitive technologies can help them leverage hidden data in SAP/ERP systems to fuel their businesses to accelerate digital transformation success.
Most organizations are awash today in data and IT systems, yet they're still struggling mightily to use these invaluable assets to meet the rising demand for new digital solutions and customer experiences that drive innovation and growth. What's lacking are potent and effective ways to rapidly combine together on-premises IT and the numerous commercial clouds that the average organization has in place today into effective new business solutions.
Concerns about security, downtime and latency, budgets, and general unfamiliarity with cloud technologies continue to create hesitation for many organizations that truly need to be developing a cloud strategy. Hybrid cloud solutions are helping to elevate those concerns by enabling the combination or orchestration of two or more platforms, including on-premise infrastructure, private clouds and/or third-party, public cloud services. This gives organizations more comfort to begin their digital tr...
Keeping an application running at scale can be a daunting task. When do you need to add more capacity? Larger databases? Additional servers? These questions get harder as the complexity of your application grows. Microservice based architectures and cloud-based dynamic infrastructures are technologies that help you keep your application running with high availability, even during times of extreme scaling. But real cloud success, at scale, requires much more than a basic lift-and-shift migrati...
David Friend is the co-founder and CEO of Wasabi, the hot cloud storage company that delivers fast, low-cost, and reliable cloud storage. Prior to Wasabi, David co-founded Carbonite, one of the world's leading cloud backup companies. A successful tech entrepreneur for more than 30 years, David got his start at ARP Instruments, a manufacturer of synthesizers for rock bands, where he worked with leading musicians of the day like Stevie Wonder, Pete Townsend of The Who, and Led Zeppelin. David has ...
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the University of Cambridge, Darktrace's Enterprise Immune System is the first non-consumer application of machine learning to work at scale, across all network types, from physical, virtualized, and cloud, through to IoT and industrial control systems. Installed as a self-configuring cyber defense platform, Darktrace continuously learns what is ‘normal' for all devices and users, updating its understa...
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Addteq is a leader in providing business solutions to Enterprise clients. Addteq has been in the business for more than 10 years. Through the use of DevOps automation, Addteq strives on creating innovative solutions to solve business processes. Clients depend on Addteq to modernize the software delivery process by providing Atlassian solutions, create custom add-ons, conduct training, offer hosting, perform DevOps services, and provide overall support services.