Successfully reported this slideshow.

Azure as a Chatbot Service: From Purpose To Production With A Cloud Bot Architecture

16

Share

Upcoming SlideShare
Azure Chat Bot application
Azure Chat Bot application
Loading in …3
×
1 of 37
1 of 37

Azure as a Chatbot Service: From Purpose To Production With A Cloud Bot Architecture

16

Share

Download to read offline

Description

The tooling for building chatbots has exploded. Putting chatbots into production is now easier than ever. In this presentation, I focus on how you can use Azure Bot Service, Azure Search, and Cosmos DB to create a scalable backend for your chatbot. By using a fully managed, serverless architecture with continuous deployment, you can get your chatbot up and running quickly. Check out this deck to learn how to combine cloud computing and artificial intelligence so you can help humans and machines achieve more together.

Learn more at http://www.neona.chat

Transcript

  1. 1. Consultant, Slalom Consulting Pursuing MS in Computer Science with a Specialization in Machine Learning BS in Computer Science with an Area of Emphasis in Artificial Intelligence BA in Cognitive Science with a Focused Foundation in Artificial Intelligence www.paulprae.com @Praeducer
  2. 2. • What Are Chatbots? • Examples • Neona: A Chatbot That Teaches AI • A Cloud Bot Architecture
  3. 3. A flexible rational agent that perceives its environment and takes actions that maximize its chance of success at some goal.
  4. 4. The term "artificial intelligence” is applied when a machine mimics cognitive functions that humans associate with other human minds, such as learning and problem solving.
  5. 5. A chatbot is a service, powered by rules and sometimes artificial intelligence, that you interact with via a chat interface. The service could be any number of things, ranging from functional to fun, and it could live in any major chat product.
  6. 6. “Today, we are only scratching the surface of what AI can help us accomplish. Ultimately, we believe humans and machines will work together to solve society’s greatest challenges, to create magical experiences and change the world.”
  7. 7. The future: Conversations • Bots and agents • Expose your products and services via messaging platforms • Reach customers anywhere, on any platform or device 2000s: Mobile • Social • User download apps from App Stores 1990s: Internet • Search • User “visits” websites 1980s: PC • Desktop
  8. 8. Examples In Education AdmitHub: Smart Mobile Messaging for Your College AdmitHub is an AI-powered text messaging platform to help colleges scale student support. They build custom chatbots that automate support and “supercharge” staff. Benefits: • Students have 24/7 access to personalized guidance as they apply, enroll and advance through college. • Automated reminders and personalized resources are proven to keep students on track, impact enrollment results, and save staff time. • Bots handle repetitive tasks, collect data, and answer student questions within seconds, 24/7. They help staff focus on high-impact student support.
  9. 9. Examples In Education AdmitHub’s custom chatbot to help Georgia State students transition to college • Pounce engages in conversations with incoming Georgia State students to guide them through key steps, such as filing the FAFSA, applying for housing, and registering for classes. • A product of artificial intelligence and supervised machine learning, Pounce can also answer thousands of student questions about Georgia State, student life, campus services, financial aid, and more. • In the first month since the mid-April launch, Pounce exchanged nearly 50,000 texts with more than 3,000 admitted students to help them enroll at Georgia State.
  10. 10. Examples In Education
  11. 11. Final Project: A Conversational Agent For my final in that course, I built a chatbot. Check out the Skype demo at http://www.neona.chat.
  12. 12. Microsoft Azure
  13. 13. Bot Service Node.js Dev Bot Builder SDK Git LUIS Azure Search DocumentDB Channels
  14. 14. www.botframework.com
  15. 15. • Powerful dialog system with dialogs that are isolated and composable • Built-in prompts for simple things such as Yes/No, strings, numbers, and enumerations • Conversations are scalable to multiple machines • Built-in dialogs that utilize powerful AI frameworks such as LUIS • Built-in recognizers and event handlers that guide the user through the conversation, providing help, navigation, clarification, and confirmation as needed • Support for rich attachments (image, card, video, doc, etc.); support for calling (Skype)
  16. 16. • Register your bot • Connect to channels • Test • Publish • Manage • Measure
  17. 17. Intelligent, serverless bot service that scales on demand
  18. 18. Develop your way Integrated chat window Built in code editor </> Quick start templates
  19. 19. Channel support Direct Line support Cognitive Services Embedded web chat API
  20. 20. Scale on demand Reduced dev ops Powered by Azure Functions Continuous deployment
  21. 21. Deploy your models to an HTTP endpoint Activate models on any device Create language understanding models Use pre-built, world- class models from Bing and Cortana
  22. 22. search-as-a-service developers great search experiences applications
  23. 23. Azure DocumentDB account Databases Users Permissions 101 010 Attachments { } { } DocumentsCollections Stored procedures Triggers User-defined functions JS JS JS Resource model • Entities addressable by logical Uniform Resource Identifier (URI) • Partitioned for scale out • Replicated for high availability • Entities represented as JSON Interaction model • RESTful interaction over HTTPS • HTTPS and TCP connectivity • Standard HTTPS verbs and semantics Development • .NET, Node.js, Python, Java, and JavaScript clients • SQL for query expression, .NET LINQ • JavaScript for server-side app logic
  24. 24. Bot Service Node.js Dev Bot Builder SDK Git LUIS Azure Search Cosmos DB Channels
  25. 25. • Neona: A Conversational Agent That Teaches AI • http://blog.paulprae.com/neona-a-conversational-agent-that-teaches-ai-2/ • Build a Node.js web application using DocumentDB • https://docs.microsoft.com/en-us/azure/documentdb/documentdb-nodejs- application • Get started with Azure Search in the portal • https://docs.microsoft.com/en-us/azure/search/search-get-started-portal • Bot Framework: UniversalBot • https://docs.botframework.com/en-us/node/builder/chat/UniversalBot • Bot Framework: Understanding Natural Language • https://docs.botframework.com/en-us/node/builder/guides/understanding- natural-language
  26. 26. • Bot Builder for Node.js examples • https://docs.botframework.com/en-us/node/builder/guides/examples/ • These samples illustrate how to navigate large amounts of content • https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/demo- Search • A sample bot using IntentDialog to integrate with a LUIS.ai application • https://github.com/Microsoft/BotBuilder- Samples/tree/master/Node/intelligence-LUIS
  27. 27. Consultant, Slalom Consulting Pursuing MS in Computer Science with a Specialization in Machine Learning BS in Computer Science with an Area of Emphasis in Artificial Intelligence BA in Cognitive Science with a Focused Foundation in Artificial Intelligence www.paulprae.com @Praeducer

