JP7313757B1 - Text generation device and text generation method - Google Patents

Text generation device and text generation method Download PDF

Info

Publication number
JP7313757B1
JP7313757B1 JP2023078285A JP2023078285A JP7313757B1 JP 7313757 B1 JP7313757 B1 JP 7313757B1 JP 2023078285 A JP2023078285 A JP 2023078285A JP 2023078285 A JP2023078285 A JP 2023078285A JP 7313757 B1 JP7313757 B1 JP 7313757B1
Authority
JP
Japan
Prior art keywords
sentence
text
question
candidate
unit
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.)
Active
Application number
JP2023078285A
Other languages
Japanese (ja)
Inventor
雄一 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SpiralAi
Original Assignee
SpiralAi
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SpiralAi filed Critical SpiralAi
Priority to JP2023078285A priority Critical patent/JP7313757B1/en
Application granted granted Critical
Publication of JP7313757B1 publication Critical patent/JP7313757B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

【課題】決められた文字数制限の範囲内で、入力された質問文に対して有効な文章を参考情報として加えたプロンプトを生成できるようにする。【解決手段】ユーザにより入力された質問文をもとに、当該質問文の文字数と合わせたトータルの文字数が大規模言語モデル(LLM)1の回答生成部20に入力可能な文字数制限を超えない文字数で、質問文に関連した追加文章を生成する追加文章生成部11と、入力された質問文に対し、追加文章生成部11により生成された追加文章を参考情報として付加することによってプロンプトを生成するプロンプト生成部12とを備え、プロンプトとしてLLM1に入力可能な文字数制限を超えない文字数となるように追加文章を生成することにより、決められた文字数制限の範囲内で、入力された質問文に対して有効な文章を参考情報として加えたプロンプトを生成することができるようにする。【選択図】図2Kind Code: A1 A prompt can be generated by adding effective sentences as reference information to an input question sentence within a predetermined character limit. SOLUTION: Based on a question text input by a user, the total number of characters combined with the number of characters of the question text does not exceed the limit of the number of characters that can be input to an answer generation unit 20 of a large scale language model (LLM) 1. An additional sentence generation unit 11 for generating additional sentences related to the question sentence with the number of characters, and a prompt is generated by adding the additional sentences generated by the additional sentence generation unit 11 to the input question sentence as reference information. and a prompt generation unit 12 for generating an additional sentence so that the number of characters does not exceed the character limit that can be input to the LLM 1 as a prompt, so that the input question sentence can be answered within the determined character limit. It is possible to generate a prompt to which effective sentences are added as reference information. [Selection drawing] Fig. 2

Description

本発明は、文章生成装置および文章生成方法に関し、特に、大規模言語モデルにプロンプトとして入力する文章を生成する技術に関するものである。 TECHNICAL FIELD The present invention relates to a sentence generation device and a sentence generation method, and more particularly to a technology for generating sentences to be input as prompts to a large-scale language model.

従来、大規模言語モデル(LLM:Large Language Models)を用いて質疑応答などの自然言語処理を行うシステムが提供されている。LLMは、大量のテキストデータを使ってトレーニングされた自然言語処理のモデルのことであり、文章を入力とし、文章を出力する。質疑応答を行うシステムにLLMを適用した場合、LLMに質問文を入力すると、LLMから回答文が出力される。LLMにおいて、入力される文章は「Prompt(プロンプト)」と呼ばれる。 Conventionally, systems have been provided that perform natural language processing such as question-and-answer sessions using large language models (LLMs). LLM is a model of natural language processing trained using a large amount of text data, takes sentences as input, and outputs sentences. When LLM is applied to a question-and-answer system, when a question sentence is input to LLM, an answer sentence is output from LLM. In LLM, an input text is called a "Prompt".

近年、LLMの利活用は進んでいるが、回答の正確性について大きな課題がある。すなわち、LLMが自信満々に間違えた回答を出力するといった振る舞いが問題視されている。それを解決するための手段として、質問文に情報を追加してプロンプトを生成することが行われている。追加情報がある場合、LLMは追加情報を参考にして質問文に対する回答文を生成する。例えば、図13に示すように、質問文の他に参考情報を加えてプロンプトを作ることにより、参考情報を考慮した適切な回答文がLLMから得られやすくなる。 In recent years, the utilization of LLM has progressed, but there is a big problem with the accuracy of answers. That is, the behavior of the LLM confidently outputting an incorrect answer is regarded as a problem. As a means to solve this problem, adding information to the question sentence to generate a prompt is being performed. If there is additional information, the LLM will refer to the additional information to generate an answer to the question. For example, as shown in FIG. 13, by adding reference information to a question to create a prompt, it becomes easier to obtain an appropriate answer from the LLM considering the reference information.

従来、追加情報を利用してプロンプトを生成する技術として、CompletionモデルとEmbeddingモデルとを組み合わせた手法が提案されている。Completionモデルは、質問文や参考文を含むプロンプトを入力し、それをもとに生成した回答文を出力するモデルである。Embeddingモデルは、入力された文章を、その意味合いを踏まえて数値的なベクトルに変換するモデルである。2つの文章の意味合いが近い場合、それらから生成されるベクトルが近くなるようモデルのパラメータが調整されている。これらのモデルを組み合わせた手法は、Embeddingモデルのベクトルを用いて質問文に関連深い情報を検索し、その検索結果をプロンプトに反映させた上で、Completionモデルを実行するというスタイルである。 Conventionally, as a technology for generating prompts using additional information, a method combining a Completion model and an Embedding model has been proposed. The Completion model is a model that inputs prompts including question sentences and reference sentences and outputs answer sentences generated based on them. The embedding model is a model that converts an input sentence into a numerical vector based on its meaning. If two sentences are close in meaning, the parameters of the model are adjusted so that the vectors generated from them are close. A method that combines these models is a style in which vectors of the Embedding model are used to search for information that is deeply related to the question, and the completion model is executed after the search results are reflected in the prompt.

このように、入力された質問文に対して参考情報を追加してプロンプトを生成し、生成したプロンプトを言語モデルに入力して回答文を生成する技術は、特許文献1にも開示されている。特許文献1には、プロンプトへの情報追加に関して、チャットボットのキャラクターに関する説明を含む指示文をプロンプトに追加すること、キャラクター対話サンプルをプロンプトに追加すること、対話主題と関連して対話保存データベースから取得された対話シーンをプロンプトに追加すること、質問文に含まれる単語を同義語などに置き換えてプロンプトに追加することなどが開示されている。 A technique of adding reference information to an input question sentence to generate a prompt, and inputting the generated prompt into a language model to generate an answer sentence is also disclosed in Japanese Unexamined Patent Application Publication No. 2002-200310. Regarding adding information to a prompt, Patent Literature 1 discloses adding an instruction including an explanation about a chatbot character to the prompt, adding a character dialogue sample to the prompt, adding a dialogue scene obtained from a dialogue storage database in relation to the dialogue theme to the prompt, and replacing words included in question sentences with synonyms and the like and adding them to the prompt.

また、特許文献2,3には、入力された質問文から他の質問文を生成してプロンプトに追加することが開示されている。ここで、特許文献2には、過去の回答履歴に基づいて他の質問文を生成することが開示されている。特許文献3には、質問文に含まれる単語を縮小された用語などに置き換えて他の質問文を生成することが開示されている。 Further, Patent Documents 2 and 3 disclose that another question is generated from an input question and added to the prompt. Here, Patent Literature 2 discloses that another question sentence is generated based on the past answer history. Patent Literature 3 discloses that words included in a question sentence are replaced with shortened terms or the like to generate another question sentence.

特開2022-180282号公報Japanese Patent Application Laid-Open No. 2022-180282 特表2001-519559号公報Japanese Patent Publication No. 2001-519559 特表2002-508863号公報Japanese Patent Publication No. 2002-508863

上述の通り、質問文に参考情報を追加して生成したプロンプトをLLMに入力することは、参考情報を追加しない場合に比べて適切な回答文が得られやすくなるという点で有効である。しかしながら、CompletionモデルのLLMには入力の文字数制限があるため、入力された質問文をもとに生成された文章を参考情報として無制限に加えることができないという問題があった。 As described above, inputting a prompt generated by adding reference information to a question text into the LLM is effective in that an appropriate answer text can be obtained more easily than when the reference information is not added. However, since the LLM of the Completion model has a limit on the number of input characters, there is a problem that sentences generated based on input question sentences cannot be added unlimitedly as reference information.

本発明は、このような問題を解決するために成されたものであり、決められた文字数制限の範囲内で、入力された質問文に対して有効な文章を参考情報として加えたプロンプトを生成できるようにすることを目的とする。 The present invention has been made to solve such problems, and aims to generate a prompt to which effective sentences are added as reference information to an input question sentence within the limit of the determined number of characters.

上記した課題を解決するために、本発明では、入力された質問文をもとに、当該質問文の文字数と合わせたトータルの文字数が大規模言語モデルに入力可能な文字数制限を超えない文字数で、質問文に関連した追加文章を生成し、当該生成した追加文章を参考情報として質問文に付加することにより、大規模言語モデルに入力するためのプロンプトを生成するようにしている。ここで、入力された質問文に関連した候補文章を取得し、取得した候補文章を調整することによって追加文章を生成するようにしている。 In order to solve the above-described problem, in the present invention, based on an input question sentence, the total number of characters including the number of characters of the question sentence does not exceed the limit of the number of characters that can be input to the large-scale language model. Here, candidate sentences related to the input question sentence are acquired, and additional sentences are generated by adjusting the acquired candidate sentences.

