The invention relates to a scenario generation apparatus and a scenario generation method for generating scenarios for use in chatbot, and further relates to a computer-readable recording medium that has a program for realizing the apparatus and method recorded thereon.
In recent years, chatbot has been used in call centers of manufacturers and the like. Chatbot is a program that automatically executes a conversation by text or voice. There are two types of chatbot: question-and-answer type and scenario type.
The question-and-answer type chatbot is a chatbot that outputs one answer to the input question when one question is input (see, for example, Patent Documents 1 and 2). In a question-and-answer chatbot, the system extracts keywords from the question, searches for answers from a database prepared in advance using the extracted keywords as a query, and outputs the searched answers. The question-and-answer chatbot is useful when the user wants to ask questions freely.
The scenario-type chatbot is a chatbot that outputs an answer to a question according to a scenario composed of a flow diagram (see, for example, Patent Document 3). In the scenario-based chatbot, when a user selects a question from options presented, the system follows the scenario based on the selected question, identifies the corresponding answer, and outputs the specified answer. The scenario-type chatbot can guide the user to the answer requested by the user. The scenario type chatbot is useful when the content of the inquiry is roughly fixed, such as in a call center.
Further, in the scenario-type chatbot, when a certain answer is reached, if another answer useful for the user can be presented at the same time, the convenience for the user is improved. Therefore, in the scenario, a link is set between the related answers.
However, in the scenario-type chatbot, if the link is not set properly, the user will follow the link unnecessarily, and it will be difficult for the user to efficiently obtain necessary information. In creating a scenario, since a person usually sets the link manually in consideration of the content, it becomes difficult to set the link appropriately as the amount of information increases. For this reason, it is required to be able to appropriately set the link of the scenario without manually setting it.
An example of an object is to solve the aforementioned problem, and to provide a scenario generation apparatus, a scenario generation method, and a computer-readable recording medium that can set a link automatically in a scenario generation of chatbot.
In order to achieve the above-described object, a scenario generation apparatus according to an example aspect of the invention includes:
In addition, in order to achieve the above-described object, a scenario generation method according to an example aspect of the invention includes:
Furthermore, in order to achieve the above-described object, a computer readable recording medium according to an example aspect of the invention that includes a program recorded thereon, the program including instructions that cause a computer to carry out:
As described above, according to the present invention, it is possible to set a link automatically in a scenario generation of chatbot.
(Example Embodiment)
The following describes a scenario generation apparatus, a scenario generation method, and a program according to the example embodiment with reference to
[Apparatus Configuration]
First, the schematic configuration of the scenario generation apparatus in the example embodiment will be described with reference to
The scenario generation apparatus 10 according to the example embodiment illustrated in
In this configuration, the keyword selection unit 11 extracts a hierarchical structure from documents having a hierarchical structure and selects keywords from the headings in each layer of the extracted hierarchical structure. In addition, the documents are the basis of the scenario of the chatbot.
The link candidate generation unit 12 generates a first scenario candidate in which a link is set between the keywords by using the documents. In addition, the link candidate generation unit 12 also generates a second scenario candidate in which a link is not set between the keywords by using documents.
The evaluation value calculation unit 13 calculates a evaluation value for the link for each of the generated first scenario candidate and the generated second scenario candidate according to a setting rule. The scenario generation unit 14 adopts one of the scenario candidates based on the calculated evaluation value and generates the scenario using the adopted scenario candidate.
In this way, in the example embodiment, based on the keywords selected from the headline, the case where there is a link between the keywords and the case where there is no link between the keywords are evaluated, and the link is appropriately set without manual setting. Therefore, according to the example embodiment, the link can be automatically set in the scenario generation of the chatbot.
Next, the configuration and function of the scenario generation apparatus 10 according to the example embodiment will be described more specifically with reference to
As illustrated in
The data acquisition unit 15 acquires documents that are the basis of a chatbot scenario from a device outside the scenario generation device 10, such as a server device, a terminal device, and a storage device, via a network. Then, the data acquisition unit 15 passes the acquired documents to the keyword selection unit 11.
Further, in the example embodiment, the data acquisition unit 15 also acquires the browsing history of the documents that is the basis of the scenario from the above-mentioned device via the network. The data acquisition unit 15 stores the acquired browsing history of the documents (hereinafter referred to as “browsing history”) in the browsing history storage unit 16. The browsing history stored in the browsing history storage unit 16 is used for calculating the evaluation value by the evaluation value calculation unit 13.
The keyword selection unit 11 extracts, for example, a hierarchical structure as illustrated in
Further, in the example embodiment, the keyword selection unit 11 may select only the keywords satisfying the setting condition when selecting the keywords from the headings of each layer of the hierarchical structure.
As the setting condition, for example, the frequency of appearance is below the threshold. Further, in the example embodiment, after the keyword selection unit 11 selects the keyword, the keyword may be manually filtered according to the setting condition. In these case, the link candidate generation unit 12 generates the scenario candidates using the filtered keywords.
In the example embodiment, the link candidate generation unit 12 generates the first scenario candidate and the second scenario candidate according to the number of selected keywords. Specifically, assuming that the number of keywords is “n”, the link candidate generation unit 12 generates a total of “2n” first scenario candidates and second scenario candidates. For example, assuming that the selected keywords are A, B, and C, the link candidate generation unit 12 generates 23 (=8) scenario candidates as shown in below (there are seven first scenario candidates and one second scenario candidate).
Further, at this time, the link candidate generation unit 12 sets a link between keywords existing in different branches and generates a first scenario candidate. That is, the link candidate generation unit 12 generates the first scenario candidate without setting a link between the ancestor-descendant relationship. In order to prevent the number of links from increasing too much, the link candidate generation unit 12 can set a link only to the node at the lowest layer when there is a plurality of link destinations in the ancestor-descendant relationship.
In the example embodiment, there is the browsing history for the document. Therefore, the evaluation value calculation unit 13 calculates, as the evaluation value, at least one of the length of the path between headings, the number of choices in the path between headings, and the number of characters in the choices in the path between headings, when browsing history is applied, each of the first scenario candidate and the second scenario candidate.
For example, in the documents that is the basis of the hierarchical structure illustrated in
Pass: Root->“1_Inhouse system guide”->“About Leave, Abuse, Substitute leave”->“1 About Annual leave”->“Annual leave acquisition method”->“Annual leave acquisition procedure”
Further, in the above path, the number of choices in each heading is as follows, so that the number of choices existing in the above path is “2+2+2+2+2+4=14”. The number of characters existing in the above path is “10+13+10+9+9=51”.
Further, when the browsing history does not exist for the document, the evaluation value calculation unit 13 sets two groups including a plurality of headings in different branches of the hierarchical structure for each of the first scenario candidate and the second scenario candidate. Then, the evaluation value calculation unit 13 calculates, as the evaluation value, at least one of the length of the path between the two groups, the number of choices in the path between the two groups, and the number of characters in the choices in the path between the two groups, in each scenario candidate.
Specifically, the evaluation value calculation unit 13 sets two groups based on the HTML OL (Ordered List) attribute or the characteristics of the wording (words representing operations and procedures). For example, in the case of the documents that are the basis of the hierarchical structure illustrated in
In addition, in the example embodiment, the evaluation value calculation unit 13 can also generate a virtual browsing history when the browsing history does not exist. Specifically, the evaluation value calculation unit 13 selects keywords at random or based on the frequency of appearance and selects headings in order from the upper layer based on the selected keywords. Next, the evaluation value calculation unit 13 randomly replaces the order of the selected headings and uses the obtained result as the browsing history. After that, the evaluation value calculation unit 13 calculates the length of the path or the number of options existing in the path for each of the first scenario candidate and the second scenario candidate in the same manner as when the browsing history exists.
And then, the evaluation value calculation unit 13 can recalculate another type of evaluation value when there are a plurality of scenarios having the same evaluation value as a result of adopting any one of the above-mentioned evaluation values.
In the example embodiment, the scenario generation unit 14 adopts a scenario candidate having the smallest evaluation value, for example, a scenario candidate having the shortest path length, or a scenario candidate having the smallest number of options, and uses the adopted scenario candidate to generate the scenario. Further, the scenario generated by the scenario generation unit 14 is sent to, for example, a system that operates the chatbot.
[Apparatus Operations]
Next, the operation of the scenario generation device 10 according to the example embodiment will be described using
As illustrated in
Next, the keyword selection unit 11 extracts the hierarchical structure from the documents acquired in step A1 (step A2). Further, the keyword selection unit 11 selects keywords satisfying the setting conditions from the headings in each layer of the hierarchical structure extracted in step A2 (step A3).
Next, the link candidate generation unit 12 generates the total of r first scenario candidates and second scenario candidates according to the number “n” of keywords selected in step A3 (step A4). In step A4, the link candidate generation unit 12 sets the link between keywords existing in different branches and generates the first scenario candidate. Further, when there is a plurality of link destinations in the ancestor-descendant relationship, the link candidate generation unit 12 sets the link only to the node at the lowest layer.
Next, the evaluation value calculation unit 13 calculates, as the evaluation value, the length of the path between headings, or the number of choices in the path between headings, when browsing history is applied, each of the first scenario candidate and the second scenario candidate (step A5).
After that, the scenario generation unit 14 adopts the scenario candidate having the shortest path length calculated in step A5 or the scenario candidate having the smallest number of options calculated in step A5. The scenario generation unit 14 uses the adopted scenario candidate to generate the scenario (step A6).
As described above, in the example embodiment, a plurality of scenario candidates are evaluated and appropriate links are automatically set. That is, according to the example embodiment, the scenario in which the link is appropriately set is automatically generated. Then, if the chatbot is constructed using the scenario generated in this way, the accuracy of the chatbot can be improved.
(Modified Example)
In the example embodiment, the following example can be used. For example, the link candidate generation unit 12 can also generate the first scenario candidate and the second scenario candidate by using the documents for each keyword selected by the keyword selection unit 11. In this case, the evaluation value calculation unit 13 calculates the evaluation value for the link for each of the first scenario candidate and the second scenario candidate according to the setting rule for each keyword. Further, the scenario generation unit 14 adopts one of the scenario candidates for each keyword based on the calculated evaluation value, and generates the scenario by using all the scenario candidates adopted for each keyword.
That is, in the modified example, the scenario is generated by determining the necessity of the link for each keyword and integrating the obtained determination results of the keywords. In the modified example, evaluation value calculation method is the same as that of the above-mentioned example.
[Program]
It is sufficient that the program according to the example embodiment be a program that causes a computer to execute steps A1 to A6 illustrated in
Also, the program according to the example embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as the keyword selection unit 11, the link candidate generation unit 12, the evaluation value calculation unit 13, the scenario generation unit 14, and the data acquisition unit 15. Further, the browsing history storage unit 16 may be constructed on a computer different from the computer that executes the program according to the example embodiment.
Here, Using
As illustrated in
The CPU 111 loads the program (codes) in the example embodiment, which is stored in the storage device 113, onto the main memory 112, and performs various computations by executing these codes in a predetermined order. The main memory 112 is typically a volatile storage device such as a dynamic random-access memory (DRAM). Furthermore, the program in the example embodiment is provided in a state such that the program is stored in a computer readable recording medium 120. Note that the program in the example embodiment may also be a program that is distributed on the Internet, to which the computer 110 is connected via the communication interface 117.
In addition, specific examples of the storage device 113 include semiconductor storage devices such as a flash memory, in addition to hard disk drives. The input interface 114 mediates data transmission between the CPU 111 and input equipment 118 such as a keyboard and a mouse. The display controller 115 is connected to a display device 119, and controls the display performed by the display device 119.
The data reader/writer 116 mediates data transmission between the CPU 111 and the recording medium 120, and executes the reading out of the program from the recording medium 120 and the writing of results of processing in the computer 110 to the recording medium 120. The communication interface 117 mediates data transmission between the CPU 111 and other computers.
Furthermore, specific examples of the recording medium 120 include a general-purpose semiconductor storage device such as a CompactFlash (registered trademark, CF) card or a Secure Digital (SD) card, a magnetic recording medium such as a flexible disk, and an optical recording medium such as a compact disk read-only memory (CD-ROM).
Note that the scenario generation 10 in the example embodiment can also be realized by using pieces of hardware corresponding to the respective units, rather than using a computer on which the program is installed. Furthermore, a part of the scenario generation apparatus 10 may be realized by using the program, and the remaining part of the scenario generation apparatus 10 may be realized by using hardware.
While a part of or the entirety of the above-described example embodiment can be expressed by (Supplementary note 1) to (Supplementary note 21) described in the following, the invention is not limited to the following description.
(Supplementary Note 1)
A scenario generation apparatus including:
(Supplementary Note 2)
The scenario generation apparatus according to Supplementary note 1,
(Supplementary Note 3)
The scenario generation apparatus according to Supplementary note 1,
(Supplementary Note 4)
The scenario generation apparatus according to any one of Supplementary notes 1 to 3,
(Supplementary Note 5)
The scenario generation apparatus according to any one of Supplementary notes 1 to 3,
(Supplementary Note 6)
The scenario generation apparatus according to any one of Supplementary notes 1 to 5,
(Supplementary Note 7)
The scenario generation apparatus according to any one of Supplementary notes 1 to 6,
(Supplementary Note 8)
A scenario generation method including:
(Supplementary Note 9)
The scenario generation method according to Supplementary note 8,
(Supplementary Note 10)
The scenario generation method according to Supplementary note 8,
(Supplementary Note 11)
11. The scenario generation method according to any one of Supplementary notes 8 to 10,
(Supplementary Note 12)
12. The scenario generation method according to any one of Supplementary notes 8 to 10,
(Supplementary Note 13)
The scenario generation method according to any one of Supplementary notes 8 to 12,
(Supplementary Note 14)
The scenario generation method according to any one of Supplementary notes 8 to 13,
(Supplementary Note 15)
A computer-readable recording medium that includes a program, the program including instructions that cause a computer to carry out:
(Supplementary Note 16)
The computer-readable recording medium according to Supplementary note 15,
(Supplementary Note 17)
The computer-readable recording medium according to Supplementary note 15,
(Supplementary Note 18)
The computer-readable recording medium according to any one of Supplementary notes 15 to 17,
(Supplementary Note 19)
The computer-readable recording medium according to any one of Supplementary notes 15 to 17,
(Supplementary Note 20)
The computer-readable recording medium according to any one of Supplementary notes 15 to 19,
(Supplementary Note 21)
The computer-readable recording medium according to any one of Supplementary notes 15 to 20,
The invention has been described with reference to an example embodiment above, but the invention is not limited to the above-described example embodiment. Within the scope of the invention, various changes that could be understood by a person skilled in the art could be applied to the configurations and details of the invention.
As described above, according to the present invention, it is possible to set the link automatically in the scenario generation of chatbot. The present invention is useful for a system that realizes a chatbot.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2020/007135 | 2/21/2020 | WO |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2021/166231 | 8/26/2021 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
6493637 | Steeg | Dec 2002 | B1 |
7085771 | Chung | Aug 2006 | B2 |
7137062 | Kaufman | Nov 2006 | B2 |
7610193 | Sites | Oct 2009 | B2 |
8190553 | Routt | May 2012 | B2 |
9542930 | Gupta | Jan 2017 | B2 |
9939837 | Acosta Jimenez | Apr 2018 | B2 |
11023787 | Pelov | Jun 2021 | B2 |
11038791 | Tantsura | Jun 2021 | B2 |
11068519 | Duan | Jul 2021 | B2 |
11321536 | Galitsky | May 2022 | B2 |
11397762 | Raval Contractor | Jul 2022 | B2 |
11429790 | Finkelshtein | Aug 2022 | B2 |
11586827 | Galitsky | Feb 2023 | B2 |
20030074142 | Steeg | Apr 2003 | A1 |
20030217335 | Chung | Nov 2003 | A1 |
20070033046 | Sites | Feb 2007 | A1 |
20090164435 | Routt | Jun 2009 | A1 |
20100005087 | Basco | Jan 2010 | A1 |
20120306741 | Gupta | Dec 2012 | A1 |
20130138429 | Shen | May 2013 | A1 |
20150301555 | Acosta Jimenez | Oct 2015 | A1 |
20160055843 | Gupta | Feb 2016 | A1 |
20160147747 | Chulinin | May 2016 | A1 |
20160188541 | Chulinin | Jun 2016 | A1 |
20170061959 | Lehman | Mar 2017 | A1 |
20190163692 | Duan | May 2019 | A1 |
20190294727 | Kohlmeier et al. | Sep 2019 | A1 |
20190294728 | Kohlmeier et al. | Sep 2019 | A1 |
20200125901 | Pelov | Apr 2020 | A1 |
20200134511 | Ho | Apr 2020 | A1 |
20200184155 | Galitsky | Jun 2020 | A1 |
20200257861 | Galitsky | Aug 2020 | A1 |
20200258147 | Song | Aug 2020 | A1 |
20200258181 | Song | Aug 2020 | A1 |
20200285810 | Di Rosa | Sep 2020 | A1 |
20210049239 | Li | Feb 2021 | A1 |
20210056101 | Chiticariu | Feb 2021 | A1 |
20210089620 | Finkelshtein | Mar 2021 | A1 |
20210092044 | Tantsura | Mar 2021 | A1 |
20210232613 | Raval Contractor | Jul 2021 | A1 |
20210240775 | Liu | Aug 2021 | A1 |
20210406473 | Park | Dec 2021 | A1 |
20220083317 | Ohta et al. | Mar 2022 | A1 |
Number | Date | Country |
---|---|---|
104598613 | Nov 2017 | CN |
112925755 | Jun 2021 | CN |
2001519070 | Mar 1998 | JP |
2018-032330 | Mar 2018 | JP |
6579637 | Sep 2019 | JP |
20170090633 | Jan 2016 | KR |
Entry |
---|
International Search Report for PCT Application No. PCT/JP2020/007135, mailed on Apr. 21, 2020. |
English translation of Written opinion for PCT Application No. PCT/JP2020/007135, mailed on Apr. 21, 2020. |
Number | Date | Country | |
---|---|---|---|
20230053344 A1 | Feb 2023 | US |