JP2024009724A - Dialogue reply candidate proposal system and dialogue reply candidate proposal method - Google Patents
Dialogue reply candidate proposal system and dialogue reply candidate proposal method Download PDFInfo
- Publication number
- JP2024009724A JP2024009724A JP2022111469A JP2022111469A JP2024009724A JP 2024009724 A JP2024009724 A JP 2024009724A JP 2022111469 A JP2022111469 A JP 2022111469A JP 2022111469 A JP2022111469 A JP 2022111469A JP 2024009724 A JP2024009724 A JP 2024009724A
- Authority
- JP
- Japan
- Prior art keywords
- question
- answer
- sentences
- past
- learning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 77
- 238000003860 storage Methods 0.000 claims abstract description 38
- 239000000284 extract Substances 0.000 claims abstract description 14
- 238000004458 analytical method Methods 0.000 claims description 32
- 238000012545 processing Methods 0.000 claims description 20
- 238000010923 batch production Methods 0.000 claims description 3
- 239000013598 vector Substances 0.000 description 24
- 238000010586 diagram Methods 0.000 description 21
- 230000006870 function Effects 0.000 description 10
- 238000011156 evaluation Methods 0.000 description 9
- 238000007781 pre-processing Methods 0.000 description 9
- 238000000605 extraction Methods 0.000 description 6
- 230000014509 gene expression Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 230000006854 communication Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- CURLTUGMZLYLDI-UHFFFAOYSA-N Carbon dioxide Chemical compound O=C=O CURLTUGMZLYLDI-UHFFFAOYSA-N 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000003825 pressing Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 229910002092 carbon dioxide Inorganic materials 0.000 description 1
- 239000001569 carbon dioxide Substances 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000010792 warming Methods 0.000 description 1
Images
Landscapes
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、対話内の新規質問文章に対する回答文章の候補となる回答候補文章を生成する対話回答候補提案システムおよび対話回答候補提案方法に関する。 The present invention relates to a dialog answer candidate proposing system and a dialog answer candidate proposing method that generate answer candidate sentences that are answer text candidates for new question sentences in a dialog.
インターネットや公衆通信網を介して得られたユーザの新規質問文章に対して、回答文章を準備するために、その候補となる回答候補文章を生成する技術がある。例えば、特許文献1には、ユーザの質問に基づく質問文字列を複数の形態素(単語)に分解し、得られた複数の形態素に基づいて、蓄積された過去の回答文字列群から回答文字列を選択して出力する技術が開示されている。
BACKGROUND ART In order to prepare answer texts for new question texts from users obtained via the Internet or public communication networks, there is a technique for generating answer candidate texts that serve as candidates. For example, in
特許文献2には、用意したFAQに対して構文、意味、主題解析を行うことで、顧客からの問い合わせの内容が不完全であっても、自然な形での聞き返しに基づく対話により誘導しながら問い合わせの意図・意味を解釈し、内容の補完・絞り込みを行なって回答を提示する技術が開示されている。また、特許文献3には、蓄積された過去の対話文それぞれに対して「質問、情報提供、その他」というラベル付けを行い、それらを基に対話データに含まれる対話回答候補質問者による各言葉と対話回答候補回答者による各言葉のそれぞれについて、当該言葉が質問の表現であるかを推定し、質問の表現であると推定された対話回答候補回答者による言葉に対する応答としての対話回答候補質問者による言葉を対話回答候補対話データから抽出することにより質問文及び回答文を再構築する技術が開示されている。
特許文献1の質問回答支援装置は、ユーザの質問文章が内容的に不十分であり、補完する情報を得るための追加の質問や、内容を絞り込むための選択肢の提示といった、対話が必要になる場合の想定が不十分である。具体的には、図14に示されるような入力文章に対して特許文献1の技術を適用すると、Q1-Q4の質問文をそれぞれ単独で学習させることとなる。すなわち、Q2の「入っています。」に類似した質問に対して、「アンテナピクトは立っていますか?」と回答を提案するような学習をさせるが、これは「アンテナピクトは立っていますか?」と回答する経緯となった、「携帯電話が繋がらない・・・。」「電源は入っていますか?」という対話のやり取りを加味しない学習といえる。このようにそれぞれの文章を前後の文脈を含めずに学習させてしまうと、全く関係のない文脈の質問に対して「アンテナピクトは立ってますか?」を回答提案してしまうなど、モデルへの悪影響が出てしまう。
In the question answering support device of
特許文献2に記載の技術は、複数回の対話を前提とした技術であり、FAQ(Frequently Asked Questions)から適切な聞き返し文章を生成するため、適切なやり取りが期待出来る。しかしながら、FAQは人手で生成する必要があり、生成コストがかかるという問題がある。チャットボットなどで良く採用される公知のルールベース型アルゴリズム(予め人手で回答するルールを定める方式)でも同様である。
The technology described in
その問題に対し特許文献3に記載の技術では、過去の対話文中から、ユーザによる一連の文章を組み合わせ1つの文章へ、回答者による一連の文章を組み合わせ1つの文章へ再結合することで、FAQ生成コストの削減を図っている。例えば、図14に示されるような入力文章に対して特許文献3を適用した場合、図15に示されるような質問文及び回答文が抽出される。しかしながらこの例での「入っています。」、「3本立っています。」からも分かる通り、対話の際にユーザは必要最低限の応答しかせず、主語などの重要な単語を除いて回答することが一般的なため、AIに学習させる質問文章からも図15の主語などが抜け落ちてしまい、モデルへの悪影響が出てしまう虞がある。
To solve this problem, the technology described in
そこで、本発明の目的は、対話内の新規質問文章に対して好適な回答候補文章を、低コストで出力する対話回答候補提案システムおよび対話回答候補提案方法を提供することを目的とする。 SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a dialog answer candidate proposing system and a dialog answer candidate proposing method that output suitable answer candidate sentences for new question sentences in a dialog at a low cost.
本願において開示される発明のうち代表的な特徴を説明すれば次のとおりである。
本発明の一つの特徴によれば、プロセッサと、記憶装置と、質問者が使用するユーザ端末及び回答者が使用するオペレータ端末と通信を行う送受信装置を有し、質問者からの質問文章に対する回答文章の候補となる回答候補文章を生成してオペレータ端末に表示するようにした対話回答候補提案システムにおいて、質問者によって入力された過去の質問文章と、当該過去の質問文章に対する過去の回答文章を対応付けて対話時系列情報を付与して記録した質問回答データベースと、質問回答データベースに保存された情報に基づいて生成された学習用質問文章及び学習用回答文章を記録する学習用質問回答データベースと、質問者によって新規質問文章が入力されたら、質問回答データベースまたは学習用質問回答データベースから新規質問文章に類似する過去の質問文章または学習用質問文章を抽出する回答候補文章生成部と、抽出された新規質問文章に類似する過去の質問文章または学習用質問文章に対応付けられた過去の回答文章を用いて学習用質問回答データを生成する学習用質問回答データ生成部を設けた。学習用質問回答データ生成部は、質問回答データベース及び学習用質問回答データベースに保存された過去の質問文章及び学習用質問文章それぞれに対して、新規質問文章との類似度を算出し、各対話の合算類似度を算出することにより、新規質問文章との類似度または各対話の合算類似度に基づいて学習用質問回答データを生成する。
Representative features of the invention disclosed in this application are as follows.
According to one feature of the present invention, the present invention includes a processor, a storage device, and a transmitting/receiving device that communicates with a user terminal used by a questioner and an operator terminal used by a questioner, and the transmitting/receiving device communicates with a user terminal used by a questioner and an operator terminal used by a questioner. In an interactive answer candidate proposal system that generates answer candidate sentences that serve as sentence candidates and displays them on the operator terminal, past question sentences input by the questioner and past answer sentences for the past question sentences are A question-and-answer database in which dialogue time-series information is associated and recorded, and a learning question-and-answer database in which learning question sentences and learning answer sentences generated based on the information stored in the question and answer database are recorded. , an answer candidate sentence generation unit that extracts past question sentences or learning question sentences similar to the new question sentence from the question and answer database or the learning question and answer database when a new question sentence is input by the questioner; A learning question and answer data generation unit is provided that generates learning question and answer data using past question sentences similar to the new question sentence or past answer sentences associated with the learning question sentence. The learning question and answer data generation unit calculates the degree of similarity between each of the past question sentences and the learning question sentences stored in the question and answer database and the learning question and answer database with the new question sentences, and calculates the degree of similarity between each dialogue. By calculating the total similarity, learning question and answer data is generated based on the similarity with the new question sentence or the total similarity of each dialogue.
本発明の他の特徴によれば、記憶装置には、質問回答データベースと、学習用質問回答データベースと、疑問があることを表す疑問詞を保存する疑問詞テーブルと、質問文章の解析に当たって同義とする単語を保存する同義語テーブルと、否定肯定語テーブルが格納される。学習用質問回答データベースは、同義語テーブルに保存された単語を、文章解析に用いて過去の質問文章及び回答文章から抽出し、文章解析の結果を予め生成したルールに基づいて生成されたものである。回答候補文章生成部は、質問者からの新規質問文章が入力されると、学習用質問回答データベースを検索し、オペレータ端末に対して、新規質問文章に対する類似質問と、類似質問に対する回答候補を表示させることで、質問者への対話回答をアシストする。学習用質問回答データベースの構築は、学習用質問回答データ生成プログラムによりバッチ処理で実行される。 According to another feature of the present invention, the storage device includes a question and answer database, a learning question and answer database, an interrogative word table that stores interrogative words expressing questions, and a question word table that stores interrogative words expressing questions, and a A synonym table that stores words that correspond to the same term, and a negative/affirmative word table are stored. The learning question and answer database is generated based on rules that use text analysis to extract the words stored in the synonym table from past question texts and answer texts, and generate the text analysis results in advance. be. When a new question sentence is input from the questioner, the answer candidate sentence generation unit searches the learning question and answer database and displays similar questions to the new question sentence and answer candidates for the similar questions on the operator terminal. This will assist in answering the questioner's dialogue. The construction of the learning question and answer database is executed in batch processing by the learning question and answer data generation program.
本発明によれば、質問回答データベースから質問情報に類似する過去の質問文章を抽出し、抽出した質問情報に類似する過去の質問文章もしくは質問文章群と、それに対応付けられた過去の回答文章もしくは回答文章群を質問回答データベースから抽出して、回答候補文章を作成して学習用質問回答データベースを構築するので、質問回答応答時にオペレータは、学習用質問回答データベースを用いた質問者への回答案を取得することができ、新規質問文章に対する好適な回答候補文章を効率良く質問者に対して提供できる。 According to the present invention, past question sentences similar to question information are extracted from a question and answer database, and past question sentences or question sentence groups similar to the extracted question information and past answer sentences or A learning question-and-answer database is constructed by extracting answer sentences from the question-and-answer database and creating answer candidate sentences, so when responding to a question, the operator can use the learning question-and-answer database to provide a proposed answer to the questioner. can be obtained, and suitable answer candidate sentences for new question sentences can be efficiently provided to the questioner.
以下、図面を参照して本発明の実施例を説明する。本発明は、他の種々の形態でも実施することが可能である。特に限定しない限り、各構成要素は単数でも複数でも構わない。各種情報の例として、「テーブル」という表現にて説明しているが、各種情報はこれら以外のデータ構造で表現されてもよい。例えば、「XXリスト」、「XXキュー」、「XX情報」としても良い。識別情報について説明する際に、「識別情報」、「識別子」、「名」、「ID」、「番号」等の表現を用いるが、これらについてはお互いに置換が可能である。 Embodiments of the present invention will be described below with reference to the drawings. The present invention can also be implemented in various other forms. Unless specifically limited, each component may be singular or plural. Although the expression "table" is used in the description as an example of various types of information, various types of information may be expressed using data structures other than these. For example, it may be "XX list", "XX queue", or "XX information". When describing identification information, expressions such as "identification information", "identifier", "name", "ID", and "number" are used, but these expressions can be replaced with each other.
プログラムは、プログラムソースから計算機にインストールされてもよい。プログラムソースは、例えば、プログラム配布サーバまたは計算機が読み取り可能な記憶メディアであってもよい。プログラムソースがプログラム配布サーバの場合、プログラム配布サーバはプロセッサと配布対象のプログラムを記憶する記憶資源を含み、プログラム配布サーバのプロセッサが配布対象のプログラムを他の計算機に配布してもよい。また、実施例において、2以上のプログラムが1つのプログラムとして実現されてもよいし、1つのプログラムが2以上のプログラムとして実現されてもよい。 A program may be installed on a computer from a program source. The program source may be, for example, a program distribution server or a computer-readable storage medium. When the program source is a program distribution server, the program distribution server includes a processor and a storage resource for storing the program to be distributed, and the processor of the program distribution server may distribute the program to be distributed to other computers. Furthermore, in the embodiments, two or more programs may be implemented as one program, or one program may be implemented as two or more programs.
<システム構成>
図1は本発明の実施例に係る対話回答候補提案システム1のシステム構成を示すブロック図である。対話回答候補提案システム1は、プログラムを実行して処理を行うコンピュータによって実現できるもので、プロセッサ31と、記憶資源(主記憶装置32、副記憶装置33)と、入力装置34と出力装置35を含んで構成され、これらはデータバス37により相互に接続される。対話回答候補提案システム1のデータバス7にはさらに、ネットワーク5に接続するためのネットワークインターフェース36が設けられる。
<System configuration>
FIG. 1 is a block diagram showing the system configuration of a dialogue answer
プロセッサ31は、副記憶装置33に記憶されたデータやプログラムを主記憶装置32に読み出して実行することにより特定の機能を実現する。プロセッサ31は、例えばCPU(Central Processing Unit)、又は、GPU(Graphics Processing Unit)であり、使用されるプロセッサ31の種類、動作周波数、コア数、使用個数は任意である。尚、処理の主体が、プロセッサ31だけでなく、プロセッサを有するコントローラ、装置、システム、計算機、ノードであっても良い。プログラムを実行して行う処理の主体は、演算部であれば良く、特定の処理を行う専用回路を含んでいてもよい。ここで、専用回路とは、例えばFPGA(Field Programmable Gate Array)やASIC(Application Specific Integrated Circuit)、CPLD(Complex Programmable Logic Device)等である。
The
プロセッサ31は、主記憶装置32又は副記憶装置33にインストールされている様々なプログラムを実行する。ここでは、学習用質問回答データ生成プログラム26(図2参照)を実行することにより、学習用質問回答データ生成部11の機能を実現し、回答候補文章生成プログラム27(図2参照)を実行することによって回答候補文章生成部12の機能をソフトウェアによって実現する。また、質問応答実行プログラム28(図2参照)を用いてチャット環境の提供などの質問回答実行部13の機能をソフトウェアによって実現する。プロセッサ31が実現する機能は、これら3つだけに限らないが、その他の機能についての図示や説明は省略している。
The
ネットワーク5は、例えばインターネットのような公知のグローバルネットワークを用いることができる。しかしながら、利用するネットワーク5はインターネットだけに制限されずに、通信キャリアが提供する公衆通信網や、構内ネットワーク(LAN:Local Area Network)、その他の公知のネットワークを用いても良い。ネットワークインターフェース(I/F:Interface)36は、対話回答候補提案システム1とネットワーク5とを接続可能にするための機器であり、対話回答候補提案システム1は、ネットワーク5に接続されている複数のユーザが所有するそれぞれのユーザ端末2や、ヘルプデスク等で作業する複数のオペレータ(回答者)等が使用するオペレータ端末3とのデータの送受信を行う。
As the
対話回答候補提案システム1にはさらに、マウスやキーボート等の操作を受け付ける入力装置34と、ディスプレイ装置等の情報を出力する出力装置35が設けられ、対話回答候補提案システム1を直接操作する作業者によって操作可能に構成される。尚、入力装置34と出力装置35の機能を、オペレータ端末3の一つで兼用するように構成することも可能である。
The dialog answer
主記憶装置32は、RAM等の揮発性記憶素子を有し、プロセッサ31が実行するプログラムや、データを一次的に記憶する。副記憶装置33は、HDD(Hard Disk Drive)やSSD(Solid State Drive)等の不揮発性記憶素子を有し、プログラムやデータ等を記憶する装置である。副記憶装置33の構成(記憶資源)は、上述の構成だけに限られずに、副記憶装置33に加えて、又は、副記憶装置33に替えて外部の記憶装置、ネットワークサーバ、クラウドサーバなど利用して、データやプログラム等を分散して記憶させるように構成しても良い。
The
ユーザ端末2は、質問を行うユーザが操作する情報機器であり、ユーザ端末2から対話回答候補提案システム1に対する問題文章が入力される。ユーザ端末2は、少なくとも、ユーザから入力を受け付ける入力装置(図示せず)と、ディスプレイやタッチパネルなどの情報を表示する出力装置(図示せず)と、ネットワークインターフェース(図示せず)を備える電子機器であり、例えば、パーソナルコンピュータ、タブレット、スマートフォン、携帯電話等の公知の情報端末を用いることができる。ユーザ端末2は、ネットワーク5を介して、対話回答候補提案システム1やオペレータ端末3と双方向の通信ができる。
The
オペレータ端末3は、ユーザ端末2を操作するユーザと対話を行うオペレータが使用する機器であり、ヘルプデスク等のオペレータが作業する場所に設置される。オペレータ端末3は、少なくとも、オペレータからの入力操作を受け付ける入力装置(図示せず)と、ディスプレイやタッチパネルなどの情報を表示する出力装置(図示せず)と、ネットワークインターフェース(図示せず)を備える。オペレータ端末3として、パーソナルコンピュータ、タブレット、スマートフォン等の公知の電子機器を用いることができる。尚、オペレータ端末3の内部に副記憶装置33で格納されたデータの一部、例えば質問回答データベース21、学習用質問回答データベース22の複製を内部記憶装置にあらかじめコピーしておいて、ユーザからの質問回答処理をオペレータ端末のプロセッサが行うようにしても良い。このように、対話回答候補提案システム1のプロセッサ31が実行する一部の機能を、オペレータ端末3にて実行させるような構成にして処理の高速化を図るようにしても良い。
The
ユーザによって入力された新規質問文章が、ユーザ端末2から対話回答候補提案システム1に送信されると、プロセッサ31は受け取った新規質問文章に基づいて、新規質問文章に対する回答文章の候補となる過去の質問文章もしくは質問文章群と、それに対応付けられた過去の回答文章もしくは回答文章群を生成し、それらをネットワーク5を介してオペレータ端末3の出力装置に表示する。オペレータは、対話回答候補提案システム1による対話回答候補を含む様々な情報を見ながら、質問したユーザに対する適切な回答を行う。オペレータによって確定された質問文章への回答は、対話回答候補提案システム1を介してユーザ端末2に送信される。つまり、プロセッサ31は、質問を行うユーザと、それに回答する担当のオペレータとの情報のやり取りの仲介をシステム的に行いつつ、ユーザによって行われた質問に関連する過去の質問文章もしくは質問文章群と、それに対応付けられた過去の回答文章もしくは質問文章群を生成して、オペレータ端末3に表示することにより、オペレータによる回答作業を支援する。オペレータはオペレータ端末3に表示された様々な情報を参照しながら、ユーザに対する回答を作成してユーザに返信できるので、迅速かつ高精度の回答作業を行うことができる。
When a new question text input by the user is transmitted from the
学習用質問回答データ生成部11は、質問回答データベース21(図2で後述)に蓄積された過去の質問及び回答文章を用いて学習用質問回答データを生成する機能を実現する。この機能はコンピュータプログラムを実行することで実現され、その詳細は図8にて後述する。回答候補文章生成部12は、ユーザからの新規質問文章が入力された場合に、過去の質問文章もしくは質問文章群と、それに対応付けられた過去の回答文章もしくは質問文章群を参照しながら最適な回答候補を生成する。質問回答実行部13は、ユーザからの質問文を受け付けて、オペレータ端末3に送信し、オペレータ端末3から入力された回答文をユーザ端末2に返信するという一連の質問と回答のやり取り環境を提供する。質問回答実行部13は、チャットボットや、電子メールを用いた質問-応答、チャット画面を介した一問一答形式の回答環境、Web画面を用いた専用の質問応答環境等の公知の方法を用いることができ、これらはプロセッサ31がコンピュータプログラム(図2にて後述する質問応答実行プログラム28)を実行することで実現できる。質問回答実行部13は、回答候補文章生成部12によって生成された回答文の候補を、ネットワーク5介してオペレータ端末3に送信する。
The learning question and answer
図2は、図1の副記憶装置33に格納される内容の一例を示すデータ構成図である。副記憶装置33には、質問回答データベース21と、学習用質問回答データベース22が構築される。また、これらのデータベースを構築し、または、これらのデータベースを利用する際に使用される疑問詞テーブル23と、同義語テーブル24と、肯定否定語テーブル25が格納される。さらに、図1で示したプロセッサ31が実行する学習用質問回答プログラム26と、回答候補文章生成プログラム27と、質問応答実行プログラム28が格納される。副記憶装置33には、その他の多様なプログラム、データ等が記憶されるがそれらの説明は省略する。
FIG. 2 is a data configuration diagram showing an example of the contents stored in the
質問回答データベース21は、過去の質問文章と、過去の質問文章に対する過去の回答文章と、過去の質問文章ベクトルと、を対応付けて格納したデータ群である(詳細は図3にて後述)。学習用質問回答データベース22は、学習用質問回答データ生成部11にて、質問回答データベース21中の文章を用いて生成したデータ群を保存するデータベースである(詳細は図4にて後述)。
The question and
疑問詞テーブル23は、疑問があることを表す疑問詞及び要望があることを表す要望語を保存するデータベースである(詳細は図5にて後述)。同義語テーブル24は、同義語を保存するデータベースである(詳細は図6にて後述)。肯定否定語テーブル25は、文章が肯定文なのか否定文なのかを決めるために保存しているデータベースである(詳細は図7にて後述)。 The interrogative word table 23 is a database that stores interrogative words expressing a question and request words expressing a request (details will be described later with reference to FIG. 5). The synonym table 24 is a database that stores synonyms (details will be described later with reference to FIG. 6). The affirmative/negative word table 25 is a database stored to determine whether a sentence is an affirmative sentence or a negative sentence (details will be described later with reference to FIG. 7).
学習用質問回答データ生成プログラム26と、回答候補文章生成プログラム27と、質問応答実行プログラム28がインストールされている。図1にて示した学習用質問回答データ生成部11は、プロセッサ31が副記憶装置33に記憶されて学習用質問回答データ生成プログラム26を読み出して実行することにより実現される。また、図1にて示した回答候補文章生成部12は、プロセッサ31が副記憶装置33に記憶されている回答候補文章生成プログラム27を読み出して実行することにより実現される。質問応答実行プログラム28は、質問者によるユーザ端末2とオペレータ端末3を用いた質問及び回答のやり取り環境を実現するプログラムである。
A learning question and answer
<各種データ構造>
図3は、質問回答データベース21の一例を示す図である。質問回答データベース21において、質問回答ID501は、格納されている複数の過去の質問文章502を識別するIDである。過去の回答文章503は、過去の質問文章502に対して回答された文章であり、NextID504(詳細は後述する)は、過去の質問文章502に続く次の質問の質問回答ID501である。同一のレコード511内には、さらに、文章ベクトル505、ユーザ評価506、学習用データ生成進捗507が過去の質問文章502に対応付けて格納される。
<Various data structures>
FIG. 3 is a diagram showing an example of the question and
この様に、質問回答データベース21は、過去の質問文章502と、当該過去の質問文章502に対する過去の回答文章503を対応付けて保存する。NextID504は、対話の繋がりを保存するための番号であり、「0」は対話終了、「-(NULL)」は一度のやり取りで回答が完了したことを意味する。質問回答ID501を用いてNextID504を付与することで、“対話時の系列情報”が確認できる。文章ベクトル505は、質問回答データベース21に、新たに過去の質問文章と過去の回答文章との組が保存される度に、質問回答データベース21に保存された全ての過去の質問文章に対して生成してもよい。また、例えば、過去の質問文章と過去の回答文章との組が所定の数、質問回答データベース21に保存される毎等、あらかじめ設定したタイミングで文章ベクトル505を生成し直しても良い。ユーザ評価506は、回答に対するユーザからの評価を、対話結果と関連付けるために保存され、「-(NULL)」は「ユーザ評価無し」を意味する。学習用データ生成進捗507は、学習用質問回答データ生成プログラムが、どこまで実行されているかを判断するために保存され、「〇」はプログラムにより学習用データが生成済み、「-(NULL)」はプログラムは学習用データ生成対象外、「×」はプログラムによるデータ生成が未完了を意味している。
In this way, the question and
図4は、学習用質問回答データベース22の一例を示す図である。図4に示す学習用質問回答データベース22では、学習用質問文章602と、学習用質問回答データ生成プログラム26(図2参照)を実行することで生成される学習用回答文章603が格納される。質問回答No601は、学習用質問文章602を識別するためのIDである。作成元ID604は、学習用質問文章602を構成する元になった過去の質問文章502(図3参照)のID501(図3参照)である。文章ベクトル605は、自然言語の文章を数値化したものである。文章ベクトル605を算出する方法は公知の手法を用いることができ、数字の組を使って文章の特徴が表現される。ユーザ評価606は、学習用質問文章602に対する学習用回答文章603のユーザによる評価を格納したもので、質問終了時等にユーザによって入力された評価である。ここでは、学習用回答文章603の結果として学習用質問文章602に含まれる質問を行ったユーザが、学習用回答文章603の最終回答を適切(“Good”)と評価したことが入力されている。この様に、学習用質問回答データベース22は、学習用質問文章602と、当該学習用質問文章602に対する学習用回答文章603を対応付けて保存する。
FIG. 4 is a diagram showing an example of the learning question and
図5は、疑問詞テーブル23の一例を示す図である。図5に示す疑問詞テーブル23では、ユーザからの質問文を解析するために利用される疑問詞702がリスト形式であらかじめ格納されている。疑問詞ID701は、格納された疑問詞702を識別するためのIDである。疑問詞702は、疑問があることを表す疑問詞を格納したものである。疑問詞種別703は、疑問詞702のそれぞれに対して、どの種別の疑問詞かを示す。図5には、疑問詞702及び種別703の例として、「いつ:WHEN」と「なぜ:WHY」のレコード(疑問詞ID=“1”、“2”)が示されている。疑問詞702:種別703の他の例として、「だれ:WHO」、「何:WHAT」、「どこ:WHERE」、「どう:HOW」、「いつ:WHEN」、「どの:WHICH」、「どなた:WHO」、「どれ:WHAT」、「どんな:HOW」、「いかなる:HOW」、「ますか:YES/NO」「?:YES/NO」が挙げられる。
FIG. 5 is a diagram showing an example of the interrogative word table 23. In the interrogative word table 23 shown in FIG. 5,
図6は、同義語テーブル24の一例を示す図である。図6に示す同義語テーブル24では、同義語ID801は、同義語802を識別するためのIDである。同義語802は、格納される同義語のペアを表す単語である。図6には、同義語802の例として、「スマホ」と、その同義語にあたる「スマートフォン」を示した。このように、対話回答候補提案システム1における文章解析処理では、ユーザから「スマホ」と入力された場合は、「スマートフォン」と同義の用語として取り扱う。同義語テーブル24には多数の同義語802が格納される。
FIG. 6 is a diagram showing an example of the synonym table 24. In the synonym table 24 shown in FIG. 6, a
図7は、肯定否定語テーブル25の一例を示す図である。図7に示す肯定否定語テーブル25では、肯定否定単語902の一覧が格納される。肯定否定語ID901は、肯定否定単語902のそれぞれを識別するIDである。肯定否定単語902とは、文章に含まれる意図に関して重要な意味をもつ場合が多いと考えられる単語を列挙したものである。肯定否定単語種別903とは、肯定否定単語902が肯定と否定どちらの意味かを示す情報である。図7には、肯定否定単語902の例として、「はい」「違う」が格納され、それらの種別902が、「はい:肯定」、「違う:否定」を示している。尚、肯定否定単語902、肯定否定単語種別903は、図7で示す例以外にも多数のデータが格納される。
FIG. 7 is a diagram showing an example of the affirmative/negative word table 25. In the affirmative/negative word table 25 shown in FIG. 7, a list of positive/
<類似文章抽出法>
対話回答候補提案システム1は、ユーザによって入力された新規質問文章に基づいて、回答候補文章を生成する過程で、tfidf法(単語頻度逆文章頻度法)といった公知技術で文章のベクトル化、モデル生成を行い、その後ベクトル同士のコサイン類似度を算出する。以下では、文章のベクトル化、モデル生成方法と、文章と文章のコサイン類似度を算出し、対象とする文章に類似する類似文章を抽出する類似文章抽出方法の概要を以下に説明する。文章ベクトル化及びコサイン類似度の算出では、複数の文章が格納されたデータベース(本実施例では質問回答データベース21、学習用質問回答データベース22)を使用する。
<Similar sentence extraction method>
In the process of generating answer candidate sentences based on a new question sentence input by the user, the dialog answer
文章と文章のコサイン類似度を算出し、対象とする文章に類似する類似文章を抽出する類似文章抽出方法では、以下で説明するように、データベースに格納されている文章それぞれと、対象とする文章とに、tfidf法等でベクトルを算出し、コサイン類似度を算出する。 In the similar sentence extraction method, which calculates the cosine similarity between sentences and extracts similar sentences that are similar to the target sentence, as explained below, each sentence stored in the database and the target sentence are Then, a vector is calculated using the tfidf method or the like, and a cosine similarity is calculated.
tfidf法を用いた場合、まずデータベースに格納されている全文章と、対象とする文章を形態素解析し、文章を単語(形態素)に分解する。次に、分解して得られた複数の単語から、単語の重複する分を削除し、単語それぞれを成分とする単語ベクトルを生成する。次に、データベースに格納されている文章それぞれと、対象とする文章に対してtfidfベクトルを算出する。tfidfベクトルは、単語ベクトルの成分の単語に対するtfidf値を成分とするベクトルである。 When using the tfidf method, first, all sentences stored in the database and the target sentence are morphologically analyzed, and the sentences are broken down into words (morphemes). Next, duplicate words are deleted from the plurality of words obtained by decomposition, and a word vector having each word as a component is generated. Next, a tfidf vector is calculated for each sentence stored in the database and the target sentence. The tfidf vector is a vector whose components are tfidf values for words that are components of the word vector.
単語ベクトルとtfidfベクトルとの例を挙げると、「スマートフォンは軽い。」という文を、形態素解析して生成される単語ベクトルは、例えば、(スマートフォン,は,軽い,。)となる。これに対するtfidfベクトルは、例えば、(「スマートフォン」のtfidf値,「は」のtfidf値,「軽い」のtfidf値,「。」のtfidf値)となる。 To give an example of a word vector and a tfidf vector, a word vector generated by morphologically analyzing the sentence "Smartphones are light." is, for example, (smartphone, wa, light, .). The tfidf vector for this is, for example, (tfidf value of "smartphone", tfidf value of "ha", tfidf value of "light", tfidf value of ".").
次に、データベースに格納されている文章のtfidfベクトルそれぞれと、対象とする文章のtfidfベクトルとのコサイン類似度(2つのtfidfベクトルの間の角度に対するコサインの値)を算出する。2つのtfidfベクトルA、Bのコサイン類似度は、コサイン類似度=A・B/(|A||B|)となる。対象文章とのコサイン類似度の値が大きい文章ほど(コサイン類似度が高い文章ほど)、類似度が高い文章とする。 Next, the cosine similarity (cosine value for the angle between the two tfidf vectors) between each of the tfidf vectors of the sentences stored in the database and the tfidf vector of the target sentence is calculated. The cosine similarity of the two tfidf vectors A and B is cosine similarity=A·B/(|A||B|). A sentence with a larger value of cosine similarity with the target sentence (a sentence with a higher cosine similarity) is considered to have a higher degree of similarity.
そして、データベースに含まれる文章のうちで、コサイン類似度の高さで上位から所定の割合(または所定の数)の文章を、類似度が高い類似文章とする。ここで、コサイン類似度の代わりに、データベースに格納されている文章のtfidfベクトルと、対象とする文章のtfidfベクトル、の内積を用いても良い。 Among the sentences included in the database, a predetermined percentage (or a predetermined number) of sentences from the top in terms of cosine similarity are determined to be similar sentences with high similarity. Here, instead of the cosine similarity, the inner product of the tfidf vector of the text stored in the database and the tfidf vector of the target text may be used.
以上の説明は、tfidf法の概要であり、tfidf法を用いる際のtfidf法のアルゴリズムは、以上で説明した方法から適宜変更できる。また、tfidf法の「文章と文章のコサイン類似度を算出し、対象とする文章に類似する類似文章を抽出する類似文章抽出方法」に換えて、例えばBERT(Bidirectional Encoder Representations from Transformers)法等の文章類似度を算出する他の方法を用いて類似文章を抽出しても良い。BERT法は、tfidf法と異なり文脈理解可能なモデルを生成するため、本発明における対話を考慮したプログラムにより適している。BERT法の使用例としては、まず、保有するデータベースの質問文同士が同義か同義ではないかのラベル付けを一部の少量データに対して行う。その次に、公知の日本語Wikipedia事前学習済みモデルと用意したラベルデータを用いてファインチューニングを行うことで、同義文を判定するモデルを生成する、といった方法がある。 The above explanation is an outline of the tfidf method, and the algorithm of the tfidf method when using the tfidf method can be changed as appropriate from the method explained above. In addition, instead of the tfidf method, which is a similar sentence extraction method that calculates the cosine similarity between sentences and extracts similar sentences that are similar to the target sentence, a method such as the BERT (Bidirectional Encoder Representations from Transformers) method can be used. Similar sentences may be extracted using other methods of calculating sentence similarity. Unlike the tfidf method, the BERT method generates a model that can understand the context, and therefore is more suitable for a program that takes dialogue into account in the present invention. As an example of the use of the BERT method, first, a small amount of data is labeled as to whether the question sentences in the held database are synonymous or not. Next, there is a method of generating a model for determining synonymous sentences by performing fine tuning using a known Japanese Wikipedia pre-trained model and prepared label data.
<処理手順>
次に、対話回答候補提案システム1の処理手順について説明する。図8、図9は、対話回答候補提案システム1の学習用質問回答データ生成処理の一例の手順を示すフローチャートである。本システムにおける学習用質問回答データ生成処理は、システムの管理者、又は、対話回答候補提案システムの管理者が、バッチ処理にて実行するものであり、定期的又は不定期的な間隔で学習用質問回答データ生成プログラム26(図2参照)が起動され、図8及び図9で示す処理が開始される。
<Processing procedure>
Next, the processing procedure of the dialog answer
対話回答候補提案システム1のプロセッサ31は、学習用質問回答データ生成プログラム26(図2参照)の実行が指定されると、副記憶装置33から学習用質問回答データ生成プログラム26(図2参照)を読み出してプログラムの実行を開始する。図8において、プロセッサ31はプログラムを実行する際の変数の初期化作業を行う。ここでは、IDをカウントするための変数iをゼロクリアしてから(ステップS101)、変数iを1だけカウントアップする(ステップS102)。
When execution of the learning question and answer data generation program 26 (see FIG. 2) is specified, the
次に、プロセッサ31は、質問回答データベース21の変数iに格納されたIDのデータが、本プログラムによって確認されているかを、学習データ生成進捗が「×」であるかによって確認する(ステップS103)。確認されていないと判定された場合(ステップS103:NO)はステップS104に進み、確認されていると判定された場合(ステップS103:YES)は、ステップS102に戻る。これにより、プロセッサ31は、本プログラムで未確認のデータをID=1から順に発見するまで、ステップS102、ステップS103の処理を繰り返す。
Next, the
次に、プロセッサ31は、変数iに対応するID以上のデータの質問文章、回答文章に対し、前処理Aに沿って解析を行う(ステップS104)。前処理Aとは、質問データと回答データを結合するための事前処理を指し、文章を結合するにあたって必要な解析を行うものである。前処理Aの各解析手法は、公知技術であってよい。例えば、特許文献2に記載された構文解析、意味解析、主題解析などでもよい。
Next, the
図10は、学習用質問回答データ生成処理の一例を示す説明図である。最初に、データ欄1000に示すように結合する質問文章と回答文章のペアを質問回答データベース21から読み出す。次に、これら質問文章及び回答文章を、前処理A1101にて構文解析、意味解析、主題解析などを行うことにより、解析結果欄1002に示したような形に解析する。この後に、解析結果欄1102に示した内容に対して、結合を実施するか否か判断するルールA1103を適用する。さらに、ルールAで結合すると判断された対象に対して、結合を実施するルールB1104を適用する。ルールB1104により結合された結果の例を示したのが、表1105である。
FIG. 10 is an explanatory diagram showing an example of the learning question and answer data generation process. First, as shown in the data column 1000, pairs of question sentences and answer sentences to be combined are read out from the question and
構文解析は、質問文章及び回答文章について、形態素解析等で構文の解析を行うことで、「恐れ入る⇒動詞」、「が⇒助詞」といったように文章を解析する。意味解析は、構文解析した結果に基づき、意味属性を文法的に解析して「でしょうか⇒助動詞:質問」といったように意味を解析する。この際、疑問詞テーブル23を用いることで、「どの⇒連帯詞:不明部分:WHAT」といったように、結合に当たって必要な不明部分を予測することが可能となる。また、同義語テーブル24を用いることで、「スマホ⇒スマートフォン」といったように、解析に当たって同義とする単語を認識させることが可能となる。さらには、肯定否定語テーブル24を用いることで、「はい⇒肯定」といったように、YES/NOに対する回答が肯定か否定かを予測することが可能となる。主題解析は、特許文献2で定義された、文章中の重要部分を特定する手段で、「携帯⇒名詞 MAIN:WHAT」、「使う⇒動詞 MAIN:HOW」といったように文章が解析される。
In the syntactic analysis, the question sentences and answer sentences are analyzed using morphological analysis, etc., and the sentences are analyzed into sentences such as ``Oshiru ⇒ verb'' and ``ga ⇒ particle.'' In semantic analysis, based on the results of syntactic analysis, the semantic attributes are grammatically analyzed and the meaning is analyzed, such as ``Shika ⇒ Auxiliary verb: question.'' At this time, by using the interrogative word table 23, it is possible to predict the unknown part necessary for the combination, such as "which⇒joint word: unknown part:WHAT". Furthermore, by using the synonym table 24, it is possible to recognize words that are synonymous during analysis, such as "smartphone⇒smartphone". Furthermore, by using the affirmative/negative word table 24, it is possible to predict whether the answer to YES/NO is affirmative or negative, such as "Yes⇒affirmative". Thematic analysis is defined in
再び図8に戻り、ステップS105においてプロセッサ31は、質問回答データベース21の変数iに対応するIDのデータが、複数回の対話なのか一度のやり取りで終了したのかを、NextIDが「-」であるかによって確認する。一度のやり取りで終了したと判定された場合(ステップS105:YES)は、変数iに対応するIDのデータの学習データ生成進捗に、学習用データ生成対象外を意味する「-」を格納し、変数iをインクリメントしてからステップS104に戻る(ステップS106)。ステップS105で複数回の対話であると判定された場合(ステップS105:NO)は、ステップS107に進む。これにより、プロセッサ31は、複数回の対話データを発見するまで、ステップS105、ステップS106の処理を繰り返すことになる。
Returning to FIG. 8 again, in step S105, the
ステップS107では、プロセッサ31は、質問回答データベース21から変数iに対応するIDから、対話が終了するまでのID(対応するNextIDが0)までの対話文章が、ルールAに当てはまるかを確認する。当てはまると判定された場合(ステップS107:YES)は、ステップS108に進む(ステップS108の次にステップS104に戻る)。ステップS108では、ID=iの学習データ生成進捗507(図3参照)に「-」を格納し、変数iを対話終了(図3のNextID504が“0”)を示す次のIDまで更新する。ステップS107で、当てはまらないと判定された場合は、ステップS109に進む。これにより、プロセッサ31は、ルールAに当てはまる対話文章を発見するまで、ステップS105、ステップS107の処理を繰り返す。尚、ルールAとは、一連の対話が学習用質問回答データとして結合されるのに適しているかを判断するためのルールのことであり、図10で示した通り。前処理A1101を行った結果に対し適用する。ルールAの例として、「オペレータによる一回答文章の中に、不明部分が2つ以上ある」、「オペレータによる一回答文章が、2文以上で構成されている」「オペレータの回答に不明部分、質問要素が含まれていない(聞き返しではなく、回答である)にも関わらず、ユーザとのやり取りが続く(解決していない)」などがある。
In step S107, the
図9に進み、次にプロセッサ31は、質問回答データベース21から変数iに対応するIDから、対話が終了するまでのID(対応するNextIDが0)までの質問文章で、前処理Aによる解析結果の中で「不明部分」「質問」が含まれる文章があるかを確認する(ステップS109)。このような文章があると判定された場合(ステップS109:YES)は、質問があったタイミングに対応するIDのデータの学習データ生成進捗に、学習用データ生成対象外を意味する「-」を格納し、質問があったタイミングに対応するIDを記憶する(ステップ110)。ステップS109にて、「不明部分」「質問」が含まれる文章がないと判定された場合(ステップS109:NO)は、ステップS111に進む。S109、S110の処理により、対話開始以外のタイミングでユーザから質問があった場合を分岐することができる。
Proceeding to FIG. 9, the
次に、プロセッサ31は、変数iに対応するIDの回答文章とそのIDのNextIDの質問文章を、ルールBに従い結合する(ステップS111)。ルールBとは、一連の対話が学習用質問回答データとして結合するためのルールのことであり、図10で示した通り、前処理A1101を行った結果に対して適用する。図10では、解析結果欄1002に示した解析後の質問文章及び回答文章をルールBを用いて、表1105に示したような形で結合する。例えば、解析した結果の「HOWの種別」、「不明部分の種別」がそれぞれ、「動詞」、「WHAT」だった場合には、「結合ルール」列の通り、「携帯は~を使う」といったように結合する。このように、解析した結果の種別をそれぞれをルールとして定義することで、適切な構文で文章を結合することが可能となる。
Next, the
次に、プロセッサ31は、変数iを、結合したIDまで更新する(ステップS112)。次に、変数iのNextID504が対話終了を意味する「0」であるかを確認する(ステップS113)。対話終了と判定された場合(ステップS113:YES)はステップS114に進み、対話終了でないと判定された場合(ステップS113:NO)は、ステップS111に戻る。これにより、一連の対話が完了するまで、ステップS111、ステップS112の処理が繰り返される。
Next, the
次に、プロセッサ31は、対話始めの質問文章及びステップS111~S113までで生成した結合文章を学習用質問データ、対話終了時の回答データを学習用回答データとし、学習用質問回答データベース22に格納する(ステップS112)。次にプロセッサ31は、次の変数i+1と等しいIDが存在するかを確認する(ステップS115)。存在する場合(ステップS115:YES)はステップS105に戻り、存在しないと判定された場合(ステップS113:NO)は、図8、図9で示す処理を終了する。これにより、データ生成処理を実施していないデータに対して、学習用質問回答文を作成する処理を行うことができる。尚、本実施例では図9及び図10の処理をバッチ処理で、質問者からの入力操作とは連動しないタイミングで行うとして説明したが、バッチ処理だけに限られずに、質問者からの一連の入力操作とオペレータによる回答が完了した時点で図9及び図10の処理を実行するようにリアルタイムで処理するように構成しても良い。
Next, the
図11は、オペレータ端末3に表示される質問回答表示画面の一例を示す説明図である。図11に示す質問回答表示画面1200には、対話内過去質問文章表示欄1201と、回答文章表示欄1202と、新規質問文章表示欄1203と、送信ボタン1204と、回答ボタン1305が表示される。対話内過去質問文章表示欄1201は、一連の対話における質問文章を表示する欄である。回答文章表示欄1102は、オペレータによる回答文章を表示する欄である。新規質問文章表示欄1203は、新規質問文章を表示する欄である。ここでは、質問文章と回答文章の表示欄が3つだけ表示されている例が示されているが、文章の数が多くなればそれに対応する表示欄も多数表示される(表示画面1200上に同時表示できない場合は、スクロール可能とされる)。
FIG. 11 is an explanatory diagram showing an example of a question and answer display screen displayed on the
オペレータ端末3を操作するオペレータが、対話内過去質問文章表示欄1201もしくは、新規質問文章表示欄1203内を押す(クリック等がなされる)と、オペレータ端末3は、オペレータからの入力を受け付けて、オペレータが対話内過去質問文章表示欄1201もしくは、新規質問文章表示欄1203内の質問文章を編集できる。この編集により、オペレータ端末3は、オペレータが誤記の修正等の編集を加えた新規質問文章を対話回答候補提案システム1に送信することができる。その結果、プロセッサ31は、編集を加えた質問文章を新規質問文章とみなして回答候補文章を生成する。これにより、プロセッサ31は、より好適な回答候補文章を生成し得る。
When the operator operating the
送信ボタン1204は、オペレータが押すことにより、オペレータ端末3が、対話回答候補提案システム1に、対話内過去質問文章表示欄1201内の質問文章と新規質問文章表示欄1203内の新規質問文章と、対話回答候補提案システム1に回答候補文章の生成を指示する情報である回答候補文章生成開始情報と、を含む生成開始情報を送信する。尚、送信ボタン1204は、アイコン形式で表示され、ここでいう「押す」とは、アイコンを選択することを意味し、オペレータ端末3がタッチ式の入力パネルを有する場合には、「送信ボタン1204を押す」は「アイコンがタッチされる」と同義である。生成開始情報に含まれる質問文章は、オペレータが送信ボタン1204を押した時点での対話内過去質問文章表示欄1201と新規質問文章表示欄1203内の質問文章である。従って、オペレータが送信ボタン1204を押す前に、対話内過去質問文章表示欄1201もしくは、新規質問文章表示欄1203内の質問文章を編集した場合には、編集後の質問文章が質問文章として開始情報に含まれる。
When the operator presses the
オペレータによって回答ボタン1205が押されると、オペレータ端末3に表示されている画面が、質問回答表示画面から、オペレータが新規質問文章に対する回答文章を入力する画面に切り替わるように構成されている。新規質問文章に対する回答文章を入力する画面の例は、公知の入力方法を用いれば良いので、ここでの説明は省略する。
When the operator presses the answer button 1205, the screen displayed on the
プロセッサ31は、ネットワークI/F36でオペレータ端末3から生成開始情報を受信する(これにより、生成開始情報に含まれる、新規質問文章が入力される)と、回答候補文章生成部12により実行される回答候補文章生成処理を開始する。回答候補文章生成処理によって生成された、回答文は、質問応答実行プログラム28(図2参照)によって、質問者の使用するユーザ端末2に送信され、質問者からの更なる質問を受け付けることになる。
When the
次に、図12を用いて回答候補文章生成処理について説明する。図12は、対話回答候補提案システム1の回答候補文章生成処理の一例を示すフローチャートであり、この処理は、質問者からの質問に対してオペレータが回答しようとする際に回答候補文章生成プログラム27(図2参照)により実行される。最初にプロセッサ31は、対話内過去質問文章と、新規質問文章を保存する(ステップS201)。次に、プロセッサ31は、対話内過去質問文章と新規質問文章を足し合わせた文章に対し、類似文章抽出法にて生成したモデルから、文章ベクトルを生成する(ステップS202)。
Next, the answer candidate sentence generation process will be explained using FIG. 12. FIG. 12 is a flowchart showing an example of the answer candidate sentence generation process of the dialog answer
次に、プロセッサ31は、質問回答データベース21及び学習用質問回答データベース22を用い、類似文章抽出法を用いて類似度を算出して、質問情報に類似する過去の質問文章を抽出し、抽出した過去の質問文章、
及び、それに対応付けられた過去の回答文章を回答候補文章として、保存する(ステップS203)。ここで、質問回答データベース21の学習用データ生成進捗が「〇」の文章は、学習用質問回答データベース22に格納されている文章の結合前の文章となるため、類似度算出対象外とする。またこの際、データベースに格納したユーザ評価を用い、good評価であれば類似度を上昇させる処理などを施すこともできる。
Next, the
Then, the past answer sentences associated therewith are saved as answer candidate sentences (step S203). Here, the sentences whose learning data generation progress in the question and
次に、プロセッサ31は、ステップS203で算出した類似度のうち、質問回答データベース21の学習用データ生成進捗が「-」及び「×」の対話文章に対して、合算類似度を算出する(ステップS204)。これにより、学習用質問回答データとして結合されていない対話データに対して、対話全体で一括りとした指標を算出する。合算類似度を算出する例として、対話内の質問文章のうち、「不明部分」、「質問」、「要望」が含まれる文章を重みづけした上で類似度を合算する方法などがある。これにより、ユーザが求める意図に沿った類似質問の類似度を上昇させることが期待出来る。
Next, of the similarities calculated in step S203, the
次に、プロセッサ31は、ステップS203、S204で算出した類似度を用い、類似度の高さで上位から所定の割合(例えば20%)または所定の数(例えば3)の過去の質問文章を抽出する。そして、抽出した過去の質問文章に対応付けられた過去の回答文章を、質問回答データベース21から抽出し、抽出した過去の質問文章及び回答文章を、回答候補文章として保存する(S205)。また、合算類似度が類似度上位となった場合には、対応する対話の全てを回答候補文章としても良いし、そのうちで最も類似度が高い質問文章及び対応する回答候補文章としても良い。また、学習用質問データの類似度が上位となった場合、学習用質問データ及び対応する学習用回答データを回答候補文章としても良いし、元々の対話データを回答候補文章としても良い。さらには、類似の回答候補文章を重ねて表示しないよう、類似度上位同士の回答文章の類似度を計算し、所定の類似度を超えた場合一方を表示しない、といった形としても良い。そして、回答候補文章および回答候補文章表示画面情報を、出力装置(ネットワークI/F36)に出力して、出力装置(ネットワークI/F36)に回答候補文章および回答候補文章表示画面情報をオペレータ端末3に送信させる。
Next, the
プロセッサ31は、所定時間待機する(ステップS206)。次に、プロセッサ31は、同一ユーザから質問文章が入力されたかを確認する(ステップS207)。入力されたと判定された場合(ステップS207:YES)はステップS201に進み、入力されていないと判定された場合(ステップS207:NO)は、処理を完了する。これにより、プロセッサ31は、対話が続く限り処理を繰り返して回答候補文章を提案する。
The
図13は、オペレータ端末3に表示される回答候補文章表示画面の一例を示す説明図である。図12に示す回答候補文章表示画面1400は、回答候補文章(過去質問文章)欄1401、1402、1403、1404と、回答候補文章(過去回答文章)欄1405、1406、1407、1408を備えている。またこの例では、1つの対話文章を回答候補文章として表示しているが、図12で説明した通り、表示形式はこれに限らない。
FIG. 13 is an explanatory diagram showing an example of an answer candidate sentence display screen displayed on the
オペレータ端末3に、回答候補文章表示画面で、回答候補文章が表示されることで、オペレータは、表示された回答候補文章を参考にして、新規質問文章に対する回答文章を生成できる。これにより、オペレータは、より容易に回答文章を生成できる。また、オペレータが回答文章を生成するために必要となるエネルギーや生成される二酸化炭素の排出量を減らすことができ、地球温暖化を抑制できる。
By displaying the answer candidate sentences on the answer candidate sentence display screen on the
本実施例で対話回答候補提案システム1は、新規質問文章だけでなく、質問回答データベース21及び学習用質問回答データベース22に保存された過去の質問文章および新規質問文章に基づいて、回答候補文章を生成する。これにより、対話回答候補提案システム1は、新規質問文章だけに基づいて回答候補文章を生成する場合に比べて、新規質問文章の質問の意図により一層沿う、好適な回答候補文章を生成し、出力できる。
In this embodiment, the dialog answer
また、質問回答データベース21及び学習用質問回答データベース22に保存された過去の質問文章と、過去の回答文章とを用いて、回答候補文章を生成する。これにより、対話回答候補提案システム1は、より容易に回答候補文章を生成できる。
Further, answer candidate sentences are generated using past question sentences and past answer sentences stored in the question and
また、対話回答候補提案システム1は、ネットワークI/F36(送受信装置)に、回答候補文章を出力して、ネットワークI/F36(送受信装置)に、回答候補文章を、ネットワーク5を介してオペレータ端末3に送信させる。これにより、オペレータ端末3を操作するオペレータは、容易に回答候補文章を読むことができる。
In addition, the dialog answer
以上、本発明を実施例に基づいて説明したが、本発明は上述の例に限定されるものではなく、その趣旨を逸脱しない範囲内で種々の変更が可能である。例えば、前述した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明したすべての構成を備えるものに本発明は限定されない。また、実施例の構成の一部について、他の構成の追加、削除、または置換をしてもよい。 Although the present invention has been described above based on examples, the present invention is not limited to the above-mentioned examples, and various changes can be made without departing from the spirit thereof. For example, the embodiments described above have been described in detail to explain the present invention in an easy-to-understand manner, and the present invention is not necessarily limited to having all the configurations described. Furthermore, other configurations may be added, deleted, or replaced with some of the configurations of the embodiments.
1 対話回答候補提案システム
2 ユーザ端末
3 オペレータ端末
5 ネットワーク
11 学習用質問回答データ生成部
12 回答候補文章生成部
13 質問回答実行部
21 質問回答データベース
22 学習用質問回答データベース
23 疑問詞テーブル
24 同義語テーブル
25 肯定否定語テーブル
26 学習用質問回答データ生成プログラム
27 回答候補文章生成プログラム
28 質問回答実行プログラム
31 プロセッサ
32 主記憶装置
33 副記憶装置
34 入力装置
35 出力装置
36 ネットワークインターフェース
37 データバス
1 Dialogue answer
Claims (14)
前記質問者によって入力された過去の質問文章と、当該過去の質問文章に対する過去の回答文章を対応付けて対話時系列情報を付与して記録した質問回答データベースと、
前記質問回答データベースに保存された情報に基づいて生成された学習用質問文章及び学習用回答文章を記録する学習用質問回答データベースと、
前記質問者によって新規質問文章が入力されたら、前記質問回答データベースまたは前記学習用質問回答データベースから前記新規質問文章に類似する過去の質問文章または学習用質問文章を抽出する回答候補文章生成部と、
抽出された前記新規質問文章に類似する過去の質問文章または学習用質問文章に対応付けられた過去の回答文章を用いて学習用質問回答データを生成する学習用質問回答データ生成部と、
を有することを特徴とする対話回答候補提案システム。 It has a processor, a storage device, and a transmitting/receiving device that communicates with a user terminal used by the questioner and an operator terminal used by the answerer, and it generates answer candidate sentences that are candidates for answer sentences to the question sentences from the questioner. A dialogue answer candidate suggestion system that generates and displays on the operator terminal,
a question-and-answer database in which past question texts input by the questioner are associated with past answer texts to the past question texts, and dialogue time series information is added and recorded;
a learning question and answer database that records learning question sentences and learning answer sentences generated based on information stored in the question and answer database;
an answer candidate sentence generation unit that extracts past question sentences or learning question sentences similar to the new question sentence from the question and answer database or the learning question and answer database when a new question sentence is input by the questioner;
a learning question and answer data generation unit that generates learning question and answer data using past question sentences similar to the extracted new question sentences or past answer sentences associated with the learning question sentences;
A dialog answer candidate suggestion system characterized by having the following.
前記学習用質問回答データ生成部は、前記疑問詞テーブルに保存された前記疑問詞を、文章解析に用いて前記過去の質問文章及び回答文章から抽出し、前記文章解析の結果を予め生成したルールに基づいて前記学習用質問文章を生成することを特徴とする請求項2に記載の対話回答候補提案システム。 storing in the storage device an interrogative word table that stores interrogative words expressing questions;
The learning question and answer data generation unit extracts the interrogative words stored in the interrogative word table from the past question sentences and answer sentences using sentence analysis, and generates a rule in which the result of the sentence analysis is generated in advance. 3. The dialog answer candidate proposal system according to claim 2, wherein the learning question text is generated based on the following.
前記学習用質問回答データベースは、前記同義語テーブルに保存された前記単語を、文章解析に用いて前記過去の質問文章及び回答文章から抽出し、前記文章解析の結果を予め生成したルールに基づいて生成されることを特徴とする請求項2に記載の対話回答候補提案システム。 storing in the storage device a synonym table that stores words that are synonymous when analyzing the question text;
The learning question and answer database extracts the words stored in the synonym table from the past question sentences and answer sentences using sentence analysis, and extracts the words stored in the synonym table from the past question sentences and answer sentences, and extracts the words stored in the synonym table from the past question sentences and answer sentences, based on rules generated in advance as a result of the sentence analysis. The dialog answer candidate suggestion system according to claim 2, wherein the dialog answer candidate suggestion system is generated.
前記プロセッサは、前記ユーザ端末及び前記オペレータ端末からの入力と、前記ユーザ端末及び前記オペレータ端末への出力を前記ネットワークインターフェースを介して行うことを特徴とする請求項2に記載の対話回答候補提案システム。 The transmitting/receiving device includes a network interface that allows the dialogue answer candidate suggestion system to be connected to a network,
The dialog answer candidate proposal system according to claim 2, wherein the processor receives input from the user terminal and the operator terminal, and outputs to the user terminal and the operator terminal via the network interface. .
前記プロセッサは、オペレータ端末に前記新規質問文章に対する類似質問と、前記類似質問に対する回答候補を表示させることを特徴とする請求項6に記載の対話回答候補提案システム。 When the new question sentence from the questioner is input, the answer candidate sentence generation unit searches the learning question and answer database,
7. The dialogue answer candidate proposal system according to claim 6, wherein the processor causes an operator terminal to display a similar question to the new question text and answer candidates to the similar question.
前記質問回答データベースに保存された情報に基づいて生成された学習用質問文章及び学習用回答文章を記録する学習用質問回答データベースと、を有する対話回答候補提案システムにおける対話回答候補提案方法であって、
過去の質問文章または学習用質問文章に対応付けられた過去の回答文章を用いて学習用質問回答データベースを作成し、
前記質問者によって新規質問文章が入力されると、
前記過去の質問文章及び前記学習用質問文章それぞれに対して、前記新規質問文章との類似度を算出して、各対話の合算類似度を算出し、
抽出した前記新規質問文章に類似する過去の質問文章または学習用質問文章に対応付けられた過去の回答文章を前記質問回答データベースまたは前記学習用質問回答データベースから抽出して回答候補文章として前記学習用質問回答データベースに追加することを特徴とする対話回答候補提案方法。 a processor, a storage device, a transmitting/receiving device that communicates with a user terminal used by the questioner and an operator terminal used by the answerer, and past question texts from the questioner and past answers to the past question texts. a question-and-answer database that associates and stores
A method for proposing dialogue answer candidates in a dialogue answer candidate proposal system, comprising: a learning question and answer database that records learning question sentences and learning answer sentences generated based on information stored in the question and answer database; ,
Create a learning question and answer database using past question sentences or past answer sentences that are associated with learning question sentences,
When a new question sentence is input by the questioner,
Calculating the degree of similarity with the new question sentence for each of the past question sentence and the learning question sentence, and calculating the total similarity of each dialogue,
Past question sentences similar to the extracted new question sentences or past answer sentences associated with the learning question sentences are extracted from the question answer database or the learning question answer database and used as answer candidate sentences for the learning purpose. A method for proposing dialogue answer candidates, characterized by adding them to a question and answer database.
前記プロセッサは、前記疑問詞テーブルに保存された前記疑問詞を、文章解析に用いて前記過去の質問文章及び回答文章から抽出し、前記文章解析の結果を予め生成したルールに基づいて前記回答候補文章を作成することを特徴とする請求項9に記載の対話回答候補提案方法。 storing in the storage device an interrogative word table that stores interrogative words expressing questions;
The processor extracts the interrogative words stored in the interrogative word table from the past question sentences and answer sentences using sentence analysis, and selects the answer candidates based on a rule generated in advance from the result of the sentence analysis. 10. The dialogue answer candidate proposal method according to claim 9, further comprising the step of creating a sentence.
前記プロセッサは、前記同義語テーブルに保存された前記単語を、文章解析に用いて前記過去の質問文章及び回答文章から抽出し、前記文章解析の結果を予め生成したルールに基づいて前記回答候補文章を作成することを特徴とする請求項10に記載の対話回答候補提案方法。 storing in the storage device a synonym table that stores words that are synonymous when analyzing the question text;
The processor extracts the words stored in the synonym table from the past question sentences and answer sentences using sentence analysis, and extracts the words from the past question sentences and answer sentences based on the result of the sentence analysis based on a rule generated in advance. 11. The dialogue answer candidate proposal method according to claim 10, wherein:
前記プロセッサは、前記ユーザ端末及び前記オペレータ端末からの入力と、前記ユーザ端末及び前記オペレータ端末への出力を、前記ネットワークインターフェースを介して行うことを特徴とする請求項11に記載の対話回答候補提案方法。 The transmitting/receiving device includes a network interface that allows the dialogue answer candidate proposal system to be connected to a network,
The dialog answer candidate proposal according to claim 11, wherein the processor performs input from the user terminal and the operator terminal and output to the user terminal and the operator terminal via the network interface. Method.
検索により抽出された前記類似質問と、前記類似質問に対する回答候補を前記オペレータ端末に表示させることを特徴とする請求項11に記載の対話回答候補提案方法。 When the new question text from the questioner is input, the processor searches for similar questions from the learning question and answer database;
12. The dialog answer candidate proposing method according to claim 11, further comprising displaying the similar questions extracted by the search and answer candidates for the similar questions on the operator terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022111469A JP2024009724A (en) | 2022-07-11 | 2022-07-11 | Dialogue reply candidate proposal system and dialogue reply candidate proposal method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022111469A JP2024009724A (en) | 2022-07-11 | 2022-07-11 | Dialogue reply candidate proposal system and dialogue reply candidate proposal method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2024009724A true JP2024009724A (en) | 2024-01-23 |
Family
ID=89723894
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022111469A Pending JP2024009724A (en) | 2022-07-11 | 2022-07-11 | Dialogue reply candidate proposal system and dialogue reply candidate proposal method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2024009724A (en) |
-
2022
- 2022-07-11 JP JP2022111469A patent/JP2024009724A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Maroengsit et al. | A survey on evaluation methods for chatbots | |
US10824658B2 (en) | Implicit dialog approach for creating conversational access to web content | |
CN106919655B (en) | Answer providing method and device | |
JP6414956B2 (en) | Question generating device and computer program | |
US10157350B2 (en) | Context based conversation system | |
Al-Zubaide et al. | Ontbot: Ontology based chatbot | |
US20190213284A1 (en) | Semantic representation and realization for conversational systems | |
CN109388691A (en) | For generating the method and system of session proxy | |
JP7169125B2 (en) | Question-answer system, question-answer processing method, and question-answer integrated system | |
Bizer et al. | Silk-a link discovery framework for the web of data | |
JP2021507350A (en) | Reinforcement evidence retrieval of complex answers | |
US20200410056A1 (en) | Generating machine learning training data for natural language processing tasks | |
Guy et al. | The PENG ASP system: architecture, language and authoring tool | |
CA3207902A1 (en) | Auditing citations in a textual document | |
CN112328621B (en) | SQL conversion method, SQL conversion device, SQL conversion computer equipment and SQL conversion computer readable storage medium | |
Kacupaj et al. | Paraqa: a question answering dataset with paraphrase responses for single-turn conversation | |
JP2023535913A (en) | Systems, methods, and programs for improving performance of dialogue systems using dialogue agents | |
Yassin et al. | SeerahBot: An Arabic chatbot about prophet’s biography | |
CN111444729A (en) | Information processing method, device, equipment and readable storage medium | |
Sarkar et al. | NLP algorithm based question and answering system | |
Ma et al. | Scenario-based microservice retrieval using Word2Vec | |
CN114117025B (en) | Information query method, device, storage medium and system | |
JP2024009724A (en) | Dialogue reply candidate proposal system and dialogue reply candidate proposal method | |
JP7416665B2 (en) | Dialogue system and control method for dialogue system | |
Zubair Khan et al. | SeerahBot: An Arabic Chatbot about Prophet’s Biography |