上記のように構成した本発明によれば、入力された質問文に関連した文章を追加してプロンプトを生成する際に、プロンプトとして大規模言語モデルに入力可能な文字数制限を超えない文字数となるように追加文章が生成されるので、決められた文字数制限の範囲内で、入力された質問文に対して有効な文章を参考情報として加えたプロンプトを生成することができる。 According to the present invention configured as described above, when generating a prompt by adding sentences related to an input question sentence, the additional sentence is generated so that the number of characters does not exceed the character limit that can be input to the large-scale language model as a prompt.

本実施形態の文章生成装置を備えた言語モデルシステムの構成例を示す図である。It is a figure which shows the structural example of the language model system provided with the sentence production|generation apparatus of this embodiment. 本実施形態による文章生成部(文章生成装置)の機能構成例を示すブロック図である。It is a block diagram which shows the functional structural example of the sentence production|generation part (sentence production|generation apparatus) by this embodiment. 第1の候補文章取得手法を実装する候補文章取得部の機能構成例を示すブロック図である。FIG. 10 is a block diagram showing a functional configuration example of a candidate sentence obtaining unit that implements the first candidate sentence obtaining method; 3つの文章DBからそれぞれ取得される候補文章を用いて構成されるプロンプトの一例を示す図である。FIG. 10 is a diagram showing an example of a prompt configured using candidate sentences respectively acquired from three sentence DBs; 第2の候補文章取得手法を実装する候補文章取得部の機能構成例を示すブロック図である。FIG. 11 is a block diagram showing a functional configuration example of a candidate sentence obtaining unit that implements a second candidate sentence obtaining method; 第3の候補文章取得手法を実装する候補文章取得部の機能構成例を示すブロック図である。FIG. 11 is a block diagram showing a functional configuration example of a candidate sentence obtaining unit that implements a third candidate sentence obtaining method; 第3の候補文章取得手法を適用して生成されるプロンプトおよび別の質問文の一例を示す図である。FIG. 10 is a diagram showing an example of a prompt and another question sentence generated by applying the third candidate sentence acquisition method; 第3の候補文章取得手法を適用して生成されるプロンプトおよび別の質問文の他の例を示す図である。FIG. 10 is a diagram showing another example of a prompt and another question sentence generated by applying the third candidate sentence acquisition technique; 第4の候補文章取得手法を実装する候補文章取得部の機能構成例を示すブロック図である。FIG. 12 is a block diagram showing a functional configuration example of a candidate sentence obtaining unit that implements a fourth candidate sentence obtaining method; 教師あり学習のための質問・回答の組を生成するためのプロンプトの例を示す図である。FIG. 10 shows an example of prompts for generating question-answer pairs for supervised learning. 第1の候補文章調整手法により候補文章を調整した2つの例を示す図である。FIG. 10 is a diagram showing two examples of candidate sentences adjusted by the first candidate sentence adjustment method; 本実施形態による文章生成部(文章生成装置)の動作例を示すフローチャートである。It is a flowchart which shows the operation example of the sentence production|generation part (sentence production|generation apparatus) by this embodiment. 質問文に参考情報を加えて生成したプロンプトをLLMに入力しれ回答文を得る内容の一例を示す図である。It is a figure which shows an example of the content which inputs into LLM the prompt produced|generated by adding reference information to the question sentence, and obtains an answer sentence.

以下、本発明の一実施形態を図面に基づいて説明する。図1は、本実施形態の文章生成装置を備えた言語モデルシステム100の構成例を示す図である。本実施形態の言語モデルシステム100は、大規模言語モデル(LLM)1および文章データベース(DB)2を備えて構成される。 An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing a configuration example of a language model system 100 equipped with a sentence generation device of this embodiment. A language model system 100 of this embodiment comprises a large scale language model (LLM) 1 and a text database (DB) 2 .

LLM1は、インターネットまたは携帯電話網などの通信ネットワーク300を介してユーザ端末200と接続され、ユーザ端末200から質問文を入力し、それに対する回答文を生成してユーザ端末200に出力する。LLM1は、回答文を生成する際に、質問文に関連する追加文章を生成し、質問文と追加文章とを含むプロンプトを生成する。 The LLM 1 is connected to a user terminal 200 via a communication network 300 such as the Internet or a mobile phone network, inputs a question from the user terminal 200 , generates an answer to the question, and outputs the answer to the user terminal 200 . When the LLM 1 generates an answer sentence, it generates an additional sentence related to the question sentence and generates a prompt including the question sentence and the additional sentence.

文章DB2は、LLM1がユーザ端末200より入力された質問文をもとに追加情報を生成する際に使用するデータベースである。なお、図1ではLLM1に文章DB2が接続される構成を示しているが、これに限定されない。例えば、文章DB2の一部または全部が通信ネットワーク300に接続される構成としてもよい。この場合、LLM1が通信ネットワーク300を介して文章DB2にアクセスし、必要な情報を取得する。 The text DB2 is a database used when the LLM1 generates additional information based on the question text input from the user terminal 200. FIG. Although FIG. 1 shows a configuration in which the text DB2 is connected to the LLM1, the configuration is not limited to this. For example, part or all of the text DB 2 may be configured to be connected to the communication network 300 . In this case, the LLM1 accesses the text DB2 via the communication network 300 and obtains the necessary information.

LLM1は、大量のテキストデータを使ってトレーニングされたモデルに従って自然言語処理を行うソフトウェアであり、そのソフトウェアにより実現される機能構成として、文章生成部10および回答生成部20を備えている。文章生成部10は本実施形態の文章生成装置に相当するものであり、その機能はコンピュータのRAMやROM、ハードディスクまたは半導体メモリ等の記憶媒体に記憶されたプログラムがCPUの制御により動作することによって実現される。回答生成部20の機能についても同様に実現される。 The LLM 1 is software that performs natural language processing according to a model trained using a large amount of text data. The text generation unit 10 corresponds to the text generation device of this embodiment, and its function is realized by the operation of a program stored in a storage medium such as a computer's RAM, ROM, hard disk, or semiconductor memory under the control of the CPU. The function of the answer generation unit 20 is similarly realized.

本実施形態の文章生成部10は、ユーザ端末200より入力された質問文に対して参考情報を付加することにより、LLM1に入力するためのプロンプトを生成する。LLM1に入力するためのプロンプトとは、具体的には回答生成部20に入力するためのプロンプトである。すなわち、文章生成部10は、ユーザ端末200より入力された質問文をもとに追加文章を生成し、さらにこの追加文章を質問文に対する参考情報として付加した文章を生成してこれをプロンプトとして回答生成部20に入力する。 The text generation unit 10 of the present embodiment generates a prompt for input to the LLM 1 by adding reference information to the question text input from the user terminal 200 . A prompt for input to the LLM 1 is specifically a prompt for input to the answer generator 20 . That is, the text generation part 10 generates an additional text based on the question text input from the user terminal 200, generates a text with the additional text added as reference information for the question text, and inputs the text to the answer generation part 20 as a prompt.

回答生成部20は、文章生成部10により生成されたプロンプトを入力し、当該プロンプトに含まれる質問文に対する回答文を、プロンプトに含まれる追加文章を参考情報として利用して生成する。すなわち、回答生成部20は、参考情報に対する適合度がより高い回答文を生成する。 The answer generation unit 20 receives the prompt generated by the text generation unit 10, and generates an answer text to the question text included in the prompt by using the additional text included in the prompt as reference information. That is, the answer generation unit 20 generates an answer sentence with a higher degree of conformity to the reference information.

図2は、文章生成部10の機能構成例を示すブロック図である。図2に示すように、本実施形態の文章生成部10は、機能構成として、追加文章生成部11およびプロンプト生成部12を備えている。追加文章生成部11は、より具体的な機能構成として、候補文章取得部111および文章調整部112を備えている。 FIG. 2 is a block diagram showing a functional configuration example of the text generation unit 10. As shown in FIG. As shown in FIG. 2, the text generation unit 10 of the present embodiment includes an additional text generation unit 11 and a prompt generation unit 12 as functional configurations. The additional text generation unit 11 includes a candidate text acquisition unit 111 and a text adjustment unit 112 as more specific functional configurations.

追加文章生成部11は、ユーザ端末200より入力された質問文をもとに、当該質問文の文字数と合わせたトータルの文字数がLLM1の回答生成部20に入力可能な文字数制限を超えない文字数で、入力された質問文に関連した追加文章を生成する。プロンプト生成部12は、ユーザ端末200より入力された質問文に対し、追加文章生成部11により生成された追加文章を参考情報として付加することによってプロンプトを生成する。 Based on the question text input from the user terminal 200, the additional text generating part 11 generates the additional text related to the input question text with the total number of characters combined with the number of characters of the question text not exceeding the limit of the number of characters that can be input to the answer generating part 20 of the LLM 1. - 特許庁The prompt generation unit 12 generates a prompt by adding the additional text generated by the additional text generation unit 11 as reference information to the question text input from the user terminal 200 .

例えば、図13に示したように、ユーザ端末200から「明日の広島は洗濯物を干すのに適していますか?」といった質問文が入力されたときに、追加文章生成部11は#参考事実で示される3つの追加文章を生成し、プロンプト生成部12はこの追加文章を質問文に加えてプロンプトを生成する。図13の例では、プロンプトの冒頭に「以下の#質問に答えてください。答える際には、#参考事実に書かれている内容を参照して、それに基づいて回答してください。」といった文章も追加している。このとき追加文章生成部11は、入力された質問文と追加文章とを合わせて構成されるプロンプトのトータルの文字数がLLM1の入力文字数の制限を超えないように追加文章を生成する。 For example, as shown in FIG. 13, when a question such as "Is Hiroshima tomorrow suitable for hanging laundry?" In the example of Fig. 13, a sentence such as "Please answer the following #questions. When answering, please refer to the contents written in #reference facts and answer based on them." is added at the beginning of the prompt. At this time, the additional text generation unit 11 generates the additional text so that the total number of characters of the prompt composed of the input question text and the additional text does not exceed the input character limit of the LLM1.

