Intelligent customer service building (5)-one of the five steps to define the dialogue system

The next five blogs will carefully learn from the five steps of building a dialogue system.

2020.12.23 Insert: This blog really gave me an overall understanding of the process of building a dialogue system.
2020.12.26 inserted; solve the problem of messy typesetting.

Smart customer service building column
Welcome everyone to learn together (# . #).

1. Methods of defining dialogue systems

The following methodology is actually defining the dialogue system, the latter

  • Determine the boundary of the scene
  • Sort out business elements and knowledge base
  • Write storyline
  • The extraction dialogue process
    is the concrete development of the following methodology.
    Insert picture description here

Second, determine the boundary of the scene

1. Create robot positioning (robot character positioning)

Insert picture description here

2. Clarify the product scenario of the robot

  1. Identify the target group of the product.
    For example: Knowing the ball is for the fans
  2. Find out which services/products the product brings to the target population.
    For example: Ctrip provides online ticket purchase services, understands the latest football advice and can also purchase football equipment.
  3. To understand what kind of people the user is, what services our products bring to them, and what pain points are solved, then the whole logic is this robot.


Example : Chatbot for train ticket booking should do & shouldn’t do
Insert picture description here
Review: Robot classification
Insert picture description here

Case:

Insert picture description here

3. Sort out business elements and knowledge base

1. Determine the priority (the first function to be realized) and the key information elements (the information needed to realize the function)

Insert picture description here

  • Key information as much as possible
    Insert picture description here

2. Sort out task elements (define variables)

Sort out the task elements according to the previous state diagram
Insert picture description here
Insert picture description here

Fourth, write a story line

  • One suggestion: don’t draw a flowchart first

Mission storyline

Wrong approach

凭借自己的想象和仅有的逻辑构想如下图所示的对话逻辑。

Insert picture description here

Correct way

 撰写一个任务的完整对话,我们称之为“愉悦路径”,然后再“添油加醋”。
 个人认为,类似于你设计一个主线任务,得先考虑理想情况下的任务完成路径,然后再一步步设置难度,比如说加个打怪,比如说加个等级限制等等,我称之为添油加醋。

Insert picture description here

		总结:最大可能的模拟各种情况,通过自己的想象力构建不同的问答情况并作出解答,然后就是美化我们的对话系统,比如加个UI,比如更为合适的对话用词。

Question-and-answer storyline

This is more suitable for our intelligent customer service system

A magic weapon: List all possible Q&A pairs as much as possible. Because the question and answer type is this kind of question and answer matching question, the more complete the question and answer pair, that is, the more complete our knowledge base, the easier it is to reflect intelligence.

Insert picture description here

note

所有的故事线要保证真实性,尽可能还原真实场景对话,不能为了写故事线而写故事线。

Five, extract the dialogue process

Method 1: Flow chart

The short answer is to draw a flowchart

一个法宝:有点类似于面向过程程序设计,即将对话流程化。任务型和问答型机器人都有这种特点,但我感觉问答型要比知识型简单。毕竟不需要过多的信息也不用接入第三方服务。

Take the booking flowchart as an example:
Insert picture description here

The yellow module is very general and can be more detailed

Insert picture description here

总结:业务流程图描述的是完整的业务流程,以业务处理过程为中心,一般没有数据的概念。流程图以动作推进业务,更加关注的是业务需要完成哪些操作。每一个动作基本上是“动词加名词”或者“动词”的形式。

Method 2: Swim lane diagram

泳道图又称跨职能流程图=流程图+动作执行的对象

Swim lane diagram

A process description can also be added to the swim lane diagram to better describe the process.

Consolidation of business lines (similar to the third step)

存在的价值:便于更好地设计/梳理流图

Consolidation of business lines

Flowchart drawing tool

  1. ProcessOn
  2. Baidu Brain Map

Insert picture description here

Six, design UNIT dialogue logic

1. Sort out business logic

简单来说就是考虑真实场景下会有哪些情况出现,然后抽象出来给BOT

Insert picture description here

2. Configure the dialog intention/question and answer intention of the skill

Goal: Teach the business logic to the dialogue system
== "Each skill is composed of related intents
== "According to the business logic of 1 above, complete the specific configuration of each dialogue intent and question and answer intent under the skill

In this link, the dialogue system needs to learn:

  1. What is the user's intention?
  2. What key information needs to be understood to complete the user's intention?
  3. How should the dialogue system respond to users?
  4. What are the rules to follow?

#Take a ticket as an example:
PS: clarify how to ask the user to
Insert picture description here
summarize : configure the dialog intention/question and answer intention steps of the skill:

  1. New dialogue intention (eg: intention name: BOOK_TICKET, intention alias: booking)

  2. Add word slot

  3. Set BOT response (there are three response methods: [Response], [Guide to dialogue intention], [Guide to question and answer intention])

note:

1. When actually landing, you need to determine in your business code that the current BOT analysis user intention is to book a ticket, and the user provides the departure time, departure station, and arrival station. At this time, you use these three word slots to go to the train ticket. The system finds out the train tickets that meet the conditions, and generates a train ticket list to return to the user for the user to choose and complete the payment. (Task robot)

2. Guide to the dialogue intention: when the current dialogue meets certain conditions, the current intention is guided to another dialogue intention, allowing the user to enter the dialogue of another intention.

3. Guide to the question and answer intention: when the current dialogue meets certain conditions, the current intention is guided to another question and answer intention, allowing the user to directly ask questions and obtain answers under the target question and answer intention. (Question-and-answer robot)

  1. New question and answer intent

  2. Set up pre-made skills (small chat, greetings, instructions, etc.)

3. Annotate dialogue data

在【效果优化--训练数据】里尽可能多地添加对话模板、对话样本。其中对话样本不要是我们想象出来的句子,而是要贴切真实的业务场景(故事线设计的真实性,同 四、设置故事线部分)。对话BOT就像个儿童,教的越多越聪明。

Specific method:
1. Configure the dialog template

对话模板是对用户需求表达的一种规则抽象、配置好对话模板,可以快速识别不同表达方式的用户需求。
比如:“我想订餐” ==》订餐就可以形成一个对话模板

2. Annotate the sample dialogue

需求分析最后一个阶段收集到的对话数据导入UNIT平台,然后给它们逐条标注意图、词槽。这部分数据可以用于后续的样本学习,让对话机器人更加智能,获得更好的对话理解泛化能力。

3. Add Q&A pairs

在需求分析阶段(主要集中在梳理业务要素和确定故事线阶段)就收集整理的问答对数据集中导入UNIT平台。

Answer to the question: In
short, there is nothing to add to the best.
Insert picture description here

4. Training/Experience

将BOT技能配置、对话模板、对话样本等在系统里训练形成模型,然后将模型放到沙盒里就可以试着体验自己的对话系统了。
		
值得注意:UNIT背后的深度学习等技术会帮我们解决训练系统这个问题,但也需要我们反复验证发现问题并优化配置并不断补充对话样本,然后再训练模型。这是一个反复优化的过程。

Experience display (finally see the result):

Insert picture description here

5. Application call

Link with real business.

 在【发布上线- -沙盒/生产环境】可以前往百度云创建应用,获取调用BOT的API Key/Secret Key。这部分可参考UNIT的API文档。UNIT已经与百度其他AI技术打通了 ,创建一个应用后,就可以方便的调用到百度AI的语音、图像识别等所有能力!

UNIT api document, please click the link below:
Smart Customer Service Building (0)-write in front

Guess you like

Origin blog.csdn.net/qq_49821869/article/details/111501451