A dialog manager (DM) is a component of a dialog system (DS), responsible for the state and flow of the conversation. Usually:
The input to the DM is the human utterance, usually converted to some system-specific semantic representation by the Natural language understanding (NLU) component. For example, in a flight-planning dialog system, the input may look like "ORDER(from=TA,to=JER,date=2012-01-01)". The DM usually maintains some state variables, such as the dialog history, the latest unanswered question, etc., depending on the system. The output of the DM is a list of instructions to other parts of the dialog system, usually in a semantic representation, for example "TELL(flight-num=123,flight-time=12:34)". This semantic representation is usually converted to human language by the Natural language generation (NLG) component. There are many different DMs that fulfill very different roles. There can even be several DM components in a single DS. The only thing common to all DMs is that they are stateful, in contrast to other parts of the DS (such as the NLU and NLG components), which are just stateless functions. The DM roles can roughly be divided into these groups:
Input-control, which enable context-dependent processing of the human utterances. Output-control, which enable state-dependent generation of text. Strategic flow-control, which decide what action the dialog agent should take at each point of the dialog. Tactic flow-control, which make some tactical conversational decisions (error handling, initiative control, etc.).
Input-control DM The human input has different meanings depending on the context. For example, in a travel-planning DS:
Computer: Where do you want to depart from? Human: Tel Aviv. Computer: Where do you want to arrive at? Human: Gaza. The meaning of the city name depends on the previously asked question. A DM may keep that question in a state variable, and use it to convert "Tel Aviv" to "I want to depart from Tel Aviv", and convert "Gaza" to "I want to arrive at Gaza". This function is on the border between NLU and DM: in some systems it's included in the NLU, such as the context-dependent rules of Milward (2000); while in other systems it is included in the DM, such as the NP resolution module of Mirkovic and Cavedon (2005). Another function between the NLU and DM is, determining which input utterances are part of a single utterance. Here is an example from a job negotiation dialog:
I offer a salary of 20,000 NIS and a car The pension conditions will be decided later All three utterances are actually a single offer. For the second utterance, the word "and" is a clue, but for the third utterance the only possible clue is that it was said immediately after the second one. To understand this, the DM should probably keep a timestamp of each utterance.
Output-control DM The computer output may be made more natural, by remembering the dialog history. For example, NPCEditor (a framework for authoring characters that answer human questions) allows the author to define question-answer pairs, such that for each question there are several possible answers. The DM selects the best answer for the question, unless it was already used, in which case it selects the 2nd best answer, etc. A similar feature exists in ChatScript (a framework for authoring chatter-bots): Each time the DS uses a certain rule, the DM marks this rule as "used", so that it won't be used again. A recent DS for technical assistance uses advanced machine-learned rules to select the best terms for describing items. For example, if the DM notices that it's speaking with an adult, it will use terms such as "the left hand"; if it notices that it's speaking with a child, it will use less technical terms such as "the hand where you wear the clock". This function is on the border between DM and NLG.
Strategic flow-control DM The main role of a DM is to decide what action the dialog agent should take at each point of the dialog. A simple way to do this is to let the author completely specify the dialog structure. For example, a specification of a tutorial dialog structure may look like:
Computer: "What forces act on the electron?" Human: "Electric force". Computer: "Correct" [go to next question] Computer: "What forces act on the mass?" Human: "Electric force". Computer: "Incorrect, the mass has no charge". [go to a tutorial about electricity] The DM keeps a pointer to our current position in the script. The position is updated according to the human input. There are many languages and frameworks that allow authors to specify dialog structures, such as: VoiceXML (optimized for speech dialogs), AIML, Facade and ChatScript (optimized for chat-bots), CDM (Java-based, optimized for device-control dialogs), and TuTalk (optimized for tutorial dialogs). Additionally, the dialog structure can be described as a state-chart, using a standard language such as SCXML. This is done in DomainEditor (a framework for tactical questioning characters). It is quite tedious for authors to write a full dialog structure. There are many improvements that allow authors to describe a dialog in a higher abstraction level, while putting more burden on the DM.
Hierarchical structure Ravenclaw (a DM for goal-oriented dialogs, based on the CMU communicator) allows the author an advanced, multi-level dialog structure description, such as:
Room reservation task: Login Ask user name Ask user password Room selection Building selection Room number selection Time selection Finish The Ravenclaw DM keeps a stack of dialog modules, and uses it to process the human input. This structure encourages code reuse, for example, the login module can be used in other dialogs. They also claim to allow dynamic dialog-task construction, where the structure is not fixed in advance but constructed on the fly, based on information selected from a backend. For instance, in a system that helps aircraft maintenance personnel throughout the execution of maintenance tasks, the structure of the dialog depends on the structure of the maintenance task and is constructed dynamically.
Topic tracking Frameworks for chatter-bots, such as ChatScript, allow to control the conversation structure with topics. The author can create rules that capture the topic that
… excerpt ends here. Continue reading the full article.