ここで、追加文章生成部11の候補文章取得部111は、ユーザ端末200より入力された質問文をもとに、当該質問文に関連した候補文章を取得する。回答生成部20において質問文に対してより適切な回答文を生成するためには、質問文に対して適切な追加文章を生成することが重要となる。適切な追加文章を生成するためには、文章DB2から適切な候補文章を取得することが重要となる。そのために候補文章取得部111は、後述する手法の何れか1つまたは複数を用いて候補文章を取得する。 Based on the question text input from the user terminal 200, the candidate text acquisition unit 111 of the additional text generation unit 11 acquires candidate texts related to the question text. In order for the answer generator 20 to generate a more appropriate answer to the question, it is important to generate appropriate additional sentences to the question. In order to generate appropriate additional sentences, it is important to acquire appropriate candidate sentences from the sentence DB2. For this purpose, the candidate sentence acquisition unit 111 acquires candidate sentences using one or more of the methods described later.

文章調整部112は、候補文章取得部111により取得された候補文章を調整することによって追加文章を生成する。候補文章取得部111により取得された候補文章の文字数が多い場合、その候補文章をそのまま質問文に追加してプロンプトを生成すると、トータルの文字数がLLM1の入力文字数の制限を超えてしまうことがある。このような場合に文章調整部112は、後述する手法の何れか1つまたは複数を用いて候補文章を調整することにより、トータルの文字数が文字数制限の範囲内となるようにする。 The sentence adjustment unit 112 generates additional sentences by adjusting the candidate sentences acquired by the candidate sentence acquisition unit 111 . When the candidate text acquired by the candidate text acquisition part 111 has a large number of characters, if the candidate text is added to the question text as it is to generate a prompt, the total number of characters may exceed the limit of the number of input characters of the LLM1. In such a case, the sentence adjustment unit 112 adjusts the candidate sentences using one or more of the methods described later so that the total number of characters is within the character number limit.

以下に、候補文章取得部111による候補文章の取得方法について詳述する。候補文章取得部111は、以下に述べる手法の何れか1つまたは複数を適用して候補文章を取得することが可能である。 A method of acquiring candidate sentences by the candidate sentence acquisition unit 111 will be described in detail below. The candidate sentence acquisition unit 111 can acquire candidate sentences by applying one or more of the techniques described below.

<第1の候補文章取得手法>
図3は、第1の候補文章取得手法を実装する候補文章取得部111の機能構成例を示すブロック図である。図3に示す例において、候補文章取得部111は、キーワード抽出部111aおよびキーワード検索部111bを備えている。
<First Candidate Sentence Acquisition Method>
FIG. 3 is a block diagram showing a functional configuration example of the candidate sentence obtaining unit 111 that implements the first candidate sentence obtaining method. In the example shown in FIG. 3, the candidate sentence acquisition unit 111 includes a keyword extraction unit 111a and a keyword search unit 111b.

キーワード抽出部111aは、ユーザ端末200より入力された質問文から検索キーワードを抽出する。例えば、キーワード抽出部111aは、入力された質問文から形態素解析により単語を検索キーワードとして抽出する。ここで、特定の品詞(例えば、名詞や動詞、形容詞、形容動詞など)に限定して単語を抽出してもよいし、特定の品詞(例えば、助詞や助動詞、副詞、連体詞、接続詞、感動詞など)を除外して単語を抽出してもよい。抽出する単語は1つでも複数でもよいが、複数の単語を抽出して検索キーワードとした場合には、質問文との関連性がより強い文章を検索して取得することが可能である。 The keyword extraction unit 111a extracts a search keyword from the question text input from the user terminal 200. FIG. For example, the keyword extraction unit 111a extracts words as search keywords from the input question sentence by morphological analysis. Here, words may be extracted by limiting to specific parts of speech (e.g., nouns, verbs, adjectives, adjectives, etc.), or words may be extracted by excluding specific parts of speech (e.g., particles, auxiliary verbs, adverbs, adnominals, conjunctions, interjections, etc.). One or a plurality of words may be extracted, but if a plurality of words are extracted and used as a search keyword, it is possible to retrieve and acquire sentences that are more closely related to the question sentence.

キーワード検索部111bは、キーワード抽出部111aにより抽出された検索キーワードを用いて、複数の文章が記録された文章DB2を検索することにより、検索キーワードを含む文章を候補文章として文章DB2から取得する。キーワード抽出部111aにより複数の検索キーワードを抽出した場合、キーワード検索部111bは、それら複数の検索キーワードを全て含む文章を候補文章として文章DB2から取得する。該当する文章が1つも見つからない場合は、何れかの検索キーワードを省いて検索を再実行するようにしてもよい。 The keyword search unit 111b uses the search keyword extracted by the keyword extraction unit 111a to search the sentence DB2 in which a plurality of sentences are recorded, thereby obtaining sentences including the search keyword from the sentence DB2 as candidate sentences. When the keyword extraction unit 111a extracts a plurality of search keywords, the keyword search unit 111b acquires sentences including all of the plurality of search keywords from the sentence DB2 as candidate sentences. If no relevant sentence is found, the search may be re-executed by omitting any of the search keywords.

検索キーワードに合致する文章が複数存在する場合、キーワード検索部111bは、それら複数の文章を全て取得するようにしてもよい。なお、検索キーワードに合致する複数の文章を全て取得した場合、そのトータルの文字数がLLM1の入力文字数の制限を超えてしまう可能性が高くなる。そこで、検索キーワードとの一致度が高い方から所定数の文章を候補文章として取得するようにしてもよい。 If there are multiple sentences that match the search keyword, the keyword search unit 111b may acquire all of the multiple sentences. In addition, when all the plural sentences that match the search keyword are acquired, the total number of characters is likely to exceed the input character limit of the LLM1. Therefore, a predetermined number of sentences may be acquired as candidate sentences in descending order of degree of matching with the search keyword.

ここで、検索対象とする文章DB2は、図3に示すように複数種類あってもよい。図3では、事実情報DB2a、ペルソナ情報DB2b、正解例情報DB2cの3つを示している(以下、3つをまとめて文章DB2a~2cということがある)。キーワード検索部111bは、これら3つの文章DB2a~2cの何れか1つまたは複数を対象として、キーワード抽出部111aにより抽出された単語を検索キーワードとして文章の検索を実行する。回答生成部20により生成される回答文の正確性を向上させるために、複数のデータベースを対象として検索を行うのが好ましい。 Here, as shown in FIG. 3, there may be a plurality of types of text DB2 to be searched. FIG. 3 shows three of fact information DB 2a, persona information DB 2b, and correct example information DB 2c. The keyword search unit 111b executes a sentence search for one or more of these three sentence DBs 2a to 2c using the words extracted by the keyword extraction unit 111a as search keywords. In order to improve the accuracy of the answer sentence generated by the answer generator 20, it is preferable to search multiple databases.

事実情報DB2aは、例えば、特定企業のWebページやWikipedia(登録商標)、または、ユーザ端末200を使用するユーザが自らアップロードしたtxt,csv,word,excel,pdfなどのファイルを参照可能な状態で保持するデータベースである。ペルソナ情報DB2bは、特定ユーザによるLLM1との過去の対話履歴、または、そこから抽出された情報であってそのユーザのリテラシ等が推し量れる情報(例えば、特定の技術分野に関する前提知識の程度、過去の旅行履歴、年齢・性別・家族構成などのデモグラフィック属性など)を保持するデータベースである。正解例情報DB2cは、任意のユーザによるLLM1との過去の対話履歴に対して人が手動で「LLM1は本来こう返答すべきだった」という修正を加えた情報を保持するデータベースである。 The factual information DB 2a is a database that holds, for example, web pages of specific companies, Wikipedia (registered trademark), or files such as txt, csv, word, excel, and pdf uploaded by the user using the user terminal 200 in a referable state. The persona information DB 2b is a database that holds a history of past interactions with the LLM 1 by a specific user, or information extracted therefrom from which the user's literacy can be inferred (e.g., degree of pre-knowledge regarding a specific technical field, past travel history, demographic attributes such as age, gender, family composition, etc.). The correct example information DB 2c is a database that holds information obtained by manually correcting a past interaction history with the LLM 1 by an arbitrary user, such as "LLM 1 should have replied in this way".

図4は、3つの文章DB2a~2cからそれぞれ取得される候補文章を用いて構成されるプロンプトの一例を示す図である。図4において、「#参照可能な情報は事実情報DB2aから取得された候補文章、「#質問者のペルソナ」はペルソナ情報DB2bから取得された候補文章、「#参考になる回答例」は正解例情報DB2cから取得された候補文章である。図4に示す例では、プロンプトに含まれる全ての文章のトータルの文字数がLLM1の入力文字数の制限を超えていないため、文章調整部112の処理を実行することは不要であり、図4に示すプロンプトが回答生成部20に入力される。 FIG. 4 is a diagram showing an example of a prompt constructed using candidate sentences respectively obtained from the three sentence DBs 2a-2c. In FIG. 4, "# referenceable information is a candidate sentence acquired from the fact information DB 2a, "# questioner's persona" is a candidate sentence acquired from the persona information DB 2b, and "# reference answer example" is a candidate sentence acquired from the correct example information DB 2c. In the example shown in FIG. 4, since the total number of characters in all the sentences included in the prompt does not exceed the input character limit of LLM1, there is no need to execute the processing of the sentence adjustment unit 112, and the prompt shown in FIG.