Editor's Notes

  • Deck can be found online at: https://www.slideshare.net/PaulPrae/azure-as-a-chatbot-service-from-purpose-to-production-with-a-cloud-bot-architecture
  • I love AI. Like many tech companies right now, I’m going all in on artificial intelligence and machine learning.

    I’m currently taking courses at Georgia Tech in pursuit of the OMSCS. My AI studies began about nine years ago at UGA.

    I’ve worked in the Microsoft ecosystem for about five years. My journey into enterprise application development started at Microsoft when I joined the company right out of college.
  • First lets go through some definitions to get our vocab straight.

    There is a lot of marketing speak about AI lately. Here is what it means to scientists and engineers working in the field.

    In the context of what most tech companies are up to, its really just smarter software.

    https://en.wikipedia.org/wiki/Artificial_intelligence
  • The everyday definition. Anyone have any examples?

    Examples:
    + Search is AI. The search engine is a rational agent. It’s goal is to find you the most relevant results. It perceives your query, tries to understand it, and retrieves related information.
    + Spell check is AI. The software program or chunk of code that checks the text for spelling errors is the rational agent. It’s goal is to find errors and maximize your text’s accuracy. It perceives what you are typing and compares the words to its knowledge base to decide if each word is spelled correctly. Its action is the red squiggly.

    These technologies have been around for decades! Research in AI has been going on since the 50’s. It’s just now becoming common place in everyday life and is becoming more impressive.

    https://en.wikipedia.org/wiki/Artificial_intelligence

    Technology is shifting its platform, utilizing artificial intelligence to create a more natural connection between humans and their devices. Between businesses and their customers.

    In essence it is where computing becomes more human.
  • https://chatbotsmagazine.com/the-complete-beginner-s-guide-to-chatbots-8280b7b906ca#.4wlwaci40

    Chatbots are computer programs that mimic conversation with people using artificial intelligence. They can transform the way you interact with the internet from a series of self-initiated tasks to a quasi-conversation.
    https://www.theguardian.com/technology/2016/apr/06/what-is-chat-bot-kik-bot-shop-messaging-platform
  • What’s a Chatbot? A natural way for us to collaborate with AI.

    Most people use lots of messaging software for communicating with friends and colleagues already, such as SMS (texting), WeChat, SnapChat, WhatsApp, Kik, Telegram, Slack, and more. Chatbots allow us to use some of these messaging platforms for lots of tasks beyond just talking to a friend. For instance, now you can book a doctor’s appointment, shop for some jeans, call an Uber, or order a pizza using chatbots rather than logging into an app. 
    http://venturebeat.com/2016/09/29/how-chatbots-will-help-education/

    Rather than having hundreds of apps on your phone with which you interact for different things, you just go to one single conversational platform of your choice and talk to agents or bots that live in that platform. https://blogs.technet.microsoft.com/machinelearning/2016/10/05/microsoft-machine-learning-data-science-summit-and-ignite-recap/

    Benefits of Bots over Apps: Imagine if you were to ask me to do something for you but every time you came up to me I told you to fill out a form first. Isn’t it easier to just tell me what you want done? Apps are often form or click based. With conversational agents you just tell them what you want.

    Reach customers anywhere, on any platform or device
    Engage with customers and users in a natural way, conversationally and in context
    Expose your products and services via messaging platforms, where users are already highly engaged
    Improve customer experience and reduce the need for human assistance
    Productivity task completion Enhance productivity through task automation and through automated workflows



  • AI is not going to replace most jobs in the near future but rather augment them. AI is mostly just tooling.

    This is the concept of augmented or extended intelligence. We are humans collaborating with machines, allowing us to do more, better, faster.
    There are many intelligent tools already available to all of us out there. Microsoft is doing their part to build intelligent apps and services for us. These are only a small sample of what is ahead.
    There are many new applications and systems left for us to build!

    https://news.microsoft.com/speeches/satya-nadella-microsoft-ignite-2016
    http://news.microsoft.com/features/democratizing-ai/#5t3OAVLgAEsIcJAV.99
  • This is a similar platform shift that we have seen in decades past
    The desktop PC in the 80’s
    Which gave birth to the web and new internet services and search
    Leading to smartphones and the age of mobile apps
    And with each of these new platforms, things became easier; the world became a little smaller and closer. But they’ve also added a layer of complexity.
    This next platform shift builds on the past but provides a new level of intelligent or AI experiences that fundamentally augments human ability that fits our behaviors vs. us having to adapt to it.
    We call this Conversations as a Platform
    It is where Natural Language becomes the user interface
    Pull from Narrative
    Where Bots are the new apps


  • Many companies are building platforms for chatbots and are making a big push. Some of the biggest players are Facebook, Slack, Amazon, IBM, and Microsoft:
    “We’re going to harness artificial intelligence to fundamentally change how we interact with the ambient computing, the agents, in our lives.”
    http://news.microsoft.com/features/democratizing-ai/#5t3OAVLgAEsIcJAV.99

    Startups are also exploding in the space, like AdmitHub. What’s interesting about these guys its not like they have a single product. They have a platform that they build customizable solutions on.

    Main site: https://www.admithub.com/
    AdmitHub integrates artificial intelligence with human expertise to guide students to and through college. We work with your institution to create a virtual campus coach that embodies the collective knowledge and unique spirit of your school community.

    Discovered on http://venturebeat.com/2016/09/29/how-chatbots-will-help-education/

    College Chatbot Service AdmitHub Raises $2.95M in Seed Funding to Guide Students Through School: https://www.edsurge.com/news/2017-01-11-college-chatbot-service-admithub-raises-2-95m-in-seed-funding-to-guide-students-through-college
  • http://blog.admithub.com/admithub-launches-first-college-chatbot-with-georgia-state

    We can create these exact kind of custom solutions for our customers and clients!
  • http://www.wsj.com/articles/if-your-teacher-sounds-like-a-robot-you-might-be-on-to-something-1462546621

    I took this same class. I did it the semester after Jill was introduced. I was able to experience Jill and Jill 2.0. Of course they were under other pseudo names. We spent al semester trying to guess who was Jill, learning at the end that there were two!

    The goal of Tech’s OMCS is to scale education. A system like Jill is perfect for helping with that.
  • You can take the same course I took for free on Udacity.

    https://www.udacity.com/course/knowledge-based-ai-cognitive-systems--ud409
  • She’s still young and learning (i.e. I’m still building). As of now she just looks up AI concepts from Wikipedia. Though she can’t teach much about AI yet, how she was built is actually a great lesson in AI. Kind of meta, right?

    http://www.neona.chat/

    You can also learn more about the AI concepts applied, how her knowledge-base was populated, and more about her architecture on my blog: http://blog.paulprae.com/neona-a-conversational-agent-that-teaches-ai-2/
  • It’s really living in the cloud!
  • It’s really living in the cloud!

    There are tutorials for how each of the pieces tie together at the end of this presentation.
  • Bot Framework provides everything you need to build and connect intelligent bots that interact naturally wherever your users are talking, from text/sms to Skype, Slack, Office 365 mail and other popular services.

    Bot Framework consists of three main components: Bot Builder SDKs, Developer Portal, and Bot Directory

    What is a bot?
    Think of a bot as an app that users interact with in a conversational way. Bots can communicate conversationally with text, cards, or speech. A bot may be as simple as basic pattern matching with a response, or it may be a sophisticated weaving of artificial intelligence techniques with complex conversational state tracking and integration to existing business services.
    The Bot Framework enables you to build bots that support different types of interactions with users. You can design conversations in your bot to be freeform. Your bot can also have more guided interactions where it provides the user choices or actions. The conversation can use simple text strings or more complex rich cards that contain text, images, and action buttons. And you can add natural language interactions, which let your users interact with your bots in a natural and expressive way.

  • Why use the Bot Framework?
    Developers writing bots all face the same problems: bots require basic I/O, they must have language and dialog skills, and they must connect to users, preferably in any conversation experience and language the user chooses. The Bot Framework provides powerful tools and features to help solve these problems.
    Bot Builder
    To help you build your bot, the Bot Framework includes Bot Builder, which provides rich and full-featured SDKs for the .NET and Node.js platforms. The SDKs provide features that make interactions between bots and users much simpler. Bot Builder also includes an emulator for debugging your bots, as well as a large set of sample bots you can use as building blocks.
    Dialog
    Dialogs help organize the logic in your bot and manage conversation flow. Dialogs are arranged in a stack, and the top dialog in the stack processes all incoming messages until it is closed or a different dialog is invoked. For example, a BrowseProducts dialog would contain only the logic and UI related to the user browsing the products; clicking the Order button would invoke the PlaceOrder dialog.

    https://docs.microsoft.com/en-us/bot-framework/overview-how-bot-framework-works
    https://docs.botframework.com/en-us/node/builder/overview/
    https://github.com/Microsoft/BotBuilder
    https://docs.botframework.com/en-us/faq/
  • Bot Framework portal
    Managing your bot is easy with the Bot Framework portal. The Bot Framework portal gives you one convenient place to register, connect, and manage your bot. It also provides diagnostic tools and a web chat control you can use to embed your bot on a web page.

    Channels
    The Bot Framework supports several popular channels for connecting your bots and people. Users can start conversations with your bot on any channel that you've configured your bot to work with, including email, Facebook, Skype, Slack, and SMS.


    https://docs.microsoft.com/en-us/bot-framework/overview-introduction-bot-framework
    https://docs.botframework.com/en-us/faq/

  • Azure Bot Service
    The Azure Bot Service provides an integrated environment purpose-built for bot development. You can write a bot, connect, test, deploy, and manage it from your web browser with no separate editor or source control required. For simple bots, you may not need to write code at all. It is powered by Microsoft Bot Framework and Azure Functions, which means that your bot will run in a serverless environment on Azure that will scale based upon demand.

    https://azure.microsoft.com/en-us/services/bot-service/
  • Accelerated development
    Speed up development by working in an integrated environment that’s purpose-built for bot development. Get started in seconds with out-of-the-box templates including basic bot, Language Understanding Intelligent Service bot, form bot, and proactive bot. Microsoft Bot Framework is built into each template to streamline your workflow.

    Continuous delivery
    Use your own tool chain and commit your code to popular source control systems such as Visual Studio Team System, GitHub, and Bitbucket, and then automatically publish your code into Azure.
  • Boosted bot intelligence
    Add the smarts to your bots with a few lines of code. Add Cognitive Services to enable your bots to see, hear, interpret, and interact in more human ways. Developers can connect to other Azure services to enrich their bots. For example, use Azure Search to create sophisticated search capabilities to your bots.

    Broader reach
    Increase your interactions and reach more customers from your website or app to email, GroupMe, Facebook Messenger, Kik, Skype, Slack, Microsoft Teams, Telegram, text/SMS, and Twilio.

    The Direct Line API is a simple REST API for connecting directly to a single bot. This API is intended for developers writing their own client applications, web chat controls, mobile apps, or service-to-service applications that will talk to their bot.
    Within the Direct Line API, you will find:
    An authentication mechanism using standard secret/token patterns
    The ability to send messages from your client to your bot via an HTTP POST message
    The ability to receive messages by WebSocket stream, if you choose
    The ability to receive messages by polling HTTP GET, if you choose
    A stable schema, even if your bot changes its protocol version

  • Operational agility
    Scale up or down on demand. As your bots grow in popularity, you only pay for what you use. You don't have to reserve resources, and you’re only charged for the number of executions and resources that you consume.
    https://azure.microsoft.com/en-us/services/bot-service
  • LUIS enables developers to build smart applications that can understand human language and react accordingly to user requests. LUIS uses the power of machine learning to solve the difficult problem of extracting meaning from natural language input.
    + Create models for your application to better understand intents or entities.
    + Use pre-built, world-class models to recognize entities like places, times, etc.
    + Deploy models to an HTTP endpoint with one click. LUIS returns easy-to-use JSON.
    + Activate your language understanding models from your application on any device.

    LUIS works seamlessly with services such as Bing Speech Api to integrate speech, Bot Framework to create chat bots, IoT devices, mobile applications, and more!

    https://www.luis.ai/
    https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/home

    Language understanding
    The interaction between users and bots is mostly free-form, so bots need to understand language naturally and contextually. The Cognitive Service Language APIs provide powerful language models to determine what users want, to identify concepts and entities in a given sentence, and ultimately to allow your bots to respond with the appropriate action. The five APIs support several text analytics capabilities, such as spell checking, sentiment detection, language modeling, and extraction of accurate and rich insights from text.
    Cognitive Services provides five APIs for language understanding:
    The Language Understanding Intelligent Service (LUIS) is able to process natural language using pre-built or custom-trained language models.
    The Text Analytics API detects sentiment, key phrases, topics, and language from text.
    The Bing Spell Check API provides powerful spell check capabilities, and is able to recognize the difference between names, brand names, and slang.
    The Linguistic Analysis API uses advanced linguistic analysis algorithms to process text, and perform operations such as breaking down the structure of the text, or performing part-of-speech tagging and parsing.
    The Web Language Model (WebLM) API can be used to automate a variety of natural language processing tasks, such as word frequency or next-word prediction, using advanced language modeling algorithms.
  • https://azure.microsoft.com/en-us/services/search/

    Why Azure Search? Developers look for PaaS services in Azure to achieve better results faster in their apps

    Get your search indices up and running quickly
    Easily scale up and down
    Connect search results to business goals with great control over search ranking
    Take advantage of Microsoft’s deep knowledge of natural language processing
    Load and update automatically with integrated indexers
    Easily add geospatial search to your app

    Search is key to many categories of applications
    Web search engines have set the bar high for search
    Instant results, auto-complete, hit highlighting, great ranking, linguistics
    Search is hard and rarely a core expertise area
    Infrastructure standpoint: availability, durability, scale, operations
    Functionality standpoint: ranking, language support, geo-spatial

    Expand the Azure data services offering with full text search capabilities
    Make data across the data stack searchable
    Combine multiple data sources, converge app data and usage signals

    https://docs.microsoft.com/en-us/bot-framework/bot-design-pattern-knowledge-base
  • It really is this easy! It took me maybe an hour to setup. This was the easiest technology I used on the entire project. It took much longer to ETL the data from Wikipedia…

    By using Azure Search, you can create an efficient search index that a bot can easily search, facet, and filter.

    Step 1: Provision service
    You can spin up an Azure Search service in the Azure portal or through the Azure Resource Management API.

    Step 2: Create index
    Before you can upload searchable content, you must first define an Azure Search index. An index is like a database table that holds your data and can accept search queries. You define the index schema to map to reflect the structure of the documents you wish to search, similar to fields in a database.

    Step 3: Index data
    Once you have defined an index, you're ready to upload content. You can use either a push or pull model.
    The pull model retrieves data from external data sources. It's supported through indexers that streamline and automate aspects of data ingestion, such as connecting to, reading, and serializing data.
    The push model is provided through the SDK or REST APIs, used for sending updated documents to an index.

    Step 4: Search
    After populating an index, you can issue search queries to your service endpoint using simple HTTP requests with REST API or the .NET SDK.


    “Search service”
    Scope for capacity
    Bound to a region
    Has keys, indexes, indexers, data sources
    Manage search traffic analytics options

    Provisioning
    Azure Portal
    Azure resource management API

    Elastic scale
    Capacity can be changed dynamically
    Replicas ~ more QPS, HA
    Partitions ~ more documents, write throughput

    “Index”
    Container for data, think “table”
    Has schema, CORS options, search options
    Create in portal or during app initialization

    Typical schema
    Fields definition: name, type, key

    Search specifics
    Field attributes – searchable, facetable, etc.
    Linguistics and analysis
    Suggesters for auto-complete
    Scoring profiles for ranking tuning

    Push - using indexing API
    POST to /indexes/<name>/docs/index
    Up to 1000 actions per batch
    Actions can be upload, merge, delete, etc.

    Pull - using indexers
    Azure SQL DB, DocumentDB, Blob Storage
    Change detection, deletion markers
    Document cracking for blobs (PDF, Office, etc.)
    Point it at the data source, define policy, done

    Search + typical data operations
    Simple search options, + - * () “”
    Choose between simple search syntax and full Lucene query language
    Filter, sort, project, page over results
    Options work with search and suggest

    Search from client or server
    Use query keys when searching from clients
    CORS allows direct calls from browsers

    Render from search results
    Include necessary non-searchable data
    E.g. URLs for pictures, keys to main content
  • So what is DocumentDB?

    DocumentDB is a NoSQL document database-as-a-service, fully managed by Microsoft Azure.

    It is a document-oriented, NoSQL database service designed for modern mobile and web applications.

    DocumentDB delivers consistently fast reads and writes, schema flexibility, and the ability to easily scale a database up and down on demand. DocumentDB enables complex ad hoc queries using a dialect of SQL, supports well-defined consistency levels, and offers JavaScript language integrated, multidocument transaction processing using the familiar programming model of stored procedures, triggers and UDFs.

    Source: https://msdn.microsoft.com/en-us/library/azure/dn781482.aspx

    DocumentDB is for cloud-designed apps when query over schema-free data; reliable and predictable performance; and rapid development are key. It’s the first of its kind database service to offer native support for JavaScript, SQL query and transactions over JSON documents.

    The key benefits of DocDB can be broken down into three pillars. We'll go into a bit more detail into how DocDB is differentiated in the market based on these pillars.
    Rich query and transaction over JSON data – which includes the concepts of query, automatic indexing, transactions, sql-like query language
    Reliable and Predictable Performance – built for the cloud, tunable consistency, elastic
    Rapid Development – Take advantage of Azure—a fully managed, enterprise-grade platform, that makes it easy to get started. Build with familiar tools (so you can bring your JSON data and take it away)

    Together, you have a service that is perfect for cloud architects and developers who need an enterprise-ready NoSQL document database.
  • As the diagram illustrates, the DocumentDB resource model consists of sets of resources under a database account, each addressable via a logical and stable URI. A set of resources is referred to as a feed in this article.

    Hierarchical resource model under a database account
    To start working with resources, you must create a DocumentDB database account using your Azure subscription.
    A database account can consist of a set of databases, each containing multiple collections, each of which in-turn contain stored procedures, triggers, UDFs, documents and related attachments. A database also has associated users, each with a set of permissions to access collections, stored procedures, triggers, UDFs, documents or attachments. While databases, users, permissions and collections are system-defined resources with well-known schemas, documents and attachments contain arbitrary, user defined JSON content.
    Database account. A database account is associated with one or more capacity units representing provisioned document storage and throughput, a set of databases and blob storage. You can create one or more database accounts using your Azure subscription.
    Database. A database is a logical container of document storage partitioned across collections. It is also a users container.
    User. The logical namespace for scoping/partitioning permissions.
    Permission. An authorization token associated with a user for authorized access to a specific resource.
    Collection. A collection is a container of JSON documents and the associated JavaScript application logic.
    Stored Procedure. Application logic written in JavaScript which is registered with a collection and transactionally executed within the database engine.
    Trigger. Application logic written in JavaScript modeling side effects associated with insert, replace or delete operations.
    UDF. A side effect free, application logic written in JavaScript. UDFs enable you to model a custom query operator and thereby extend the core DocumentDB query language.
    Document. User defined (arbitrary) JSON content. By default, no schema needs to be defined nor do secondary indices need to be provided for all the documents added to a collection.
    Attachment. Attachment are special documents containing references and associated metadata for external blob/media. The developer can choose to have the blob managed by DocumentDB or store it with an external blob service provider such as OneDrive, Dropbox, etc.

    Source: http://azure.microsoft.com/en-us/documentation/articles/documentdb-resources/

  • You don't need to change anything to continue running your apps built with SQL (DocumentDB) API. You are simply now a part of the service that gives you more capabilities at your disposal.

    Turnkey global distribution
    Multi-model + multi-API
    Limitless elastic scale around the globe
    Multiple, well-defined consistency choices
    Guaranteed low latency at 99th percentile
    Industry-leading, enterprise-grade SLAs

    https://azure.microsoft.com/en-us/blog/dear-documentdb-customers-welcome-to-azure-cosmos-db/?v=17.23h
    https://azure.microsoft.com/en-us/services/cosmos-db/?v=17.23h

  • Azure Demo:
    + https://www.luis.ai
    + https://portal.azure.com to resource group
  • Deck can be found online at: http://www.slideshare.net/PaulPrae/ai-everywhere-how-microsoft-is-democratizing-ai
  • I love AI. Like many tech companies right now, I’m going all in on artificial intelligence and machine learning.

    I’m currently taking courses at Georgia Tech in pursuit of the OMSCS. My AI studies began about nine years ago at UGA.

    I’ve worked in the Microsoft ecosystem for about five years. My journey into enterprise application development started at Microsoft when I joined the company right out of college.
  • Deck can be found online at: https://www.slideshare.net/PaulPrae/azure-as-a-chatbot-service-from-purpose-to-production-with-a-cloud-bot-architecture
  • Description

    The tooling for building chatbots has exploded. Putting chatbots into production is now easier than ever. In this presentation, I focus on how you can use Azure Bot Service, Azure Search, and Cosmos DB to create a scalable backend for your chatbot. By using a fully managed, serverless architecture with continuous deployment, you can get your chatbot up and running quickly. Check out this deck to learn how to combine cloud computing and artificial intelligence so you can help humans and machines achieve more together.

    Learn more at http://www.neona.chat

    Transcript

    1. 1. Consultant, Slalom Consulting Pursuing MS in Computer Science with a Specialization in Machine Learning BS in Computer Science with an Area of Emphasis in Artificial Intelligence BA in Cognitive Science with a Focused Foundation in Artificial Intelligence www.paulprae.com @Praeducer
    2. 2. • What Are Chatbots? • Examples • Neona: A Chatbot That Teaches AI • A Cloud Bot Architecture
    3. 3. A flexible rational agent that perceives its environment and takes actions that maximize its chance of success at some goal.
    4. 4. The term "artificial intelligence” is applied when a machine mimics cognitive functions that humans associate with other human minds, such as learning and problem solving.
    5. 5. A chatbot is a service, powered by rules and sometimes artificial intelligence, that you interact with via a chat interface. The service could be any number of things, ranging from functional to fun, and it could live in any major chat product.
    6. 6. “Today, we are only scratching the surface of what AI can help us accomplish. Ultimately, we believe humans and machines will work together to solve society’s greatest challenges, to create magical experiences and change the world.”
    7. 7. The future: Conversations • Bots and agents • Expose your products and services via messaging platforms • Reach customers anywhere, on any platform or device 2000s: Mobile • Social • User download apps from App Stores 1990s: Internet • Search • User “visits” websites 1980s: PC • Desktop
    8. 8. Examples In Education AdmitHub: Smart Mobile Messaging for Your College AdmitHub is an AI-powered text messaging platform to help colleges scale student support. They build custom chatbots that automate support and “supercharge” staff. Benefits: • Students have 24/7 access to personalized guidance as they apply, enroll and advance through college. • Automated reminders and personalized resources are proven to keep students on track, impact enrollment results, and save staff time. • Bots handle repetitive tasks, collect data, and answer student questions within seconds, 24/7. They help staff focus on high-impact student support.
    9. 9. Examples In Education AdmitHub’s custom chatbot to help Georgia State students transition to college • Pounce engages in conversations with incoming Georgia State students to guide them through key steps, such as filing the FAFSA, applying for housing, and registering for classes. • A product of artificial intelligence and supervised machine learning, Pounce can also answer thousands of student questions about Georgia State, student life, campus services, financial aid, and more. • In the first month since the mid-April launch, Pounce exchanged nearly 50,000 texts with more than 3,000 admitted students to help them enroll at Georgia State.
    10. 10. Examples In Education
    11. 11. Final Project: A Conversational Agent For my final in that course, I built a chatbot. Check out the Skype demo at http://www.neona.chat.
    12. 12. Microsoft Azure
    13. 13. Bot Service Node.js Dev Bot Builder SDK Git LUIS Azure Search DocumentDB Channels
    14. 14. www.botframework.com
    15. 15. • Powerful dialog system with dialogs that are isolated and composable • Built-in prompts for simple things such as Yes/No, strings, numbers, and enumerations • Conversations are scalable to multiple machines • Built-in dialogs that utilize powerful AI frameworks such as LUIS • Built-in recognizers and event handlers that guide the user through the conversation, providing help, navigation, clarification, and confirmation as needed • Support for rich attachments (image, card, video, doc, etc.); support for calling (Skype)
    16. 16. • Register your bot • Connect to channels • Test • Publish • Manage • Measure
    17. 17. Intelligent, serverless bot service that scales on demand
    18. 18. Develop your way Integrated chat window Built in code editor </> Quick start templates
    19. 19. Channel support Direct Line support Cognitive Services Embedded web chat API
    20. 20. Scale on demand Reduced dev ops Powered by Azure Functions Continuous deployment
    21. 21. Deploy your models to an HTTP endpoint Activate models on any device Create language understanding models Use pre-built, world- class models from Bing and Cortana
    22. 22. search-as-a-service developers great search experiences applications
    23. 23. Azure DocumentDB account Databases Users Permissions 101 010 Attachments { } { } DocumentsCollections Stored procedures Triggers User-defined functions JS JS JS Resource model • Entities addressable by logical Uniform Resource Identifier (URI) • Partitioned for scale out • Replicated for high availability • Entities represented as JSON Interaction model • RESTful interaction over HTTPS • HTTPS and TCP connectivity • Standard HTTPS verbs and semantics Development • .NET, Node.js, Python, Java, and JavaScript clients • SQL for query expression, .NET LINQ • JavaScript for server-side app logic
    24. 24. Bot Service Node.js Dev Bot Builder SDK Git LUIS Azure Search Cosmos DB Channels
    25. 25. • Neona: A Conversational Agent That Teaches AI • http://blog.paulprae.com/neona-a-conversational-agent-that-teaches-ai-2/ • Build a Node.js web application using DocumentDB • https://docs.microsoft.com/en-us/azure/documentdb/documentdb-nodejs- application • Get started with Azure Search in the portal • https://docs.microsoft.com/en-us/azure/search/search-get-started-portal • Bot Framework: UniversalBot • https://docs.botframework.com/en-us/node/builder/chat/UniversalBot • Bot Framework: Understanding Natural Language • https://docs.botframework.com/en-us/node/builder/guides/understanding- natural-language
    26. 26. • Bot Builder for Node.js examples • https://docs.botframework.com/en-us/node/builder/guides/examples/ • These samples illustrate how to navigate large amounts of content • https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/demo- Search • A sample bot using IntentDialog to integrate with a LUIS.ai application • https://github.com/Microsoft/BotBuilder- Samples/tree/master/Node/intelligence-LUIS
    27. 27. Consultant, Slalom Consulting Pursuing MS in Computer Science with a Specialization in Machine Learning BS in Computer Science with an Area of Emphasis in Artificial Intelligence BA in Cognitive Science with a Focused Foundation in Artificial Intelligence www.paulprae.com @Praeducer

    Editor's Notes

  • Deck can be found online at: https://www.slideshare.net/PaulPrae/azure-as-a-chatbot-service-from-purpose-to-production-with-a-cloud-bot-architecture
  • I love AI. Like many tech companies right now, I’m going all in on artificial intelligence and machine learning.

    I’m currently taking courses at Georgia Tech in pursuit of the OMSCS. My AI studies began about nine years ago at UGA.

    I’ve worked in the Microsoft ecosystem for about five years. My journey into enterprise application development started at Microsoft when I joined the company right out of college.
  • First lets go through some definitions to get our vocab straight.

    There is a lot of marketing speak about AI lately. Here is what it means to scientists and engineers working in the field.

    In the context of what most tech companies are up to, its really just smarter software.

    https://en.wikipedia.org/wiki/Artificial_intelligence
  • The everyday definition. Anyone have any examples?

    Examples:
    + Search is AI. The search engine is a rational agent. It’s goal is to find you the most relevant results. It perceives your query, tries to understand it, and retrieves related information.
    + Spell check is AI. The software program or chunk of code that checks the text for spelling errors is the rational agent. It’s goal is to find errors and maximize your text’s accuracy. It perceives what you are typing and compares the words to its knowledge base to decide if each word is spelled correctly. Its action is the red squiggly.

    These technologies have been around for decades! Research in AI has been going on since the 50’s. It’s just now becoming common place in everyday life and is becoming more impressive.

    https://en.wikipedia.org/wiki/Artificial_intelligence

    Technology is shifting its platform, utilizing artificial intelligence to create a more natural connection between humans and their devices. Between businesses and their customers.

    In essence it is where computing becomes more human.
  • https://chatbotsmagazine.com/the-complete-beginner-s-guide-to-chatbots-8280b7b906ca#.4wlwaci40

    Chatbots are computer programs that mimic conversation with people using artificial intelligence. They can transform the way you interact with the internet from a series of self-initiated tasks to a quasi-conversation.
    https://www.theguardian.com/technology/2016/apr/06/what-is-chat-bot-kik-bot-shop-messaging-platform
  • What’s a Chatbot? A natural way for us to collaborate with AI.

    Most people use lots of messaging software for communicating with friends and colleagues already, such as SMS (texting), WeChat, SnapChat, WhatsApp, Kik, Telegram, Slack, and more. Chatbots allow us to use some of these messaging platforms for lots of tasks beyond just talking to a friend. For instance, now you can book a doctor’s appointment, shop for some jeans, call an Uber, or order a pizza using chatbots rather than logging into an app. 
    http://venturebeat.com/2016/09/29/how-chatbots-will-help-education/

    Rather than having hundreds of apps on your phone with which you interact for different things, you just go to one single conversational platform of your choice and talk to agents or bots that live in that platform. https://blogs.technet.microsoft.com/machinelearning/2016/10/05/microsoft-machine-learning-data-science-summit-and-ignite-recap/

    Benefits of Bots over Apps: Imagine if you were to ask me to do something for you but every time you came up to me I told you to fill out a form first. Isn’t it easier to just tell me what you want done? Apps are often form or click based. With conversational agents you just tell them what you want.

    Reach customers anywhere, on any platform or device
    Engage with customers and users in a natural way, conversationally and in context
    Expose your products and services via messaging platforms, where users are already highly engaged
    Improve customer experience and reduce the need for human assistance
    Productivity task completion Enhance productivity through task automation and through automated workflows



  • AI is not going to replace most jobs in the near future but rather augment them. AI is mostly just tooling.

    This is the concept of augmented or extended intelligence. We are humans collaborating with machines, allowing us to do more, better, faster.
    There are many intelligent tools already available to all of us out there. Microsoft is doing their part to build intelligent apps and services for us. These are only a small sample of what is ahead.
    There are many new applications and systems left for us to build!

    https://news.microsoft.com/speeches/satya-nadella-microsoft-ignite-2016
    http://news.microsoft.com/features/democratizing-ai/#5t3OAVLgAEsIcJAV.99
  • This is a similar platform shift that we have seen in decades past
    The desktop PC in the 80’s
    Which gave birth to the web and new internet services and search
    Leading to smartphones and the age of mobile apps
    And with each of these new platforms, things became easier; the world became a little smaller and closer. But they’ve also added a layer of complexity.
    This next platform shift builds on the past but provides a new level of intelligent or AI experiences that fundamentally augments human ability that fits our behaviors vs. us having to adapt to it.
    We call this Conversations as a Platform
    It is where Natural Language becomes the user interface
    Pull from Narrative
    Where Bots are the new apps


  • Many companies are building platforms for chatbots and are making a big push. Some of the biggest players are Facebook, Slack, Amazon, IBM, and Microsoft:
    “We’re going to harness artificial intelligence to fundamentally change how we interact with the ambient computing, the agents, in our lives.”
    http://news.microsoft.com/features/democratizing-ai/#5t3OAVLgAEsIcJAV.99

    Startups are also exploding in the space, like AdmitHub. What’s interesting about these guys its not like they have a single product. They have a platform that they build customizable solutions on.

    Main site: https://www.admithub.com/
    AdmitHub integrates artificial intelligence with human expertise to guide students to and through college. We work with your institution to create a virtual campus coach that embodies the collective knowledge and unique spirit of your school community.

    Discovered on http://venturebeat.com/2016/09/29/how-chatbots-will-help-education/

    College Chatbot Service AdmitHub Raises $2.95M in Seed Funding to Guide Students Through School: https://www.edsurge.com/news/2017-01-11-college-chatbot-service-admithub-raises-2-95m-in-seed-funding-to-guide-students-through-college
  • http://blog.admithub.com/admithub-launches-first-college-chatbot-with-georgia-state

    We can create these exact kind of custom solutions for our customers and clients!
  • http://www.wsj.com/articles/if-your-teacher-sounds-like-a-robot-you-might-be-on-to-something-1462546621

    I took this same class. I did it the semester after Jill was introduced. I was able to experience Jill and Jill 2.0. Of course they were under other pseudo names. We spent al semester trying to guess who was Jill, learning at the end that there were two!

    The goal of Tech’s OMCS is to scale education. A system like Jill is perfect for helping with that.
  • You can take the same course I took for free on Udacity.

    https://www.udacity.com/course/knowledge-based-ai-cognitive-systems--ud409
  • She’s still young and learning (i.e. I’m still building). As of now she just looks up AI concepts from Wikipedia. Though she can’t teach much about AI yet, how she was built is actually a great lesson in AI. Kind of meta, right?

    http://www.neona.chat/

    You can also learn more about the AI concepts applied, how her knowledge-base was populated, and more about her architecture on my blog: http://blog.paulprae.com/neona-a-conversational-agent-that-teaches-ai-2/
  • It’s really living in the cloud!
  • It’s really living in the cloud!

    There are tutorials for how each of the pieces tie together at the end of this presentation.
  • Bot Framework provides everything you need to build and connect intelligent bots that interact naturally wherever your users are talking, from text/sms to Skype, Slack, Office 365 mail and other popular services.

    Bot Framework consists of three main components: Bot Builder SDKs, Developer Portal, and Bot Directory

    What is a bot?
    Think of a bot as an app that users interact with in a conversational way. Bots can communicate conversationally with text, cards, or speech. A bot may be as simple as basic pattern matching with a response, or it may be a sophisticated weaving of artificial intelligence techniques with complex conversational state tracking and integration to existing business services.
    The Bot Framework enables you to build bots that support different types of interactions with users. You can design conversations in your bot to be freeform. Your bot can also have more guided interactions where it provides the user choices or actions. The conversation can use simple text strings or more complex rich cards that contain text, images, and action buttons. And you can add natural language interactions, which let your users interact with your bots in a natural and expressive way.

  • Why use the Bot Framework?
    Developers writing bots all face the same problems: bots require basic I/O, they must have language and dialog skills, and they must connect to users, preferably in any conversation experience and language the user chooses. The Bot Framework provides powerful tools and features to help solve these problems.
    Bot Builder
    To help you build your bot, the Bot Framework includes Bot Builder, which provides rich and full-featured SDKs for the .NET and Node.js platforms. The SDKs provide features that make interactions between bots and users much simpler. Bot Builder also includes an emulator for debugging your bots, as well as a large set of sample bots you can use as building blocks.
    Dialog
    Dialogs help organize the logic in your bot and manage conversation flow. Dialogs are arranged in a stack, and the top dialog in the stack processes all incoming messages until it is closed or a different dialog is invoked. For example, a BrowseProducts dialog would contain only the logic and UI related to the user browsing the products; clicking the Order button would invoke the PlaceOrder dialog.

    https://docs.microsoft.com/en-us/bot-framework/overview-how-bot-framework-works
    https://docs.botframework.com/en-us/node/builder/overview/
    https://github.com/Microsoft/BotBuilder
    https://docs.botframework.com/en-us/faq/
  • Bot Framework portal
    Managing your bot is easy with the Bot Framework portal. The Bot Framework portal gives you one convenient place to register, connect, and manage your bot. It also provides diagnostic tools and a web chat control you can use to embed your bot on a web page.

    Channels
    The Bot Framework supports several popular channels for connecting your bots and people. Users can start conversations with your bot on any channel that you've configured your bot to work with, including email, Facebook, Skype, Slack, and SMS.


    https://docs.microsoft.com/en-us/bot-framework/overview-introduction-bot-framework
    https://docs.botframework.com/en-us/faq/

  • Azure Bot Service
    The Azure Bot Service provides an integrated environment purpose-built for bot development. You can write a bot, connect, test, deploy, and manage it from your web browser with no separate editor or source control required. For simple bots, you may not need to write code at all. It is powered by Microsoft Bot Framework and Azure Functions, which means that your bot will run in a serverless environment on Azure that will scale based upon demand.

    https://azure.microsoft.com/en-us/services/bot-service/
  • Accelerated development
    Speed up development by working in an integrated environment that’s purpose-built for bot development. Get started in seconds with out-of-the-box templates including basic bot, Language Understanding Intelligent Service bot, form bot, and proactive bot. Microsoft Bot Framework is built into each template to streamline your workflow.

    Continuous delivery
    Use your own tool chain and commit your code to popular source control systems such as Visual Studio Team System, GitHub, and Bitbucket, and then automatically publish your code into Azure.
  • Boosted bot intelligence
    Add the smarts to your bots with a few lines of code. Add Cognitive Services to enable your bots to see, hear, interpret, and interact in more human ways. Developers can connect to other Azure services to enrich their bots. For example, use Azure Search to create sophisticated search capabilities to your bots.

    Broader reach
    Increase your interactions and reach more customers from your website or app to email, GroupMe, Facebook Messenger, Kik, Skype, Slack, Microsoft Teams, Telegram, text/SMS, and Twilio.

    The Direct Line API is a simple REST API for connecting directly to a single bot. This API is intended for developers writing their own client applications, web chat controls, mobile apps, or service-to-service applications that will talk to their bot.
    Within the Direct Line API, you will find:
    An authentication mechanism using standard secret/token patterns
    The ability to send messages from your client to your bot via an HTTP POST message
    The ability to receive messages by WebSocket stream, if you choose
    The ability to receive messages by polling HTTP GET, if you choose
    A stable schema, even if your bot changes its protocol version

  • Operational agility
    Scale up or down on demand. As your bots grow in popularity, you only pay for what you use. You don't have to reserve resources, and you’re only charged for the number of executions and resources that you consume.
    https://azure.microsoft.com/en-us/services/bot-service
  • LUIS enables developers to build smart applications that can understand human language and react accordingly to user requests. LUIS uses the power of machine learning to solve the difficult problem of extracting meaning from natural language input.
    + Create models for your application to better understand intents or entities.
    + Use pre-built, world-class models to recognize entities like places, times, etc.
    + Deploy models to an HTTP endpoint with one click. LUIS returns easy-to-use JSON.
    + Activate your language understanding models from your application on any device.

    LUIS works seamlessly with services such as Bing Speech Api to integrate speech, Bot Framework to create chat bots, IoT devices, mobile applications, and more!

    https://www.luis.ai/
    https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/home

    Language understanding
    The interaction between users and bots is mostly free-form, so bots need to understand language naturally and contextually. The Cognitive Service Language APIs provide powerful language models to determine what users want, to identify concepts and entities in a given sentence, and ultimately to allow your bots to respond with the appropriate action. The five APIs support several text analytics capabilities, such as spell checking, sentiment detection, language modeling, and extraction of accurate and rich insights from text.
    Cognitive Services provides five APIs for language understanding:
    The Language Understanding Intelligent Service (LUIS) is able to process natural language using pre-built or custom-trained language models.
    The Text Analytics API detects sentiment, key phrases, topics, and language from text.
    The Bing Spell Check API provides powerful spell check capabilities, and is able to recognize the difference between names, brand names, and slang.
    The Linguistic Analysis API uses advanced linguistic analysis algorithms to process text, and perform operations such as breaking down the structure of the text, or performing part-of-speech tagging and parsing.
    The Web Language Model (WebLM) API can be used to automate a variety of natural language processing tasks, such as word frequency or next-word prediction, using advanced language modeling algorithms.
  • https://azure.microsoft.com/en-us/services/search/

    Why Azure Search? Developers look for PaaS services in Azure to achieve better results faster in their apps

    Get your search indices up and running quickly
    Easily scale up and down
    Connect search results to business goals with great control over search ranking
    Take advantage of Microsoft’s deep knowledge of natural language processing
    Load and update automatically with integrated indexers
    Easily add geospatial search to your app

    Search is key to many categories of applications
    Web search engines have set the bar high for search
    Instant results, auto-complete, hit highlighting, great ranking, linguistics
    Search is hard and rarely a core expertise area
    Infrastructure standpoint: availability, durability, scale, operations
    Functionality standpoint: ranking, language support, geo-spatial

    Expand the Azure data services offering with full text search capabilities
    Make data across the data stack searchable
    Combine multiple data sources, converge app data and usage signals

    https://docs.microsoft.com/en-us/bot-framework/bot-design-pattern-knowledge-base
  • It really is this easy! It took me maybe an hour to setup. This was the easiest technology I used on the entire project. It took much longer to ETL the data from Wikipedia…

    By using Azure Search, you can create an efficient search index that a bot can easily search, facet, and filter.

    Step 1: Provision service
    You can spin up an Azure Search service in the Azure portal or through the Azure Resource Management API.

    Step 2: Create index
    Before you can upload searchable content, you must first define an Azure Search index. An index is like a database table that holds your data and can accept search queries. You define the index schema to map to reflect the structure of the documents you wish to search, similar to fields in a database.

    Step 3: Index data
    Once you have defined an index, you're ready to upload content. You can use either a push or pull model.
    The pull model retrieves data from external data sources. It's supported through indexers that streamline and automate aspects of data ingestion, such as connecting to, reading, and serializing data.
    The push model is provided through the SDK or REST APIs, used for sending updated documents to an index.

    Step 4: Search
    After populating an index, you can issue search queries to your service endpoint using simple HTTP requests with REST API or the .NET SDK.


    “Search service”
    Scope for capacity
    Bound to a region
    Has keys, indexes, indexers, data sources
    Manage search traffic analytics options

    Provisioning
    Azure Portal
    Azure resource management API

    Elastic scale
    Capacity can be changed dynamically
    Replicas ~ more QPS, HA
    Partitions ~ more documents, write throughput

    “Index”
    Container for data, think “table”
    Has schema, CORS options, search options
    Create in portal or during app initialization

    Typical schema
    Fields definition: name, type, key

    Search specifics
    Field attributes – searchable, facetable, etc.
    Linguistics and analysis
    Suggesters for auto-complete
    Scoring profiles for ranking tuning

    Push - using indexing API
    POST to /indexes/<name>/docs/index
    Up to 1000 actions per batch
    Actions can be upload, merge, delete, etc.

    Pull - using indexers
    Azure SQL DB, DocumentDB, Blob Storage
    Change detection, deletion markers
    Document cracking for blobs (PDF, Office, etc.)
    Point it at the data source, define policy, done

    Search + typical data operations
    Simple search options, + - * () “”
    Choose between simple search syntax and full Lucene query language
    Filter, sort, project, page over results
    Options work with search and suggest

    Search from client or server
    Use query keys when searching from clients
    CORS allows direct calls from browsers

    Render from search results
    Include necessary non-searchable data
    E.g. URLs for pictures, keys to main content
  • So what is DocumentDB?

    DocumentDB is a NoSQL document database-as-a-service, fully managed by Microsoft Azure.

    It is a document-oriented, NoSQL database service designed for modern mobile and web applications.

    DocumentDB delivers consistently fast reads and writes, schema flexibility, and the ability to easily scale a database up and down on demand. DocumentDB enables complex ad hoc queries using a dialect of SQL, supports well-defined consistency levels, and offers JavaScript language integrated, multidocument transaction processing using the familiar programming model of stored procedures, triggers and UDFs.

    Source: https://msdn.microsoft.com/en-us/library/azure/dn781482.aspx

    DocumentDB is for cloud-designed apps when query over schema-free data; reliable and predictable performance; and rapid development are key. It’s the first of its kind database service to offer native support for JavaScript, SQL query and transactions over JSON documents.

    The key benefits of DocDB can be broken down into three pillars. We'll go into a bit more detail into how DocDB is differentiated in the market based on these pillars.
    Rich query and transaction over JSON data – which includes the concepts of query, automatic indexing, transactions, sql-like query language
    Reliable and Predictable Performance – built for the cloud, tunable consistency, elastic
    Rapid Development – Take advantage of Azure—a fully managed, enterprise-grade platform, that makes it easy to get started. Build with familiar tools (so you can bring your JSON data and take it away)

    Together, you have a service that is perfect for cloud architects and developers who need an enterprise-ready NoSQL document database.
  • As the diagram illustrates, the DocumentDB resource model consists of sets of resources under a database account, each addressable via a logical and stable URI. A set of resources is referred to as a feed in this article.

    Hierarchical resource model under a database account
    To start working with resources, you must create a DocumentDB database account using your Azure subscription.
    A database account can consist of a set of databases, each containing multiple collections, each of which in-turn contain stored procedures, triggers, UDFs, documents and related attachments. A database also has associated users, each with a set of permissions to access collections, stored procedures, triggers, UDFs, documents or attachments. While databases, users, permissions and collections are system-defined resources with well-known schemas, documents and attachments contain arbitrary, user defined JSON content.
    Database account. A database account is associated with one or more capacity units representing provisioned document storage and throughput, a set of databases and blob storage. You can create one or more database accounts using your Azure subscription.
    Database. A database is a logical container of document storage partitioned across collections. It is also a users container.
    User. The logical namespace for scoping/partitioning permissions.
    Permission. An authorization token associated with a user for authorized access to a specific resource.
    Collection. A collection is a container of JSON documents and the associated JavaScript application logic.
    Stored Procedure. Application logic written in JavaScript which is registered with a collection and transactionally executed within the database engine.
    Trigger. Application logic written in JavaScript modeling side effects associated with insert, replace or delete operations.
    UDF. A side effect free, application logic written in JavaScript. UDFs enable you to model a custom query operator and thereby extend the core DocumentDB query language.
    Document. User defined (arbitrary) JSON content. By default, no schema needs to be defined nor do secondary indices need to be provided for all the documents added to a collection.
    Attachment. Attachment are special documents containing references and associated metadata for external blob/media. The developer can choose to have the blob managed by DocumentDB or store it with an external blob service provider such as OneDrive, Dropbox, etc.

    Source: http://azure.microsoft.com/en-us/documentation/articles/documentdb-resources/

  • You don't need to change anything to continue running your apps built with SQL (DocumentDB) API. You are simply now a part of the service that gives you more capabilities at your disposal.

    Turnkey global distribution
    Multi-model + multi-API
    Limitless elastic scale around the globe
    Multiple, well-defined consistency choices
    Guaranteed low latency at 99th percentile
    Industry-leading, enterprise-grade SLAs

    https://azure.microsoft.com/en-us/blog/dear-documentdb-customers-welcome-to-azure-cosmos-db/?v=17.23h
    https://azure.microsoft.com/en-us/services/cosmos-db/?v=17.23h

  • Azure Demo:
    + https://www.luis.ai
    + https://portal.azure.com to resource group
  • Deck can be found online at: http://www.slideshare.net/PaulPrae/ai-everywhere-how-microsoft-is-democratizing-ai
  • I love AI. Like many tech companies right now, I’m going all in on artificial intelligence and machine learning.

    I’m currently taking courses at Georgia Tech in pursuit of the OMSCS. My AI studies began about nine years ago at UGA.

    I’ve worked in the Microsoft ecosystem for about five years. My journey into enterprise application development started at Microsoft when I joined the company right out of college.
  • Deck can be found online at: https://www.slideshare.net/PaulPrae/azure-as-a-chatbot-service-from-purpose-to-production-with-a-cloud-bot-architecture
  • More Related Content

    ×