Skip to content
Branch: master
Find file History

Latest commit

v-kydela Update (#2283)
Remove broken link
Latest commit 5860897 Mar 27, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
csharp_dotnetcore Adaptive dialogs - docs, sample updates - R8 release (#2266) Mar 22, 2020
declarative Update (#2283) Mar 27, 2020
docs Adaptive dialogs - docs, sample updates - R8 release (#2266) Mar 22, 2020 Adaptive dialogs - docs, sample updates - R8 release (#2266) Mar 22, 2020

Adaptive Dialog [RC0]

See here for what's new in 4.8 RC0 release. RC0 = Release Candidate 0.

Pre-read: Dialogs library in Bot Framework V4 SDK.

Dialogs are a central concept in the Bot Framework SDK, and provide a way to manage a conversation with the user. Bot Framework V4 SDK Dialogs library offers waterfall dialogs, prompts and component dialogs as built-in constructs to model conversations via Dialogs. These set of dialog types offered by the SDK put you in control of managing your bot's conversations. However, they also require you to write a bunch of boiler plate code for sophisticated conversation modelling concepts like building a dialog dispatcher, ability to handle interruptions elegantly and to build a pluggable, extensible dialog system.

The new Adaptive dialog is a new way to model conversations that takes the best of waterfall dialogs and prompts and simplifies sophisticated conversation modelling primitives like building a dialog dispatcher and ability to handle interruptions elegantly. The new Adaptive dialog and the event model simplify sophisticated conversation modelling primitives, eliminate much of the boiler plate code and helps you focus on the model of the conversation rather than the mechanics of dialog management. An Adaptive dialog is a derivative of a Dialog and interacts with the rest of the SDK dialog system.

We set out with the following goals for Adaptive dialogs -

  • It enables you to think and model conversations as a sequence of steps but allows for rules to dynamically adjust to context - especially when users do not provide requested information in order, want to start a new conversation about something else while they are in the middle of an active dialog, etc.
  • It supports and sits on top of a rich event system for dialogs and so modelling interruptions, cancellation and execution planning semantics are lot easier to describe and manage.
  • It brings input recognition, event handling via rules, model of the conversation (dialog) and output generation into one cohesive, self-contained unit.
  • It supports extensibility points for recognition, event rules and machine learning.
  • It was designed to be declarative from the start

To get started, you can check out the various samples here. The following are additional documents to help you get oriented with some of the new concept introduced with Adaptive dialogs:

  1. Quick Start
  2. New memory model overview
  3. Adaptive dialogs - anatomy
  4. Adaptive dialogs - runtime behavior
  5. Recognizers, Generators, Triggers and Actions - references
  6. Language generation
  7. Debugging Adaptive Dialog
  8. Declarative Adaptive Dialog
  9. Generating Dialogs from Schemas
  10. Packages
  11. Reporting issues
  12. Change Log

Packages and source code

Packages for C# are available on BotBuilder MyGet. We will update this section once packages for JS is available. Source code:

Reporting issues

You can report any issues you find or feature suggestions on our GitHub repositories

Debugging Adaptive Dialog

You can use this Visual studio code debugger extension to debug both code based as well as declaratively defined Adaptive Dialogs.

Change Log

4.8 RC

  • [NEW]

    • New samples:
      • C# Getting waterfall, custom and adaptive dialogs to work in harmony
      • C# Integrating [Composer][composer] generated dialogs with existing V4 bots.
    • Adaptive actions: SetProperties, DeleteProperties, BreakLoop, ContinueLoop, DeleteActivity, GetActivityMembers, GetConversationMembers, GotoAction, SignOutUser, UpdateActivity
    • Adaptive recognizers: CrossTrainedRecognizerSet, RecognizerSet, ValueRecognizer, QnAMakerRecognizer
    • New triggers - OnQnAMatch, OnChooseIntent.
    • Adaptive dialogs now participate in being able instrument runtime operations to telemetry client.
    • You can now simply use SetProperty or SetProperties action to initialize and empty array or object. Set to ={} for object and =[] for array.

    • See here for breaking changes related to language generation and adaptive expressions.
    • Bounding character for expressions has been changed from @{expression} to ${expression}
    Old New
    new SendActivity("I have @{}") new SendActivity("I have ${}")
    new SendActivity("@{lgTemplateFoo()}") new SendActivity("${lgTemplateFoo()}")
    • Properties that accept expressions now have updated usage pattern
       // set to string `vishwac`
       new SetProperty()
          Property = "",
          Value = "Vishwac"
       // set to string `@userName`
       new SetProperty()
          Property = "",
          Value = "@userName"
       // set to the outcome of evaluating the expression '@userName'. 
       // If expression evaluates to 
       //    - string, is set to that string; 
       //    - object, then set to that object etc.
       new SetProperty()
          Property = "",
          Value = "=@userName"
       // set to string interpolated value contained in @userName. 
       // Note: If @userName evaluated to an object, will have the **string** represenatation of the object
       new SetProperty()
          Property = "",
          Value = "${@userName}"
       // string interpolation
       new SetProperty()
          Property = "",
          Value = "${name : @userName}"
    • CodeActions now expected to call endDialog when they are done.
    Old New
    return new DialogTurnResult(DialogTurnStatus.Complete, options); return await dc.EndDialogAsync(options)
    • UseLanguageGeneration moved off adapter to DialogManager
    • UseResourceExplorer moved off adapter to DialogManager
    • Use LuisAdaptiveRecognizer when for LUIS recognizer in adaptive dialogs


  • [**New] Language Generation integration has been refactored to work better with Adaptive dialogs.
    • Declarative schema for all components has been updated to now refer to $type -> $kind.
    • ActivityBuilder.GenerateFromLG has been removed and replaced with ActivityFactory.CreateActivity
    • Expressions now require to be prefixed with @. Refer to Language generation to learn more


  • [**New] Adaptive dialogs have been merged into botbuilder-dotnet master branch and now is built on top of the core SDK.
  • [**New] RegexRecognizer now supports entity extractors. See here for supported entity recognizers.
    • Renamed Steps -> Actions.
    • Actions are now List<Dialog> (instead of List<IDialog>)
    • Renamed Rules -> Triggers.
    • Triggers are now List<OnCondition> (instead of List<IRule>)
    • Updated all triggers to follow OnXXX notation.
    • Adaptive dialogs no longer have Steps tied directly to them. If you need to run a set of actions when a dialog begins, add them to the OnBeginDialog trigger.
    • Renamed, updated and streamlined properties for actions - e.g. ItemsProperty, ResultProperty and Property are consistently available where applicable (EditArray, EndDialog etc)
    • AllowInterruption property for all Input actions is now an expression, providing you more fine grained control of when you want to allow interruptions.


  • [**New] DialogManager class to help manage state persistance for Adaptive dialogs as well as ensure appropriate events are registered and routed. See here for how this gets wired up.
  • [**New] Generator property on Adaptive dialog that defines the specific language generation resources that power a particular Adaptive dialog.
  • [**New] ConversationUpdateActivityRule to help welcome users
  • Several updates to steps. Notable ones include
    • SwitchCondition step - Removed need to enclose cases in ‘’
    • IfCondition step
      • Condition no longer needs an expression().parse()
    • Normalized all input steps properties
    • [**New] steps include EmitEvent, DateTimeInput, OAuthInput, EditSteps, DebugBreak, ForEach, ForEachPage


  • Initial preview release
You can’t perform that action at this time.