<第2の候補文章取得手法>
図5は、第2の候補文章取得手法を実装する候補文章取得部111の機能構成例を示すブロック図である。図5に示す例において、候補文章取得部111は、ベクトル算出部111cおよびベクトル検索部111dを備えている。
<Second Candidate Sentence Acquisition Method>
FIG. 5 is a block diagram showing a functional configuration example of the candidate sentence obtaining unit 111 that implements the second candidate sentence obtaining method. In the example shown in FIG. 5, the candidate sentence acquisition unit 111 includes a vector calculation unit 111c and a vector search unit 111d.

ベクトル算出部111cは、ユーザ端末200より入力された質問文から文章の特徴ベクトルを算出する。例えば、ベクトル算出部111cは、Embeddingモデルの小規模言語モデルを備え、当該Embeddingモデルを用いて、入力された質問文を数値的なベクトルに変換する。小規模言語モデルは、LLM1に比べて少ないデータに基づきトレーニングされた自然言語処理モデルである。なお、特徴ベクトルの算出方法はこれに限定されず、その他の公知技術を適用してもよい。例えば、入力された質問文から形態素解析により単語を抽出し、単語の意味や単語同士の関係性をベクトル化するようにしてもよい。 The vector calculation unit 111c calculates the feature vector of the text from the question text input from the user terminal 200. FIG. For example, the vector calculation unit 111c has a small-scale language model of an embedding model, and uses the embedding model to convert an input question text into a numerical vector. A small language model is a natural language processing model trained on less data than LLM1. Note that the feature vector calculation method is not limited to this, and other known techniques may be applied. For example, words may be extracted from an input question sentence by morphological analysis, and the meanings of the words and the relationships between the words may be vectorized.

第2の候補文章取得手法を適用するために、文章DB2a~2cに記録される複数の文章についてもあらかじめ特徴ベクトルが算出され、複数の文章がそれぞれの特徴ベクトルとあらかじめ関連付けて記録されている。ベクトル検索部111dは、入力された質問文についてベクトル算出部111cにより算出された特徴ベクトルを用いて文章DB2a~2cを検索することにより、ベクトル算出部111cにより算出された特徴ベクトルとの類似度について所定の条件を満たす特徴ベクトルに関連付けられた文章を候補文章として文章DB2a~2cから取得する。 In order to apply the second candidate sentence acquisition method, feature vectors are also calculated in advance for the plurality of sentences recorded in the sentence DBs 2a to 2c, and the plurality of sentences are recorded in association with the respective feature vectors in advance. The vector search unit 111d searches the text DBs 2a to 2c using the feature vectors calculated by the vector calculation unit 111c for the input question sentence, thereby obtaining sentences associated with the feature vectors that satisfy a predetermined condition as candidate sentences from the text DBs 2a to 2c.

文章を取得する際の所定の条件は、任意に定めることが可能である。例えば、特徴ベクトルの類似度が最も大きい方から所定数の文章を取得するようにすることが可能である。あるいは、特徴ベクトルの類似度が所定の閾値よりも大きい文章を取得するようにしてもよい。この場合、特徴ベクトルの類似度が所定の閾値よりも大きい文章を全て取得するようにしてもよいし、所定の閾値よりも大きい文章が所定数を超える場合は類似度が最も大きい方から所定数の文章を取得するようにしてもよい。 Predetermined conditions for obtaining text can be arbitrarily determined. For example, it is possible to obtain a predetermined number of sentences in descending order of feature vector similarity. Alternatively, sentences having feature vector similarities greater than a predetermined threshold may be obtained. In this case, it is possible to acquire all the sentences whose feature vector similarity is greater than a predetermined threshold, or if the number of sentences whose similarity is greater than the predetermined threshold exceeds a predetermined number, a predetermined number of sentences having the highest similarity may be acquired.

<第3の候補文章取得手法>
図6は、第3の候補文章取得手法を実装する候補文章取得部111の機能構成例を示すブロック図である。図6に示す例において、候補文章取得部111は、図5に示したベクトル算出部111cおよびベクトル検索部111dに加え、質問文生成部111eを更に備えている。また、文章DB2は、複数の例示質問文を記録した例示質問文DB2dを更に備えている。
<Third Candidate Sentence Acquisition Method>
FIG. 6 is a block diagram showing a functional configuration example of the candidate sentence obtaining unit 111 that implements the third candidate sentence obtaining method. In the example shown in FIG. 6, the candidate sentence acquisition unit 111 further includes a question sentence generation unit 111e in addition to the vector calculation unit 111c and the vector search unit 111d shown in FIG. In addition, the sentence DB2 further includes an exemplary question sentence DB2d in which a plurality of exemplary question sentences are recorded.

質問文生成部111eは、ユーザ端末200より入力された質問文から別の質問文を生成する。ベクトル算出部111cは、ユーザ端末200より入力された質問文の特徴ベクトルに加え、質問文生成部111eにより生成された別の質問文の特徴ベクトルを算出する。ベクトル検索部111dは、ユーザ端末200より入力された質問文から算出された特徴ベクトルおよび質問文生成部111eにより生成された別の質問文から算出された特徴ベクトルを用いて文章DB2a~2cを検索し、候補文章を取得する。 The question text generation unit 111 e generates another question text from the question text input from the user terminal 200 . In addition to the feature vector of the question text input from the user terminal 200, the vector calculation unit 111c calculates the feature vector of another question text generated by the question text generation unit 111e. The vector search unit 111d uses the feature vector calculated from the question text input from the user terminal 200 and the feature vector calculated from another question text generated by the question text generation unit 111e to search the text DBs 2a to 2c to obtain candidate texts.

ここで、質問文生成部111eは、例えばFew-shot learnigを適用して生成した小規模言語モデルを備え、入力された質問文に対して例示質問文を付加したプロンプトを構成して小規模言語モデルに入力することにより、別の質問文を小規模言語モデルから出力する。例示質問文は例示質問文DB2dから取得する。図7は、この場合に候補文章取得部111により生成されるプロンプトおよび別の質問文の例を示す図である。図7の例では、入力された質問文に対して、当該質問文に含まれる「沖縄旅行」をキーワードとして例示質問文DB2dから抽出される例示質問文を付加してプロンプトを構成し、当該例示質問文で示される通りに別の質問文を生成している。 Here, the question text generation unit 111e has a small-scale language model generated by applying Few-shot learning, for example, constructs a prompt by adding an example question text to the input question text, and inputs it to the small-scale language model, thereby outputting another question text from the small-scale language model. Exemplary question sentences are acquired from the exemplary question sentence DB 2d. FIG. 7 is a diagram showing an example of a prompt and another question sentence generated by the candidate sentence acquisition unit 111 in this case. In the example of FIG. 7, a prompt is formed by adding an exemplary question sentence extracted from the exemplary question sentence DB 2d using "Okinawa trip" included in the question sentence as a keyword to the input question sentence, and another question sentence is generated as indicated by the example question sentence.

また、質問文生成部111eは、ユーザ端末200より入力された質問文に応じて、参考となる質問生成例を動的に生成してプロンプトを構成するようにしてもよい。例えば、質問文生成部111eは、ユーザ端末200より入力された質問文にマッチする例示質問文を例示質問文DB2dから抽出し、抽出した例示質問文から参考となる質問生成例を生成してプロンプトを構成することが可能である。この例において、入力された質問文にマッチする例示質問文は、例えば、入力された質問文から算出される特徴ベクトルとの類似度が閾値以上の特徴ベクトルに関連付けられた例示質問文とすることが可能である。 In addition, the question text generation unit 111e may dynamically generate a reference question generation example according to a question text input from the user terminal 200 to compose a prompt. For example, the question text generation unit 111e can extract example question texts that match the question text input from the user terminal 200 from the example question text DB 2d, generate a question generation example that serves as a reference from the extracted example question texts, and compose a prompt. In this example, the exemplary question sentence that matches the input question sentence can be, for example, an exemplary question sentence associated with a feature vector whose similarity to the feature vector calculated from the input question sentence is equal to or greater than a threshold.

図8は、この場合に候補文章取得部111により生成されるプロンプトおよび別の質問文の例を示す図である。図8の例では、入力された質問文にマッチする複数の例示質問文を例示質問文DB2dから抽出し、これらから参考となる質問生成例を生成してプロンプトを構成している。小規模言語モデルはこのプロンプトに含まれる複数の質問生成例を利用して、別の質問文を動的に生成している。この例では、小規模言語モデルは過去の会話履歴を用いたトレーニングにより生成されており、質問生成例の通りに別の質問文を生成するのではなく、質問生成例と会話履歴とを入力して別の質問文を生成している。 FIG. 8 is a diagram showing an example of a prompt and another question sentence generated by the candidate sentence acquisition unit 111 in this case. In the example of FIG. 8, a plurality of exemplary question sentences that match the input question sentence are extracted from the exemplary question sentence DB 2d, and a question generation example that serves as a reference is generated from these to compose a prompt. The small-scale language model uses multiple question generation examples included in this prompt to dynamically generate another question sentence. In this example, the small-scale language model is generated by training using the past conversation history, and instead of generating another question sentence according to the question generation example, another question sentence is generated by inputting the question generation example and the conversation history.

<第4の候補文章取得手法>
図9は、第4の候補文章取得手法を実装する候補文章取得部111の機能構成例を示すブロック図である。図9(a)に示す例において、候補文章取得部111は、質問生成例生成部111fおよび質問・回答生成部111gを備えている。また、文章DB2として文章DB2a~2cは備えておらず、例示質問文DB2dを備えている。
<Fourth Candidate Sentence Acquisition Method>
FIG. 9 is a block diagram showing a functional configuration example of the candidate sentence acquisition unit 111 that implements the fourth candidate sentence acquisition method. In the example shown in FIG. 9A, the candidate sentence acquisition unit 111 includes a question generation example generation unit 111f and a question/answer generation unit 111g. Further, the text DB2 does not include the text DB2a to 2c, but includes an exemplary question text DB2d.

質問生成例生成部111fは、ユーザ端末200より入力された質問文から参考となる質問生成例を生成する。質問生成例生成部111fによる参考となる質問生成例の生成方法は、図6および図8に例示した質問文生成部111eによる生成方法と同じでよい。すなわち、質問生成例生成部111fは、ユーザ端末200より入力された質問文にマッチする例示質問文を例示質問文DB2dから抽出し、抽出した例示質問文から参考となる質問生成例を生成する。もしくは、質問・回答生成部111gが柔軟な読解能力を持つ小規模言語モデルであることから、わざわざ質問生成例の生成をせず、ユーザ端末200より入力された質問をそのまま質問・回答生成部111gに入力しても良い。この場合、質問生成例生成部111fと例示質問文DB2dは構成から削除してもよい。 The question generation example generation unit 111f generates a question generation example to be used as a reference from the question text input from the user terminal 200. FIG. The method of generating a reference question generation example by the question generation example generation unit 111f may be the same as the generation method by the question generation unit 111e illustrated in FIGS. That is, the question generation example generation unit 111f extracts from the example question sentence DB 2d an example question sentence that matches the question sentence input from the user terminal 200, and generates a question generation example that serves as a reference from the extracted example question sentence. Alternatively, since the question/answer generation unit 111g is a small-scale language model with flexible reading comprehension ability, the question input from the user terminal 200 may be directly input to the question/answer generation unit 111g without generating question generation examples. In this case, the question generation example generation unit 111f and the example question sentence DB 2d may be deleted from the configuration.

質問・回答生成部111gは、質問生成例生成部111fにより生成された参考となる質問生成例を小規模言語モデルに入力することにより、質問文と回答文との組み合わせを候補文章として小規模言語モデルから取得する。 The question/answer generation unit 111g inputs the reference question generation examples generated by the question generation example generation unit 111f into the small-scale language model, thereby obtaining combinations of question sentences and answer sentences as candidate sentences from the small-scale language model.

質問・回答生成部111gが備える小規模言語モデルは、例えばLLM1を所定のタスクに合わせてファインチューニングしたモデルとすることが可能である。なお、小規模言語モデルは小規模なモデルであるものの、ユーザごとにファインチューニングを行い、それによって生成される複数の小規模言語モデルを常にサーバのメモリ上に配置しておくことは現実的には難しい。それを解消する手段として、公知のLoRAという追加学習の手法を用いるようにしてもよい。 The small-scale language model provided in the question/answer generation unit 111g can be, for example, a model obtained by fine-tuning the LLM1 according to a predetermined task. Although the small-scale language model is a small-scale model, it is practically difficult to perform fine-tuning for each user and always store multiple small-scale language models generated by this on the memory of the server. As means for solving this problem, a known method of additional learning called LoRA may be used.

LoRAは、オリジナルの小規模言語モデルに対しAdapterと呼ばれる超小規模言語モデルを追加して学習するものであり、ファインチューニングを低メモリで効率的に行うことが可能である。オリジナルの小規模言語モデルは通常数十GByteあるのに対し、Adapterは通常数十MByteに留まる。そのため、小規模言語モデルはメモリ中に常駐させ、Adapterのみをユーザのリクエストに応じてオンデマンドで読み込ませても、ロード時間は無視できる規模になる。もしくは、大量のAdapterを限られたメモリ上に配置しておくことも可能になる。この手法は、質問・回答生成部111gに限らず、言語モデルを利用するシーンで一般的に利用できる。 LoRA learns by adding a very small language model called Adapter to an original small language model, and fine tuning can be performed efficiently with low memory. While the original small-scale language model is usually several dozen GBytes, Adapter usually stays at several dozen MBytes. Therefore, even if the small language model resides in memory and only the Adapter is loaded on demand according to the user's request, the load time will be negligible. Alternatively, it becomes possible to place a large number of Adapters on a limited memory. This method is not limited to the question/answer generation unit 111g, and can be generally used in scenes where language models are used.

質問・回答生成部111gの小規模言語モデルをファインチューニングするにあたり、自己教示あり学習または教師あり学習の何れを利用してもよい。自己教師あり学習を用いる場合は、例えば、過去の対話履歴のキャッチボールから、入力と出力の対を抜き出すことで学習させることが可能である。一方、教師あり学習を用いる場合は、プロンプトを通して過去の対話履歴を参照する別のLLMにより、質問・回答を生成させることが可能であり、この質問・回答の組を学習させることが可能である。質問・回答の組を得るためのプロンプトを図10に例示する。 In fine-tuning the small-scale language model of the question/answer generator 111g, either self-instructed learning or supervised learning may be used. When self-supervised learning is used, for example, it is possible to learn by extracting input-output pairs from past dialogue history catchballs. On the other hand, if supervised learning is used, the question-answer pairs can be generated by another LLM that references past interaction history through prompts, and this question-answer pair can be learned. A prompt for obtaining a question-answer pair is illustrated in FIG.

図9(b)に示す例において、候補文章取得部111は、質問文生成部111hおよび回答文取得部111jを備えている。質問文生成部111hは、ユーザ端末200より入力された質問文から別の質問文を生成する。質問文生成部111hによる別の質問文の生成方法は、図6~図8に例示した質問文生成部111eによる別の質問文の生成方法と同じでよい。もしくは、回答文取得部111jが柔軟な読解能力を持つ小規模言語モデルであることから、わざわざ質問文の生成をせず、ユーザ端末200より入力された質問をそのまま回答文取得部111jに入力しても良い。この場合、質問文生成部111hと例示質問文DB2dは構成から削除してもよい。 In the example shown in FIG. 9B, the candidate sentence acquisition unit 111 includes a question sentence generation unit 111h and an answer sentence acquisition unit 111j. The question text generation unit 111h generates another question text from the question text input from the user terminal 200 . The method of generating another question text by the question text generating unit 111h may be the same as the method of generating another question text by the question text generating unit 111e illustrated in FIGS. Alternatively, since the answer sentence acquisition unit 111j is a small-scale language model with flexible reading comprehension ability, the question input from the user terminal 200 may be directly input to the answer sentence acquisition unit 111j without generating the question sentence. In this case, the question sentence generator 111h and the example question sentence DB 2d may be deleted from the configuration.

回答文取得部111jは、質問文生成部111hにより生成された別の質問文を小規模言語モデルに入力することにより、別の質問文に対する回答文を候補文章として小規模言語モデルから取得する。図9(b)に示す例では、質問文生成部111hにより生成された質問文と回答文取得部111jにより取得された回答文との組み合わせを候補文章として候補文章取得部111より出力する。この場合、質問文生成部111hおよび回答文取得部111jにより特許請求の範囲の質問・回答生成部が構成される。 The answer sentence acquisition unit 111j inputs another question sentence generated by the question sentence generation unit 111h to the small-scale language model, thereby acquiring an answer sentence to the other question sentence as a candidate sentence from the small-scale language model. In the example shown in FIG. 9B, the candidate sentence acquisition unit 111 outputs a combination of the question sentence generated by the question sentence generation unit 111h and the answer sentence acquired by the answer sentence acquisition unit 111j as a candidate sentence. In this case, the question/answer generation unit in the scope of claims is configured by the question sentence generation unit 111h and the answer sentence acquisition unit 111j.

候補文章取得部111が以上説明した手法を用いて候補文章を取得した場合、取得される候補文章の数が複数となることが多く、また、取得された候補文章が冗長な場合もある。そのため、候補文章取得部111により取得された候補文章をそのまま質問文に付加してプロンプトを生成すると、プロンプトのトータルの文字数がLLM1の入力文字数の制限を超えてしまうことがある。その場合には、文章調整部112による処理が必要となる。 When candidate sentence acquisition unit 111 acquires candidate sentences using the above-described method, the number of candidate sentences acquired is often plural, and the acquired candidate sentences may be redundant. Therefore, if the candidate text acquired by the candidate text acquisition unit 111 is added to the question text as it is to generate a prompt, the total number of characters of the prompt may exceed the input character limit of the LLM1. In that case, processing by the text adjustment unit 112 is required.

以下に、文章調整部112による候補文章の調整方法について詳述する。文章調整部112は、以下に述べる手法の何れか1つまたは複数を適用して候補文章を調整することが可能である。 A method of adjusting candidate sentences by the sentence adjustment unit 112 will be described in detail below. The sentence adjuster 112 can apply any one or more of the techniques described below to adjust the candidate sentences.

<第1の候補文章調整手法>
文章調整部112は、ユーザ端末200より入力された質問文と、候補文章取得部111により取得された候補文章とを小規模言語モデルに入力することにより、候補文章のうち質問文に関連した文章部分を利用して文字数が削減された追加文章を生成する。文章調整部112が備える小規模言語モデルは、例えば本実施形態のLLM1を上記のタスクで独自にファインチューニングしたものとしてもよいし、上記のタスク用に生成した小規模言語モデルであってもよい。
<First Candidate Sentence Adjustment Method>
A text adjustment unit 112 inputs a question text input from a user terminal 200 and candidate texts acquired by a candidate text acquisition unit 111 into a small-scale language model, thereby generating an additional text with a reduced number of characters by using a text part related to the question text out of the candidate texts. The small-scale language model provided in the sentence adjustment unit 112 may be, for example, the LLM1 of the present embodiment that has been independently fine-tuned for the above task, or may be a small-scale language model generated for the above task.

図11は、第1の候補文章調整手法による候補文章の2つの調整例を示す図である。図11に示す例では、候補文章取得部111により取得された候補文章が「沖縄旅行といえば、夏なら海、冬なら水族館です!」であり、これを調整して文字数を減らすために、この候補文章とユーザ端末200より入力された質問文とを小規模言語モデルに入力する。 FIG. 11 is a diagram showing two adjustment examples of candidate sentences by the first candidate sentence adjustment method. In the example shown in FIG. 11, the candidate sentence acquired by the candidate sentence acquisition unit 111 is "Speaking of travel to Okinawa, it's the beach in summer, and the aquarium in winter!".

図11(a)は、入力された質問文が「冬に沖縄旅行に行きたい。3泊4日でおすすめのプランは?」の場合における候補文章の調整例を示している。質問文が冬の沖縄旅行について聞いている内容なので、小規模言語モデルは候補文章のうち「夏なら海」の部分について質問文に対する関連性を低く評価し、候補文章のうち質問文に関連した文章部分である「冬なら水族館」を利用して「沖縄旅行は水族館がお勧め」という追加文章を生成している。 FIG. 11A shows an adjustment example of candidate sentences when the input question sentence is "I want to go on a trip to Okinawa in winter. What is the recommended plan for 4 days and 3 nights?" Since the question is about a trip to Okinawa in winter, the small-scale language model underestimates the relevance of the part of the candidate sentences "in summer to the sea" to the question sentence, and uses the part of the candidate sentences related to the question sentence "in winter, aquarium" to generate an additional sentence "I recommend an aquarium for a trip to Okinawa".

これに対し、図11(b)は、入力された質問文が「夏に沖縄旅行に行きたい。3泊4日でおすすめのプランは?」の場合における候補文章の調整例を示している。質問文が夏の沖縄旅行について聞いている内容なので、小規模言語モデルは候補文章のうち「冬なら水族館」の部分の質問文に対する関連性を低く評価し、候補文章のうち質問文に関連した文章部分である「夏なら海」を利用して「沖縄旅行は海がお勧め」という追加文章を生成している。 On the other hand, FIG. 11B shows an adjustment example of candidate sentences when the input question sentence is "I want to go on a trip to Okinawa in the summer. What is the recommended plan for 4 days and 3 nights?" Since the question is about a trip to Okinawa in summer, the small-scale language model underestimates the relevance of the part of the candidate sentences "Aquarium in winter" to the question sentence, and uses the part of the candidate sentences related to the question sentence "If summer is the sea" to generate an additional sentence "Travel to Okinawa by the sea".

なお、ここでは説明のために1つの候補文章の調整例を示しているが、ここに示した1つの候補文章を質問文に付加するだけではLLM1に入力可能な文字数制限を超えることはない。実際には複数の候補文章が存在し、それら全てを質問文に付加するとトータルの文字数が文字数制限を超える場合に、個々の候補文章に対して上述の調整処理を実行する。これは、以下に説明する第2の候補文章調整手法についても同様である。 Although an example of adjustment of one candidate sentence is shown here for explanation, simply adding one candidate sentence shown here to the question sentence does not exceed the limit of the number of characters that can be input to the LLM1. Actually, there are a plurality of candidate sentences, and if the total number of characters exceeds the character number limit when all of them are added to the question sentence, the adjustment process described above is executed for each candidate sentence. This also applies to the second candidate sentence adjustment method described below.

<第2の候補文章調整手法>
文章調整部112は、候補文章取得部111により取得された候補文章を要約することにより、文字数が削減された追加文章を生成するようにしてもよい。候補文章の要約は、そのタスクのために生成した小規模言語モデルにより行うようにしてもよいし、公知のアルゴリズムにより行うようにしてもよい。
<Second Candidate Sentence Adjustment Method>
The sentence adjustment unit 112 may generate additional sentences with a reduced number of characters by summarizing the candidate sentences acquired by the candidate sentence acquisition unit 111 . Candidate sentences may be summarized using a small-scale language model generated for the task, or may be performed using a known algorithm.

また、文章調整部112は、候補文章取得部111により取得された候補文章について、ユーザ端末200より入力された質問文に関連した要点をとりまとめることにより、文字数が削減された追加文章を生成するようにしてもよい。この場合の文章調整部112は、例えば、ユーザ端末200より入力された質問文と、候補文章取得部111により取得された候補文章とを入力とし、要約された候補文章を出力とするようにトレーニングした小規模言語モデルを備えて構成することが可能である。 In addition, the sentence adjustment unit 112 may generate an additional sentence with a reduced number of characters by summarizing the main points related to the question sentence input from the user terminal 200 for the candidate sentences acquired by the candidate sentence acquisition unit 111. In this case, the sentence adjustment unit 112, for example, receives the question sentence input from the user terminal 200 and the candidate sentence acquired by the candidate sentence acquisition unit 111, and outputs a summarized candidate sentence. It can be configured with a trained small-scale language model.

図12は、以上のように構成した本実施形態による文章生成部10の動作例を示すフローチャートである。図12に示すフローチャートは、ユーザ端末200からLLM1に入力される1つの質問文に対して実行される処理の手順の概略を示したものである。 FIG. 12 is a flow chart showing an operation example of the text generation unit 10 according to this embodiment configured as described above. The flowchart shown in FIG. 12 outlines the procedure of processing executed for one question sentence input from the user terminal 200 to the LLM1.

まず、LLM1の追加文章生成部11は、ユーザ端末200より質問文を入力する(ステップS1)。追加文章生成部11が質問文を入力すると、候補文章取得部111は、第1~第4の候補文章取得手法の何れか1つまたは複数を適用して、入力された質問文に関連した1つ以上の候補文章を取得する(ステップS2)。 First, the additional sentence generation unit 11 of the LLM 1 inputs a question sentence from the user terminal 200 (step S1). When the additional sentence generation unit 11 inputs a question sentence, the candidate sentence acquisition unit 111 applies one or more of the first to fourth candidate sentence acquisition methods to acquire one or more candidate sentences related to the input question sentence (step S2).

次に、文章調整部112は、ユーザ端末200より入力された質問文の文字数と、候補文章取得部111により取得された1つ以上の候補文章の文字数と合わせたトータルの文字数が、LLM1に入力可能な文字数制限を超えるか否かを判定する(ステップS3)。ここで、トータルの文字数が入力文字数の制限を超えると判定された場合、文章調整部112は、第1~第2の候補文章調整手法の何れか一方または両方を適用して、候補文章の文字数を削減することにより、トータルの文字数が入力文字数の制限の範囲内となるようにする(ステップS4)。 Next, the sentence adjustment unit 112 determines whether the total number of characters, which is the number of characters of the question sentence input from the user terminal 200 and the number of characters of one or more candidate sentences acquired by the candidate sentence acquisition unit 111, exceeds the limit of the number of characters that can be input to the LLM 1 (step S3). Here, when it is determined that the total number of characters exceeds the limit of the number of input characters, the text adjustment unit 112 applies one or both of the first and second candidate text adjustment methods to reduce the number of characters of the candidate text so that the total number of characters is within the range of the limit of the number of input characters (step S4).

ここで、文章調整部112は、例えば、候補文章取得部111により取得された全ての候補文章を調整して文字数を削減し、削減後のトータルの文字数が入力文字数の制限を超えるか否かを再判定する。トータルの文字数が入力文字数の制限を依然として超えている場合は、候補文章を再度調整して文字数を削減する。あるいは、候補文章取得部111により取得された候補文章の何れかを削除するようにしてもよい。このような処理を繰り返すことにより、トータルの文字数が入力文字数の制限の範囲内となるようにする。このように調整された1つ以上の候補文章が、質問文に対する追加文章として確定される。 Here, for example, the text adjusting unit 112 adjusts all candidate texts acquired by the candidate text acquiring unit 111 to reduce the number of characters, and determines again whether the total number of characters after reduction exceeds the limit of the number of input characters. If the total number of characters still exceeds the input character limit, adjust the candidate sentences again to reduce the number of characters. Alternatively, any of the candidate sentences acquired by the candidate sentence acquisition unit 111 may be deleted. By repeating such processing, the total number of characters is kept within the limit of the number of input characters. One or more candidate sentences adjusted in this way are determined as additional sentences for the question sentence.

以上のようにして文章調整部112による候補文章の調整によって質問文に対する追加文章が生成されると、プロンプト生成部12は、ステップS1でユーザ端末200より入力された質問文に対し、ステップS4で文章調整部112により生成された追加文章を参考情報として付加することによってプロンプトを生成する(ステップS5)。 When the additional text for the question text is generated by adjusting the candidate text by the text adjusting unit 112 as described above, the prompt generating unit 12 generates a prompt by adding the additional text generated by the text adjusting unit 112 in step S4 as reference information to the question text input from the user terminal 200 in step S1 (step S5).

なお、上記ステップS3において、トータルの文字数が入力文字数の制限を超えないと判定された場合、ステップS4における文章調整部112の処理は行わず、候補文章取得部111により取得された候補文章がそのまま質問文に対する追加文章として確定される。この場合、プロンプト生成部12は、ステップS1でユーザ端末200より入力された質問文に対し、ステップS2で候補文章取得部111により取得された候補文章(=追加文章)を参考情報として付加することによってプロンプトを生成する(ステップS5)。 If it is determined in step S3 that the total number of characters does not exceed the limit of the number of input characters, the processing of the sentence adjusting unit 112 in step S4 is not performed, and the candidate sentence acquired by the candidate sentence acquiring unit 111 is determined as it is as an additional sentence to the question sentence. In this case, the prompt generating unit 12 generates a prompt by adding the candidate text (=additional text) obtained by the candidate text obtaining unit 111 in step S2 as reference information to the question text input from the user terminal 200 in step S1 (step S5).

そして、プロンプト生成部12は、生成したプロンプトを回答生成部20に入力する(ステップS6)。回答生成部20は、文章生成部10より入力されたプロンプトに含まれる追加文章を参考情報として利用して、当該プロンプトに含まれる質問文に対する回答文を生成し、生成した回答文をユーザ端末200に出力する(ステップS7)。これにより、図12に示すフローチャートの処理が終了する。 Then, the prompt generator 12 inputs the generated prompt to the answer generator 20 (step S6). The answer generation unit 20 uses the additional text included in the prompt input from the text generation unit 10 as reference information to generate a response text to the question text included in the prompt, and outputs the generated response text to the user terminal 200 (step S7). As a result, the processing of the flowchart shown in FIG. 12 ends.

以上詳しく説明したように、本実施形態では、ユーザ端末200よりLLM1に入力された質問文をもとに、当該質問文の文字数と合わせたトータルの文字数がLLM1の回答生成部20に入力可能な文字数制限を超えない文字数で、質問文に関連した追加文章を生成し、当該生成した追加文章を参考情報として質問文に付加することにより、回答生成部20に入力するためのプロンプトを生成するようにしている。 As described above in detail, in this embodiment, based on a question text input from the user terminal 200 to the LLM 1, the total number of characters combined with the number of characters of the question text does not exceed the character limit that can be input to the answer generation unit 20 of the LLM 1. Additional text related to the question text is generated, and the generated additional text is added to the question text as reference information, thereby generating a prompt for input to the answer generation unit 20.

このように構成した本実施形態によれば、入力された質問文に関連した文章を追加してプロンプトを生成する際に、プロンプトとして回答生成部20に入力可能な文字数制限を超えない文字数となるように追加文章が生成されるので、決められた文字数制限の範囲内で、入力された質問文に対して有効な文章を参考情報として加えたプロンプトを生成することができる。 According to this embodiment configured in this way, when generating a prompt by adding sentences related to an input question sentence, the additional sentence is generated so that the number of characters does not exceed the limit of the number of characters that can be input to the answer generating part 20 as the prompt.

なお、上記実施形態では、LLM1の構成として文章生成部10を備える例について説明したが、本発明はこれに限定されない。例えば、LLM1とは別に文章生成部10を構成するようにしてもよい。 In addition, although the said embodiment demonstrated the example provided with the text production|generation part 10 as a structure of LLM1, this invention is not limited to this. For example, the text generator 10 may be configured separately from the LLM1.

また、上記実施形態において、回答生成部20が出力する回答文の出力形式をユーザが選択できるようにしてもよい。例えば、回答文の口調を選択することができるようにしてもよい。これは、文章生成部10によるプロンプトの生成時に、「〇〇という口調で回答すること」などと追加文章によって指定することで実現可能である。LLMの性質として、プロンプトの中で参考情報を記載している場合、口調に対する指定が無視されて、参考情報の口調が優先される傾向がある。それを解決するため、LLMに2段階の出力をさせる指示を行ってもよい。つまり、「まず“通常の回答:”に続けて通常の回答を記載し、その後、“〇〇のキャラクター:”に続けて、〇〇のキャラクターの口調に直して回答すること」という指示をプロンプトの追加文章として含めても良い。この場合、LLMの出力のうち“〇〇のキャラクター:”以降の部分を出力することで、キャラクターの口調を真似た部分のみユーザに提示することができる。また、回答文のフォーマットを選択することができるようにしてもよい。例えば、行政の申告書類のフォーマットなどに合わせて、「概要」「事業内容」「申請事項」「付記事項」などの章立てに合わせて出力させることができるようにしてもよい。これも、プロンプトの中で追加文章により指定することによって実現可能である。 Further, in the above embodiment, the user may be allowed to select the output format of the answer sentence output by the answer generator 20 . For example, the tone of the answer sentence may be selected. This can be realized by specifying additional sentences such as "Reply with a tone of XX" when the sentence generating unit 10 generates a prompt. Due to the nature of LLMs, when reference information is provided in a prompt, there is a tendency for the tone specification to be ignored and the reference tone to take precedence. To solve this problem, the LLM may be instructed to output in two stages. In other words, the prompt may include additional text that says, "First, write 'Normal answer:' followed by your normal answer, then 'Character of XX:' and then answer in the tone of the character of XX." In this case, by outputting the part after "character of XX:" in the output of the LLM, it is possible to present to the user only the part imitating the tone of the character. Also, the format of the reply sentence may be selected. For example, according to the format of administrative declaration documents, etc., it may be possible to output according to chapters such as "summary", "business contents", "application items", and "additional items". This can also be accomplished by specifying additional text in the prompt.

また、上記実施形態において使用する文章DB2a~2dまたは小規模言語モデルは、企業に販売することが可能である。一括払いでもよいし、サブスクリプション型としてもよい。文章DB2a~2dまたは小規模言語モデルを販売する際には、個人情報や企業の機密情報の除去が必要になる。その作業は人力で行ってもよいし、そのタスク用に生成したLLMを用いて行ってもよい。なお、上述した回答文の出力形式も、企業に販売することを可能としてもよい。 Also, the text DBs 2a-2d or the small-scale language models used in the above embodiments can be sold to companies. It can be a lump sum payment or a subscription type. When selling text DBs 2a to 2d or small-scale language models, it is necessary to remove personal information and company confidential information. The work may be done manually or using an LLM created for the task. It should be noted that the output format of the above-described reply text may also be made available for sale to companies.

その他、上記実施形態は、何れも本発明を実施するにあたっての具体化の一例を示したものに過ぎず、これによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその要旨、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。 In addition, the above-described embodiments are merely examples of specific implementations of the present invention, and the technical scope of the present invention should not be construed in a limited manner. Thus, the invention may be embodied in various forms without departing from its spirit or essential characteristics.

1 大規模言語モデル(LLM)
2 文章DB
2a 事実情報DB
2b ペルソナ情報DB
2c 正解例情報DB
10 文章生成部(文章生成装置)
11 追加文章生成部
12 プロンプト生成部
20 回答生成部
111 候補文章取得部
111a キーワード抽出部
111b キーワード検索部
111c ベクトル算出部
111d ベクトル検索部
111e 質問文生成部
111f 質問生成例生成部
111g 質問・回答生成部
111h 質問文生成部(質問・回答生成部)
111j 回答文取得部(質問・回答生成部)
112 文章調整部
1 Large scale language model (LLM)
2 Text database
2a Fact information DB
2b Persona information DB
2c Correct example information DB
10 text generation unit (text generation device)
11 additional text generation unit 12 prompt generation unit 20 answer generation unit 111 candidate text acquisition unit 111a keyword extraction unit 111b keyword search unit 111c vector calculation unit 111d vector search unit 111e question text generation unit 111f question generation example generation unit 111g question/answer generation unit 111h question text generation unit (question/answer generation unit)
111j Answer sentence acquisition unit (question/answer generation unit)
112 Sentence Coordinator

Claims (9)

入力された質問文に対して参考情報を付加することにより、大規模言語モデルに入力するためのプロンプトを生成する文章生成装置であって、
上記入力された質問文をもとに、当該質問文の文字数と合わせたトータルの文字数が上記大規模言語モデルに入力可能な文字数制限を超えない文字数で、上記質問文に関連した追加文章を生成する追加文章生成部と、
上記入力された質問文に対し、上記追加文章生成部により生成された上記追加文章を上記参考情報として付加することによって上記プロンプトを生成するプロンプト生成部とを備え
上記追加文章生成部は、
上記入力された質問文をもとに、当該質問文に関連した候補文章を取得する候補文章取得部と、
上記候補文章取得部により取得された上記候補文章を調整することによって上記追加文章を生成する文章調整部とを備えた
ことを特徴とする文章生成装置。
A text generation device that generates a prompt for inputting into a large-scale language model by adding reference information to an input question text,
an additional sentence generation unit for generating an additional sentence related to the question sentence based on the input question sentence, with the total number of characters combined with the number of characters of the question sentence not exceeding the limit of the number of characters that can be input to the large-scale language model;
a prompt generation unit that generates the prompt by adding the additional text generated by the additional text generation unit as the reference information to the input question text ;
The above additional sentence generation unit
a candidate sentence acquisition unit for acquiring candidate sentences related to the question sentence based on the input question sentence;
a sentence adjustment unit for generating the additional sentence by adjusting the candidate sentence acquired by the candidate sentence acquisition unit.
A text generation device characterized by:
上記文章調整部は、上記入力された質問文と、上記候補文章取得部により取得された上記候補文章とを小規模言語モデルに入力することにより、上記候補文章のうち上記質問文に関連した文章部分を利用して上記追加文章を生成することを特徴とする請求項に記載の文章生成装置。 2. The sentence generating apparatus according to claim 1 , wherein the sentence adjustment unit inputs the input question sentence and the candidate sentence acquired by the candidate sentence acquiring unit into a small-scale language model, thereby generating the additional sentence using a sentence part related to the question sentence among the candidate sentences. 上記文章調整部は、上記候補文章取得部により取得された上記候補文章を要約することによって上記追加文章を生成することを特徴とする請求項に記載の文章生成装置。 2. The text generation apparatus according to claim 1 , wherein the text adjustment unit generates the additional text by summarizing the candidate texts acquired by the candidate text acquisition unit. 上記文章調整部は、上記候補文章取得部により取得された上記候補文章について、上記入力された質問文に関連した要点をとりまとめることによって上記追加文章を生成することを特徴とする請求項に記載の文章生成装置。 4. The text generation device according to claim 3 , wherein the text adjustment unit generates the additional text by summarizing the key points related to the input question text for the candidate texts acquired by the candidate text acquisition unit. 上記候補文章取得部は、
上記入力された質問文から検索キーワードを抽出するキーワード抽出部と、
上記キーワード抽出部により抽出された上記検索キーワードを用いて、複数の文章が記録された文章データベースを検索することにより、上記検索キーワードを含む文章を上記候補文章として上記文章データベースから取得するキーワード検索部とを備えた
ことを特徴とする請求項1~4の何れか1項に記載の文章生成装置。
The above candidate sentence acquisition unit
a keyword extraction unit for extracting a search keyword from the input question text;
5. The sentence generation device according to claim 1, further comprising a keyword search unit that searches a sentence database in which a plurality of sentences are recorded using the search keyword extracted by the keyword extraction unit, and obtains sentences containing the search keyword from the sentence database as the candidate sentences.
上記候補文章取得部は、
上記入力された質問文から文章の特徴ベクトルを算出するベクトル算出部と、
上記ベクトル算出部により算出された上記特徴ベクトルを用いて、複数の文章がそれぞれの特徴ベクトルとあらかじめ関連付けて記録された文章データベースを検索することにより、上記ベクトル算出部により算出された上記特徴ベクトルとの類似度について所定の条件を満たす特徴ベクトルに関連付けられた文章を上記候補文章として上記文章データベースから取得するベクトル検索部とを備えた
ことを特徴とする請求項1~4の何れか1項に記載の文章生成装置。
The above candidate sentence acquisition unit
a vector calculation unit that calculates a feature vector of the text from the input question text;
5. The sentence generating apparatus according to claim 1, further comprising: a vector searching unit that searches a sentence database in which a plurality of sentences are recorded in advance in association with the feature vectors calculated by the vector calculating unit, using the feature vectors calculated by the vector calculating unit, and acquires sentences associated with the feature vectors that satisfy a predetermined condition regarding similarity to the feature vectors calculated by the vector calculating unit from the sentence database as the candidate sentences.
上記候補文章取得部は、
上記入力された質問文から別の質問文を生成する質問文生成部を更に備え、
上記ベクトル算出部は、上記入力された質問文の特徴ベクトルに加え、上記質問文生成部により生成された上記別の質問文の特徴ベクトルを算出し、
上記ベクトル検索部は、上記入力された質問文から算出された特徴ベクトルおよび上記別の質問文から算出された特徴ベクトルを用いて文章データベースを検索する
ことを特徴とする請求項に記載の文章生成装置。
The above candidate sentence acquisition unit
further comprising a question text generation unit that generates another question text from the input question text;
The vector calculation unit calculates, in addition to the feature vector of the input question sentence, the feature vector of the another question sentence generated by the question sentence generation unit,
7. The sentence generation device according to claim 6 , wherein the vector search unit searches a sentence database using a feature vector calculated from the input question sentence and a feature vector calculated from the other question sentence.
上記候補文章取得部は、上記入力された質問文をもとに、小規模言語モデルにより別の質問文と回答文との組み合わせを上記候補文章として生成する質問・回答生成部を備えたことを特徴とする請求項1~4の何れか1項に記載の文章生成装置。 The sentence generation device according to any one of claims 1 to 4, wherein the candidate sentence acquisition unit includes a question/answer generation unit that generates, as the candidate sentence, a combination of another question sentence and an answer sentence using a small-scale language model based on the input question sentence. 入力された質問文に対して参考情報を付加することにより、大規模言語モデルに入力するためのプロンプトを生成する文章生成方法であって、
コンピュータの追加文章生成部が、上記入力された質問文をもとに、当該質問文の文字数と合わせたトータルの文字数が上記大規模言語モデルに入力可能な文字数制限を超えない文字数で、上記質問文に関連した追加文章を生成する第1のステップと、
上記コンピュータのプロンプト生成部が、上記入力された質問文に対し、上記追加文章生成部により生成された上記追加文章を上記参考情報として付加することによって上記プロンプトを生成する第2のステップとを有し、
上記第1のステップにおいて上記追加文章生成部は、上記入力された質問文をもとに、当該質問文に関連した候補文章を取得し、取得した上記候補文章を調整することによって上記追加文章を生成する
ことを特徴とする文章生成方法。
A text generation method for generating a prompt for inputting into a large-scale language model by adding reference information to an input question text,
A first step of generating an additional sentence related to the question sentence by an additional sentence generation unit of a computer, based on the input question sentence, with a total number of characters including the number of characters of the question sentence not exceeding the limit of the number of characters that can be input to the large-scale language model;
a second step of generating the prompt by adding the additional text generated by the additional text generation unit as the reference information to the input question text, wherein the prompt generation unit of the computer generates the prompt ;
In the first step, the additional sentence generation unit acquires candidate sentences related to the question sentence based on the input question sentence, and generates the additional sentence by adjusting the acquired candidate sentences.
A sentence generation method characterized by:
JP2023078285A 2023-05-11 2023-05-11 Text generation device and text generation method Active JP7313757B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023078285A JP7313757B1 (en) 2023-05-11 2023-05-11 Text generation device and text generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2023078285A JP7313757B1 (en) 2023-05-11 2023-05-11 Text generation device and text generation method

Publications (1)

Publication Number Publication Date
JP7313757B1 true JP7313757B1 (en) 2023-07-25

Family

ID=87428136

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023078285A Active JP7313757B1 (en) 2023-05-11 2023-05-11 Text generation device and text generation method

Country Status (1)

Country Link
JP (1) JP7313757B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117473072A (en) * 2023-12-28 2024-01-30 杭州同花顺数据开发有限公司 Financial research report generation method, device, equipment and storage medium
JP7441366B1 (en) 2023-09-19 2024-02-29 株式会社東芝 Information processing device, information processing method, and computer program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115391527A (en) 2022-08-23 2022-11-25 中国电信股份有限公司 Intention recognition method based on prompt learning, question answering method and device
JP2022180282A (en) 2021-05-24 2022-12-06 ネイバー コーポレーション Persona chatbot control method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022180282A (en) 2021-05-24 2022-12-06 ネイバー コーポレーション Persona chatbot control method and system
CN115391527A (en) 2022-08-23 2022-11-25 中国电信股份有限公司 Intention recognition method based on prompt learning, question answering method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ChatGPTの文字数制限と返信が途切れる場合の解決方法について [online],2023年02月16日,[検索日:2023.05.19], Internet<URL: https://web.archive.org/web/20230216035345/https://1-notes.com/chatgpt-query-character-limit/ >
MADAAN, Aman et al.,MemPrompt: Memory-assisted Prompt Editing with User Feedback [online],Cornell University,2023年02月18日,[検索日:2023.05.19], Internet<URL: https://arxiv.org/abs/2201.06009 >

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7441366B1 (en) 2023-09-19 2024-02-29 株式会社東芝 Information processing device, information processing method, and computer program
CN117473072A (en) * 2023-12-28 2024-01-30 杭州同花顺数据开发有限公司 Financial research report generation method, device, equipment and storage medium
CN117473072B (en) * 2023-12-28 2024-03-15 杭州同花顺数据开发有限公司 Financial research report generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
JP7313757B1 (en) Text generation device and text generation method
JP7325152B1 (en) Text generation device and text generation method
US10936664B2 (en) Dialogue system and computer program therefor
US7496548B1 (en) Neural network for electronic search applications
CN110543644A (en) Machine translation method and device containing term translation and electronic equipment
CN110309280B (en) Corpus expansion method and related equipment
JP2019215841A (en) Question generator, question generation method, and program
US20210303606A1 (en) Dialog generation method and apparatus, device, and storage medium
CN110347802B (en) Text analysis method and device
CN110737756B (en) Method, apparatus, device and medium for determining answer to user input data
CN113239169A (en) Artificial intelligence-based answer generation method, device, equipment and storage medium
Ali et al. Automatic text‐to‐gesture rule generation for embodied conversational agents
KR20210070904A (en) Method and apparatus for multi-document question answering
US20220138601A1 (en) Question responding apparatus, learning apparatus, question responding method and program
CN111402864A (en) Voice processing method and electronic equipment
CN117520523B (en) Data processing method, device, equipment and storage medium
WO2020241070A1 (en) Audio signal retrieving device, audio signal retrieving method, data retrieving device, data retrieving method, and program
CN116662502A (en) Method, equipment and storage medium for generating financial question-answer text based on retrieval enhancement
JP2019082860A (en) Generation program, generation method and generation device
CN114064820A (en) Table semantic query rough arrangement method based on hybrid architecture
JP2023158992A (en) Response generation apparatus and method of the same
Petrovski et al. Embedding individual table columns for resilient SQL chatbots
Dinarelli et al. Concept segmentation and labeling for conversational speech
JP7012811B1 (en) Search device, search method, and program
JP2019194759A (en) Dialogue system reinforcement device and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230512

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20230512

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230530

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230608

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230627

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230705

R150 Certificate of patent or registration of utility model

Ref document number: 7313757

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350