Data structure, device, method, and program for use in writing

The data structure for LM prompts with conversion and fixed parts addresses the challenge of maintaining consistency in long documents, enhancing control and reducing errors in LM generation.

JP2026042190APending Publication Date: 2026-03-11小林 巧
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2026-03-11

AI Technical Summary

Technical Problem

Long prompts in language models (LMs) lead to difficulties in maintaining formal and logical consistency, especially in documents requiring consistency, such as lawsuits, due to performance limitations in small language models (SLMs), making it challenging to control LM effectively.

Method used

A data structure for prompts that includes conversion parts and fixed parts, with embedded instructions for natural language generation devices to maintain consistency, and a writing device that verifies and updates prompts to ensure correct generation.

Benefits of technology

Facilitates control of LM by ensuring logical and formal consistency, simplifying prompt creation and modification, and reducing errors in long document generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026042190000001_ABST
    Figure 2026042190000001_ABST
Patent Text Reader

Abstract

When trying to generate a complaint using natural language generation AI, the prompts and output sentences become long and difficult to control. [Solution] Individual output content definitions are embedded in each part of the output format definition of a prompt. This eliminates the need to write output content definitions in a separate location. The output format definition of a prompt includes a fixed part that should be output as is without conversion, and a conversion part that is the target of conversion. This simplifies the prompt, simplifies the processing content of the LM to the conversion processing of the conversion part, and makes it easier to separate other processing into pre-processing and post-processing, making it easier to control the LM.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a data structure, an apparatus, a method, a program, etc. for supporting the creation of text. [Background technology]

[0002] In the field of generative AI, language models (hereafter referred to as "LM") that generate natural language are being put to practical use. LM is a model that outputs natural language based on an input sentence (called a "prompt") given by a human being.

[0003] A prompt generally includes some or all of the following definitions (but may also include others): a "comprehensive definition" that comprehensively defines the behavior of the LM (for example, "You are an AI that answers users' questions."), an "output content definition" that defines the content to be generated (for example, "What is the elevation of Mount Fuji?"), an "output format definition" that defines the format in which it should be generated (for example, "Please output in the following format. Answer:"), and a "model answer definition" that defines specific examples of input and output (for example, "Which country is Mount Fuji in? Answer: Japan").

[0004] LMs are classified into large language models (hereinafter referred to as "LLMs") and small language models (hereinafter referred to as "SLMs") depending on their size.

[0005] While LLM offers high performance, it requires expensive hardware. Therefore, it is generally run on the cloud. This limits its use in business due to concerns about the risk of confidential and personal information leaking.

[0006] On the other hand, some SLMs can be run on home computers, which has the advantage of reducing the risk of information leakage. However, compared to LLMs, they have limitations in terms of performance (low quality of generated results, long processing times, inability to use long prompts, inability to obtain long output, etc.).

[0007] Regardless of the model, the longer the generated result, the more likely it is that the output sentence will lose logical and formal consistency, and the longer the prompt, the more time and human error will be required, and the more likely it is that the LM will not be able to follow all of the prompt instructions. For this reason, it is extremely important from a practical standpoint to develop prompts and systems that can easily control the LM. [Prior art documents] [Patent documents]

[0008] [Patent Document 1] Patent No. 7495767 Summary of the Invention [Problem to be solved by the invention]

[0009] LM has the problem that when attempting to generate a long document that requires formal and logical consistency (such as a complaint), the prompts become long and difficult to control. For example, the specific problems that the present invention aims to solve are as follows (the items listed here are the main ones, but are not all of the problems that the present invention aims to solve):

[0010] <Problem 1: Correspondence between definitions>

[0011] When a prompt becomes long, it becomes difficult to unambiguously define the correspondence between a portion of the output content definition and the corresponding portion of the output format definition. Even if it were possible to unambiguously define the correspondence, it would be difficult for a human to visually confirm that correspondence (especially if the prompt is too long to fit on one screen, you would have to scroll the screen to check the correspondence between the two). Furthermore, when modifying one, identifying and modifying the corresponding other is time-consuming and prone to errors. This makes it difficult to control LM in terms of ensuring consistency between each definition.

[0012] <Task 2: Correspondence between input and output>

[0013] The longer the prompt, the less likely it is that the LM will output what was entered. This tendency is particularly pronounced in the case of SLMs (small language models) due to performance limitations. In documents that require logical and formal consistency, such as lawsuits, the correspondence between multiple locations within the output sentence is important (for example, the amount claimed must be consistent throughout the document). However, even if the correspondence between each location is defined in the prompt, the longer the generated result, the more difficult it becomes to output it according to that definition. In this way, controlling the LM is difficult even in terms of ensuring consistency between input and output.

[0014] <Challenge 3: Difficulty in retrying>

[0015] The longer the prompt, the more difficult it becomes to generate the entire text accurately in one go. Especially in documents that require consistency, such as a lawsuit, if there is a problem in just one place, the entire lawsuit must be regenerated. This problem is more pronounced in SLMs, which have limited performance. This necessitates repeated adjustments and trial and error, making it even more time-consuming to control the LM.

[0016] <Task 4: Correspondence within each definition>

[0017] As prompts become longer, factual inconsistencies may occur within each definition (for example, missing corrections to billing amounts scattered throughout the prompt). This makes it more difficult for LM to control consistency within each definition.

[0018] <Issue 5: RAG Integration>

[0019] As prompts become longer, it becomes even more difficult to use RAG within them. RAG (Retrieval-Augmented Generation) is a technology that allows LM to generate answers based on accurate information by adding hints when the user sends a request to LM. Generally, RAG and text generation are performed separately. However, in a lawsuit, for example, you may want LM to generate the main text using information obtained through RAG, in order to write a statement based on legal precedent. In such cases, if you try to combine RAG and text generation into a single prompt and have LM perform it, not only does the prompt become more complex, but the LM's behavior becomes too complex and unstable. This is particularly noticeable in SLMs, which have limited performance. Thus, controlling LMs is difficult.

[0020] <Task 6: Standardizing formatting>

[0021] The longer the prompt, the longer it takes to process. Furthermore, it becomes more difficult to ensure that LM adheres to consistent formatting over time (e.g., indentation and chapter numbering according to the chapter hierarchy). This problem is particularly pronounced in SLMs, which have limited performance. This makes LM more difficult to control.

[0022] <Issue 7: Difficulty in reuse>

[0023] As prompts become longer, reusing them becomes more difficult. For example, if the output content definition and output format definition are defined separately for a prompt generating a 10-chapter document, it is generally difficult to separate the output content definition in Chapter 8 from the output content definitions in the other chapters. This is because the output content definition in Chapter 8 is not necessarily written independently from the other chapters, and even if it were written independently, it is assumed that it will be evaluated in the context, so extracting only a portion of it does not necessarily result in a meaningful definition. Furthermore, extracting and reusing the output content definition in Chapter 8 and the corresponding output format definition is time-consuming and prone to errors. Furthermore, because the two definitions are written separately, it is not easy to edit the extracted prompt appropriately. As a result, it may be faster to create the prompt from scratch rather than reusing it. As a result, the prompts that have been carefully adjusted cannot be reused, making LM control more difficult.

[0024] <Challenge 8: Difficulty creating prompts>

[0025] The longer the prompt, the more difficult it is to create it in the first place, which makes it more difficult to prepare a prompt that effectively controls the LM and makes it more difficult to control the LM. [Means for solving the problem]

[0026] The data structure of the first invention is a data structure of a prompt used to more easily control a natural language generation device, and includes one or more conversion parts that indicate parts to be converted into natural language during generation and embedded instructions that define the conversion method, and one or more fixed parts that indicate parts to be output as is without conversion during generation and context that serves as a clue for conversion for the conversion parts.The data structure of the prompt is used in a process in which the natural language generation device, which is equipped with a prompt memory unit that stores the prompt and a generation unit that performs generation processing in accordance with the prompt, outputs the fixed parts as is, and converts the conversion parts into natural language that connects naturally to the context provided by the other parts while following the embedded instructions written in the conversion parts so as to be consistent with the context provided by the other parts, and outputs the fixed parts.

[0027] The data structure of the second invention is a data structure of a prompt according to the first invention that is output from a writing device to the natural language generation device, and the writing device has an output unit that outputs the prompt to the natural language generation device and an input unit that receives a generation result from the natural language generation device, and outputs the generation result if the generation result generated by the natural language generation device from the prompt and received by the input unit matches the order of fixed parts and conversion parts specified by the prompt, and if not, compares the order specified in the prompt with the generation result from the beginning, identifies the point where the order and the generation result no longer match, updates the prompt to the extent that they match, outputs the updated prompt to the natural language generation device again, and receives the generation result from the natural language generation device, repeating this process until a termination condition is met.

[0028] The data structure of the third invention is a data structure of a prompt described in the first or second invention that includes a variable portion, and is used by the writing device, which has a memory unit that stores variable data that defines the correspondence between variables and their values, in a process of replacing the variable portion with the corresponding value specified by the variable data.

[0029] The data structure of the fourth invention is a data structure of a prompt described in the first to third inventions that includes a reference portion, and is used by the writing device, which has a reference data acquisition unit that acquires reference data including corresponding information based on the content of the reference portion, in the process of replacing the reference portion with corresponding information obtained from the reference data.

[0030] The writing device of the fifth invention is a writing device having a prompt acquisition unit that acquires the prompt described in the first to fourth inventions, a processing unit that performs processing on the prompt described in the second to fourth inventions, an output unit that outputs the processed prompt to a natural language generation device, and an input unit that receives the generation result from the natural language generation device.

[0031] The writing device of the sixth invention is a writing device according to the fifth invention, having a prompt acquisition unit that acquires the prompts described in the first to fourth inventions, an output unit that outputs a plurality of the prompts to a natural language generation device, an input unit that receives a plurality of generation results from the natural language generation device, and a processing unit that structures and connects the generation results to construct sentences.

[0032] The writing device of the seventh invention is a writing device of the fifth or sixth invention, which has a memory unit that stores the prompt described in the first to fourth inventions, a display unit that displays the prompt, and an edited prompt acquisition unit that acquires an edited prompt that has been edited from the prompt.

[0033] The writing device of the eighth invention is a writing device described in any of the fifth to seventh inventions, having a first prompt source acquisition unit that acquires a first prompt source, which is the data that forms the basis of the prompt described in any of the first to fourth inventions, a second prompt source acquisition unit that acquires a second prompt source that has been edited from the first prompt source, an output unit that outputs the second prompt source to a natural language generation device, and an input unit that receives the prompt from the natural language generation device.

[0034] The writing support device of the ninth invention is a writing support device having a first prompt source acquisition unit that acquires a first prompt source, which is data that forms the basis of the prompt described in the first to fourth inventions, a second prompt source acquisition unit that acquires a second prompt source that is an edited version of the first prompt source, an output unit that outputs the second prompt source to a natural language generation device, and an input unit that receives the prompt from the natural language generation device.

[0035] The tenth aspect of the present invention is a method for creating sentences using a prompt according to any one of the first to fourth aspects of the present invention in a system having a prompt acquisition means for acquiring the prompt according to any one of the first to fourth aspects of the present invention, a processing means for performing the processing on the prompt according to any one of the second to fourth aspects of the present invention, an output means for outputting the processed prompt to a natural language generation device, and an input means for receiving the generation result from the natural language generation device, the method comprising the steps of: acquiring the prompt according to any one of the first to fourth aspects of the present invention using the prompt acquisition means; performing the processing on the prompt according to any one of the second to fourth aspects of the present invention using the processing means; outputting the prompt to the natural language generation device using the output means; and receiving the generation result from the natural language generation device using the input means.

[0036] The sentence creation method of the eleventh invention is a sentence creation method of the tenth invention utilizing the prompts of the first to fourth inventions in a system having a prompt acquisition means for acquiring the prompt of the first to fourth inventions, an output means for outputting a plurality of the prompts to a natural language generation device, an input means for receiving a plurality of generation results from the natural language generation device, and a processing means for structuring and linking the generation results to construct a sentence, the sentence creation method of the tenth invention utilizing the prompts of the first to fourth inventions having the steps of: acquiring a plurality of the prompts using the prompt acquisition means; outputting a plurality of the prompts using the output means to the natural language generation device; receiving a generation result from the natural language generation device using the input means; and structuring and linking the generation results to construct a sentence using the processing means.

[0037] The text creation method of the twelfth invention is a text creation method of the tenth or eleventh invention for editing a prompt of the first to fourth inventions in a system having a storage means for storing the prompt of the first to fourth inventions, a display means for displaying the prompt, and an edited prompt acquisition means for acquiring an edited prompt obtained by editing the prompt, the text creation method of the tenth or eleventh invention for editing a prompt of the first to fourth inventions having the steps of using the storage means to store the prompt before editing, using the display means to display the prompt, and using the edited prompt acquisition means to acquire an edited prompt obtained by editing the prompt.

[0038] A text creation method according to any of the tenth to twelfth inventions for generating a prompt according to any of the first to fourth inventions in a system having first prompt source acquisition means for acquiring a first prompt source, which is data that will be the source of the prompt, second prompt source acquisition means for acquiring a second prompt source obtained by editing the first prompt source, output means for outputting the second prompt source to a natural language generation device, and input means for receiving the prompt from the natural language generation device, the text creation method according to any of the tenth to twelfth inventions for generating a prompt according to any of the first to fourth inventions includes the steps of: acquiring the first prompt source, which is data that will be the source of the prompt, using the first prompt source acquisition means; acquiring the second prompt source, which is information that identifies the fixed part and other parts of the first prompt source, using the second prompt source acquisition means; outputting the second prompt source to the natural language generation device using the output means; and receiving the prompt generated by the natural language generation device using the input means.

[0039] A writing assistance method of the present fourteenth invention is a writing assistance method for generating a prompt according to any one of the first to fourth inventions in a system having first prompt source acquisition means for acquiring a first prompt source, which is data that forms the basis of the prompt, second prompt source acquisition means for acquiring a second prompt source obtained by editing the first prompt source, output means for outputting the second prompt source to a natural language generation device, and input means for receiving the prompt from the natural language generation device, the writing assistance method for generating a prompt according to any one of the first to fourth inventions comprising the steps of: acquiring the first prompt source, which is data that forms the basis of the prompt, using the first prompt source acquisition means; acquiring the second prompt source, which is information that identifies the fixed part and other parts of the first prompt source, using the second prompt source acquisition means; outputting the second prompt source to the natural language generation device using the output means; and receiving the prompt generated by the natural language generation device using the input means.

[0040] The program of the fifteenth invention is a program for enabling a computer having a prompt acquisition unit that acquires the prompt described in the first to fourth inventions, a processing unit that performs processing on the prompt described in the second to fourth inventions, an output unit that outputs the processed prompt to a natural language generation device, and an input unit that receives the generation result from the natural language generation device to create sentences using the prompt described in the first to fourth inventions.

[0041] The program of the sixteenth invention is a program of the fifteenth invention for enabling a computer having a prompt acquisition unit that acquires the prompts described in the first to fourth inventions, an output unit that outputs a plurality of the prompts to a natural language generation device, an input unit that receives a plurality of generation results from the natural language generation device, and a processing unit that structures the generation results and constructs linked sentences, to realize the structuring and construction of sentences.

[0042] The program of the seventeenth invention is a program described in the fifteenth or sixteenth invention for enabling a computer having a memory unit that stores the prompt described in the first to fourth inventions, a display unit that displays the prompt, and an edited prompt acquisition unit that acquires an edited prompt obtained by editing the prompt, to edit a prompt.

[0043] The program of the eighteenth invention is a program according to the fifteenth to seventeenth inventions for causing a computer having a first prompt source acquisition unit that acquires a first prompt source, which is data that forms the basis of the prompt according to the first to fourth inventions, a second prompt source acquisition unit that acquires a second prompt source that has been edited from the first prompt source, an output unit that outputs the second prompt source to a natural language generation device, and an input unit that receives the prompt from the natural language generation device, to generate a prompt.

[0044] The program of the nineteenth invention is a program for causing a computer having a first prompt source acquisition unit that acquires a first prompt source, which is data that forms the basis of the prompt described in the first to fourth inventions, a second prompt source acquisition unit that acquires a second prompt source that is an edited version of the first prompt source, an output unit that outputs the second prompt source to a natural language generation device, and an input unit that receives the prompt from the natural language generation device, to generate a prompt. [Effects of the Invention]

[0045] According to the present invention, it is possible to provide a data structure, an apparatus, a method, and a program that facilitate the control of an LM. [Brief explanation of the drawings]

[0046] [Figure 1] A diagram explaining the data structure and specific examples of the prompts of claims 1 and 2 (Examples 1 and 2) [Figure 2] Conceptual diagram of information system A in the embodiment [Figure 3] Conceptual diagram of information system B in the embodiment [Figure 4] Block diagram of Information System A [Figure 5] External view and block diagram of computer A1 when implementing a writing device by program [Figure 6] External view and block diagram of computer A3 when implementing a natural language generation device by program [Figure 7] External view and block diagram of computer A5 when implementing a writing support device by program [Figure 8] Flowchart for explaining an example of natural language conversion processing (first embodiment) [Figure 9] Flowchart for explaining an example of a sentence generation process (Example 2) [Figure 10] FIG. 3 is a diagram illustrating the data structure of the prompt of claim 3 and a specific example (Example 3) [Figure 11] Flowchart for explaining an example of a text creation process (embodiments 3 and 4) [Figure 12] FIG. 4 is a diagram illustrating the data structure and specific example of the prompt of claim 4 (Example 4) [Figure 13] 10 is a flowchart illustrating an example of a reference data acquisition process (fourth embodiment); [Figure 14] Flowchart for explaining an example of a sentence construction process (Example 6) [Figure 15] Flowchart for explaining an example of preprocessing of sentence construction process (Examples 7 and 8) [Figure 16] Flowchart for explaining an example of prompt editing processing (Example 7) [Figure 17] FIG. 10 is a diagram for explaining a specific example of a first prompt source and a second prompt source (Embodiment 8). [Figure 18] Flowchart for explaining an example of a prompt generation process (Eighth embodiment) DETAILED DESCRIPTION OF THE INVENTION

[0047] <Summary>

[0048] Conventionally, the output content definition and the output format definition were defined separately in the prompt, which resulted in various problems, such as the prompt becoming redundant and making it difficult to control the LM. The above-mentioned problem is an example of such a problem.

[0049] Therefore, in this invention, individual output content definitions are embedded in each part of the output format definition (Figure 1). This simplifies the content of information processing in a natural language generation device running LM from generation to information conversion, makes it possible to distinguish between parts that should be converted and parts that should not be converted, uniquely defines the correspondence between each part that should be converted and its output content definition, and makes it possible to convert only the parts that should be converted in accordance with the output content definition, in line with the context. Thus, the present invention can achieve the objective of defining information processing by a natural language generation device, thereby facilitating control of LM (Claim 1).

[0050] Furthermore, this allows the writing device to mechanically verify the generated results and regenerate only the parts that were not generated correctly. Therefore, the present invention can specify information processing by the writing device, thereby achieving the objective of facilitating the control of LM (Claim 2).

[0051] The above is merely an outline of one example of the implementation and effects of the present invention, and details will be described later in the examples.

[0052] Here, we assume the use of LM in a natural language generation device as a typical example, but the method is not important as long as it can generate natural language.

[0053] <Example of implementation using equipment, etc.>

[0054] FIG. 2 is a conceptual diagram of an information system A, which is an example of an information system used in each of the following embodiments.

[0055] The information system A includes one or more writing devices 1, one or more natural language generation devices 3, and one or more writing support devices 5.

[0056] The writing device 1 is a device that transmits prompts to the natural language generation device 3 and obtains the generated results. The writing device 1 may be, for example, a personal computer, a tablet terminal, or a smartphone, but it does not matter.

[0057] However, information system A is merely one example. For example, FIG. 3 is a conceptual diagram of information system B, which is another example of an information system used in the same case as information system A. Information system B includes one writing device 7. Writing device 7 includes a natural language generation device 3 and / or a writing support device 5 therein. Therefore, the writing device 7, the natural language generation device 3, and / or the writing support device 5 can communicate with each other without going through the Internet.

[0058] The functions realized by the above devices may also be provided as a server. For example, the server may be a cloud server or an ASP server. In this case, a user terminal that accepts user input and output communicates with the server and controls the above devices.

[0059] FIG. 4 is a block diagram of information system A.

[0060] The writing device 1 includes an input unit 11, an output unit 12, an acquisition unit 13, a memory unit 14, and a processing unit 15. The acquisition unit 13 includes a prompt acquisition unit 131, an edited prompt acquisition unit 132, a reference data acquisition unit 133, and a generation result acquisition unit 134.

[0061] The natural language generation device 3 is a device that stores software having the functionality of an LM. The function of the LM here is to store a given prompt, tokenize it, and then generate natural language according to the instructions of the prompt. The LM may be, for example, a cloud service such as Chat-GPT, or a local model that stores and uses the model on a terminal, but this does not matter. The natural language generation device 3 includes an input unit 31, an output unit 32, a prompt storage unit 33, and a generation unit 34. The natural language generation device 3 may be, for example, a personal computer, a tablet terminal, or a smartphone, but this does not matter.

[0062] The writing support device 5 is a device that transmits data that is the source of a prompt to the natural language generation device and acquires the prompt. The writing support device 5 includes an input unit 51, an output unit 52, an acquisition unit 53, a first prompt source acquisition unit 531, and a second prompt source acquisition unit 532.

[0063] The input unit 11 constituting the writing device 1 accepts input of various information and instructions to the writing device. The input unit 11 receives various information and instructions, for example, from the natural language generation device 3, the writing support device 5, etc. The various information includes, for example, a prompt generated by the writing support device described later, the generation result of the natural language generation device 3, etc.

[0064] Here, input usually refers to the reception of information transmitted via a wired or wireless communication line, but may also be a concept that includes the input of information input from an input device such as a keyboard, mouse, or touch panel, or information read from a recording medium such as an optical disk, magnetic disk, or semiconductor memory, etc. The same applies to other input units.

[0065] The output unit 12 outputs various types of information, such as a prompt to be input to the natural language generation device 3, a prompt to be displayed to the user, and the like.

[0066] Here, output usually means transmission of information via a wired or wireless communication line, but may also be a concept including display or projection on an output device such as a monitor, printing on a printer, sound output, storage on a recording medium, delivery of processing results to another processing device or another program, etc. The same applies to other output units.

[0067] The acquisition unit 13 acquires various types of information, such as a prompt, an edited prompt, reference data, and a result of generation by the natural language generation device 3.

[0068] A prompt is, for example, information to be input to the natural language generation device 3.

[0069] An edited prompt is a prompt that the user has created by editing a template, and is information to be input to the natural language generation device 3 or the like.

[0070] Reference data is additional information that is embedded in the prompt.

[0071] A prompt acquisition unit 131 included in the acquisition unit 13 acquires a prompt from the storage unit 14 or a database (not shown).

[0072] The edited prompt acquisition unit 132 acquires a pre-edited prompt from the storage unit 14 or a database (not shown).

[0073] The reference data acquisition unit 133 acquires reference data from the storage unit 14 or a database (not shown).

[0074] The generation result acquisition unit 134 acquires the generation result from the natural language generation device 3 or the like.

[0075] Various types of information are stored in the storage unit 14. The various types of information include various prompts, variable data, reference data, and results of generation by the natural language generation device 3 and the like.

[0076] The variable data is data that defines the correspondence between a variable and its value when a part of the prompt is treated as a variable and substituted with the corresponding value.

[0077] The processing unit 15 performs various types of information processing. The various types of processing include a text generation process, a text creation process, etc., which will be described later. Each type of processing will be described in the following embodiments.

[0078] The input unit 31 constituting the natural language generation device 3 accepts input of various information and instructions. The input unit 31 accepts, for example, hyperparameters (parameters for controlling the operation of the LM, such as an upper limit on the length of the generated sentence) and prompts from the writing device 1.

[0079] The output unit 32 outputs various types of information, such as the generation result and error information when generation fails.

[0080] The prompt storage unit 33 stores the input prompt.

[0081] The generation unit 34 generates natural language based on input information and instructions.

[0082] The input unit 51 constituting the writing support device 5 accepts input of various information and instructions. For example, the input unit 51 accepts a first prompt source from a user or a database (not shown), or accepts a generation result from a natural language generation device. The first prompt source is a sentence that serves as material when generating a prompt. Details will be described in the embodiments.

[0083] The output unit 52 outputs various types of information, such as the generated prompt.

[0084] The acquisition unit 53 acquires various types of information, such as the first prompt source, the second prompt source, and the like.

[0085] The second prompt source is a modified version of the first prompt source. Details will be described in the examples.

[0086] The first prompt source acquisition unit 531 acquires the first prompt source from the input unit 51 .

[0087] The second prompt source acquisition unit 532 acquires the corrected first prompt source.

[0088] The writing device 1, the natural language generation device 3, and the writing support device 5 are each typically capable of communicating via a network such as the Internet.

[0089] In this specification, information X being associated with information Y means that information Y can be obtained from information X, or information X can be obtained from information Y, and the method of association is not important. Information X and information Y may be linked, may exist in the same buffer, information X may be included in information Y, or information Y may be included in information X, etc.

[0090] In this specification, selecting or determining information Z means obtaining information Z, obtaining a pointer to information Z, obtaining the ID of information Z, setting a flag on information Z, etc., as long as information Z can be accessed.

[0091] <Example of software implementation>

[0092] Each of the following embodiments may be implemented as software. This software may be distributed by software download or the like. This software may also be recorded on a recording medium such as a CD-ROM and distributed. Below, examples of computers that execute this program are shown, but are not limited to these.

[0093] FIG. 5(a) shows the external appearance of a computer A1 that executes a program that realizes the functions of the document creation device 1. FIG. 5(b) is a block diagram of the computer. In FIG. 5(a), the computer A1 includes a monitor A101, a keyboard A102, and a housing A103 that stores a hard disk and other components. In FIG. 5(b), the computer A1 also includes a bus A104 connecting each component, a CD-ROM drive A105, a hard disk A106 for storing application programs, system programs, and data, a ROM (A107) for storing programs such as a boot-up program, an MPU (A108) for processing calculations, and a RAM (A109) connected to the MPU and other components for temporarily storing application program instructions and providing temporary storage space. Although not shown here, the computer A1 may also include a mouse, a processing unit such as a GPU, and a network card that provides connection to a LAN. The hard disk may also be a storage device such as an SSD.

[0094] FIG. 6(a) shows the external appearance of a computer A3 that executes a program that realizes the functions of the natural language generation device 3. FIG. 6(b) is a block diagram of the computer. In FIG. 6(a), the computer A3 has a housing A301 that stores a hard disk and other components. In FIG. 6(b), the computer A3 includes a bus A302 that connects each component, a hard disk A303 for storing application programs, system programs, and data, a ROM (A304) for storing programs such as a boot-up program, an MPU (A305) that performs arithmetic processing, and a RAM (A306) connected to the MPU and other components to temporarily store application program instructions and provide temporary storage space. Although not shown here, the computer A3 may also include a monitor, keyboard, CD-ROM drive, mouse, a processing unit such as a GPU, and a network card that provides connection to a LAN. The hard disk may also be a storage device such as an SSD.

[0095] FIG. 7(a) shows the appearance of a computer A5 that executes a program that realizes the functions of the writing support device 5. FIG. 7(b) is a block diagram of the computer. In FIG. 7(a), the computer A5 includes a monitor A501, a keyboard A502, and a housing A503 that stores a hard disk and other components. In FIG. 7(b), the computer A5 includes a bus A504 connecting each component, a hard disk A505 for storing application programs, system programs, and data, a ROM (A506) for storing programs such as a boot-up program, an MPU (A507) for processing calculations, and a RAM (A508) connected to the MPU and other components for temporarily storing application program instructions and providing temporary storage space. Although not shown here, the computer A5 may also include a mouse, a processing unit such as a GPU, and a network card that provides connection to a LAN. The hard disk may also be a storage device such as an SSD.

[0096] A program that causes the computer A1 to execute the functions of each embodiment described below may be stored on a CD-ROM (A110), inserted into the CD-ROM drive A103, and then transferred to the hard disk A105. Alternatively, the program may be stored on the hard disk A105 via a medium (not shown) or a network (not shown). The program is loaded into RAM (A108) when executed. The program may be loaded directly from the CD-ROM (A110), other medium, or a network. The loading location may be a memory other than RAM. The same applies to the computers A3 and A5.

[0097] The program does not necessarily include an operating system (OS) or a third-party program that executes the functions of each embodiment described below. The program may include only an instruction portion that invokes appropriate functions (modules) in a controlled manner to achieve a desired result. How the computer systems A1, A3, and A5 operate is well known, and a detailed description thereof will be omitted.

[0098] In addition, in the above program, the steps of transmitting information and receiving information do not include processing performed by hardware, such as processing performed by a modem or interface card in the transmission step (processing that can only be performed by hardware).

[0099] The computer that executes the program may be a single computer or a plurality of computers, that is, it may perform centralized processing or distributed processing.

[0100] As shown in the example of the hardware configuration, the writing device 1 may include a natural language generation device 3 and / or a writing support device 5. Therefore, part or all of the programs for realizing each of the embodiments described below may be executed on a single computer.

[0101] <Relationship between Examples and Configurations>

[0102] In the following embodiments, components with the same reference numerals perform similar operations, and therefore repeated explanations may be omitted.

[0103] It goes without saying that two or more communication means present in one device may be physically realized by one medium.

[0104] Each process may be realized by centralized processing in a single device, or may be realized by distributed processing in a plurality of devices.

[0105] The present invention is not limited to the examples shown below, and various modifications are possible, and it goes without saying that these modifications are also included within the scope of the present invention. [Example]

[0106] <Issues to be resolved>

[0107] In the first embodiment, in order to solve the above-mentioned problems (particularly problems 1 and 2), an example of the data structure of the prompt of claim 1 (hereinafter referred to as "this prompt" in the present embodiment) will be described.

[0108] <Regarding the data structure of the prompt in claim 1>

[0109] An example of the data structure of this prompt is shown in Figure 1.

[0110] Figure 1(a) defines the data structure of this prompt. This prompt includes two or more sentence blocks. Each sentence block includes one fixed part or one conversion part. This prompt as a whole includes one or more fixed parts and one or more conversion parts. A fixed part is a part that the natural language generation device outputs without converting the input content. A conversion part is a part that specifies the part to be converted by the natural language generation device and the conversion method. The natural language generation device converts the conversion part into natural-looking sentences according to the conversion method and the surrounding context. This prompt can be used with other prompts, such as a comprehensive definition or a model answer definition.

[0111] Figure 1(b) is a specific example of a prompt that includes this prompt. In this example, there is a comprehensive definition at the beginning, followed by a block of text enclosed in a box. The blocks of text separated by "[" and "]" are the conversion parts, and the rest are fixed parts. The delimiters and delimiting methods are examples. The parts written outside this prompt (the comprehensive definition part in Figure 1(b)) are also examples.

[0112] <Information processing in natural language generation devices>

[0113] The data structure of this prompt is processed as shown in Figure 8 (natural language conversion processing).

[0114] In the following, the natural language conversion process of FIG. 8 will be described using an example in which the natural language generation device 3 performs the process.

[0115] (S0801) The prompt acquired from input unit 31 is stored in prompt storage unit 33 and input to generation unit .

[0116] (S0802) The generation unit 34 divides the prompt into information units that can be handled by the LM and encodes them.

[0117] (S0803) Set the variable i to 1.

[0118] (S0804) It is determined whether the i-th token of the sentence blocks of the prompt belongs to the fixed part. If it does, the process goes to S0805, and if not, the process goes to S0806.

[0119] (S0805) If it belongs to the fixed part, the token is output as is without being converted.

[0120] (S0806) If it does not belong to the fixed part, it belongs to the conversion part, so it is converted into a token(s) that connects naturally so as to be consistent with the context given by other sentence blocks, while following the embedding instructions written in the conversion part.

[0121] (S0807) Increase the value of i by 1.

[0122] (S0808) If the i-th token exists in the sentence blocks of the prompt, return to S0804; if not, perform the processing of S0809.

[0123] (S0809) The output token is decoded into natural language and returned from the output unit 32.

[0124] Through this process, the fixed part of the prompt is output as is (S0805), and the converted part is converted into natural language that connects naturally so as to be consistent with the context given by the other parts while following the embedded instructions written in the converted part (S0806), and is then output (S0809).

[0125] Note that the above is only one example, and it is also suitable to process multiple tokens in parallel, or to have LM process prompt parts other than the sentence block (such as comprehensive definitions and model answer definitions) in S0803 until it reaches the start position of the sentence block, or to distinguish between fixed parts, conversion parts, and comment parts in S0804 and skip over the comment parts without outputting them, or to return to processing S0803 if there are remaining prompt parts before S0809.

[0126] <Effects>

[0127] The data structure of this prompt allows the output content definition to be directly embedded in the output format definition, making it possible to define the correspondence between the two in a unique way. Furthermore, it is easy for a person to visually check the correspondence (no need to scroll through the screen to check the correspondence between the two as in the past). Furthermore, because the output content and output format are defined as a single entity, there is no need to edit multiple locations to make a single correction. This makes it easier to control LM (Problem 1).

[0128] In addition, since it is sufficient to manually enter the output statements that will be generated in the output format definition and to enter embedded output content definitions at key points, there is no need to write anything to match the two, and the prompts are greatly simplified. This makes the correspondence between input and output statements clear to the LM, making it easier to output as defined. Furthermore, when one location is modified, other dependent locations can also be easily modified in a logical and formally consistent manner by editing the output format and output content defined as a whole (Issue 2).

[0129] This simplifies the content of information processing in a natural language generation device running LM from generation to information conversion, makes it possible to distinguish between parts that should be converted and parts that should not be converted, uniquely determines the correspondence between each part that should be converted and its output content definition, and makes it possible to convert only the parts that should be converted in accordance with the context in accordance with the output content definition. Thus, the present invention defines information processing by a natural language generation device, thereby achieving the objective of facilitating control of LM (Claim 1). [Example]

[0130] <Issues to be resolved>

[0131] In the second embodiment, in order to solve the above-mentioned problems (particularly problem 3), an example of the data structure of the prompt of claim 2 (hereinafter referred to as "this prompt" in this embodiment) will be described.

[0132] <Regarding the data structure of the prompt in claim 2>

[0133] An example of the data structure of this prompt is already shown in FIG.

[0134] <Information processing in a writing device>

[0135] The data structure of this prompt is processed as shown in Figure 9 (sentence generation process).

[0136] In the following, the text creation process of FIG. 9 will be described using an example in which the process is performed by the text creation device 1.

[0137] (S0901) The output unit 12 outputs an input sentence (prompt) to the natural language generation device.

[0138] (S0902) A natural language conversion process (for example, the one shown in the first embodiment) is performed.

[0139] (S0903) The output sentence (generation result) of the natural language generation device, which has been acquired from the input unit 11 and stored in the storage unit 14, is acquired from the generation result acquisition unit 134.

[0140] (S0904) In processing unit 15, variable n is assigned 1 (index of the sentence block), variable fix is ​​assigned 0 (index of the fixed part last verified), string match is assigned the regular expression "^" (criterion for determining whether the generated result satisfies the format specified in the prompt), and string match is assigned to the fix-th element of array fix_match, which has strings as elements (regular expression indicating the range that met the criteria the last time the fixed part was verified).

[0141] (S0905) Check whether the input sentence contains the nth sentence block. If not, return, assuming that the generated result in the format specified in the prompt has been obtained. Otherwise, perform the processing of S0906.

[0142] (S0906) It is confirmed whether the nth sentence block of the input sentence is a fixed part. If it is not a fixed part (if it is a conversion part), the process of S0907 is carried out, and if it is a fixed part, the process of S0910 is carried out.

[0143] (S0907) Add the regular expression ".+" to the end of match.

[0144] (S0908) Check whether the output statement matches the regular expression match. If it matches, go to S0909, otherwise go to S0913.

[0145] (S0909) n is increased by 1 and the processing of S0905 is performed.

[0146] (S0910) A fixed part contained in the nth sentence block of the input sentence is added to the end of match.

[0147] (S0911) Check whether the output statement matches the regular expression match. If it matches, go to S0912, otherwise go to S0913.

[0148] (S0912) n, increase fix by 1, and assign match to the fix-th element of fix_match.

[0149] (S0913) Check whether fix is ​​greater than 0. If it is greater, go to S0914; if not, go to S0901.

[0150] (S0914) The part of the input sentence from the beginning to the fix-th fixed part is replaced with the corresponding part of the output sentence (the part that matches the regular expression fix_match[fix]) to create an updated input sentence (updated prompt).

[0151] This process determines whether the generated result matches the order of the fixed and converted parts specified by the prompt (S0908 and S0911), and if they match (all S0908 and S0911 are Yes), the generated result is output (No in S0905); if they do not, the order specified in the prompt is compared with the generated result from the beginning to identify the point where the order and the generated result no longer match, the prompt is updated to the extent that they match (S0914), the updated prompt is output again to the natural language generation device (S0901), and the process of receiving the generated result from the natural language generation device (S0903) is repeated until the termination condition (S0905) is met.

[0152] The above is merely an example, and it is also preferable to change the termination condition in S0905 and redo the generation if the generated result is too long.

[0153] <Effects>

[0154] With this data structure, even if the entire sentence cannot be accurately output in one generation, the range of successfully generated sentences can be identified from the beginning using the fixed portion as a clue, and the range can be reused to update the input sentence, leaving only the part of the sentence that failed to be generated as the converted portion, and mechanically regenerating the sentence.In this way, this data structure, which defines the fixed portion and the converted portion, allows mechanical trial and error, making it easier to control the LM (Problem 3).

[0155] As a result, the writing device can mechanically verify the generated results and regenerate only the parts that were not generated correctly. Therefore, the present invention can specify the information processing by the writing device, thereby achieving the object of facilitating the control of LM (Claim 2). [Example]

[0156] <Issues to be resolved>

[0157] In the third embodiment, in order to solve the above-mentioned problems (particularly problem 4), an example of the data structure of the prompt of claim 3 (hereinafter referred to as "this prompt" in this embodiment) will be described.

[0158] <Regarding the data structure of the prompt in claim 3>

[0159] An example of the data structure of this prompt is shown in Figure 10.

[0160] Figure 10(a) defines the data structure of this prompt. The difference from the prompts in Examples 1 and 2 is that the sentence block contains a variable part. One or more variable parts are included in the entire prompt.

[0161] Figure 10(b) shows a specific example of the data structure of this prompt. In this example, the parts delimited by "{" and "}" are variable parts, but the delimiters and delimiting methods are just examples.

[0162] 10(c) shows an example of variable data in this specific example. In this example, the variable and its value are linked with "=", but the linking character and linking method are merely examples.

[0163] <Information processing in a writing device>

[0164] The data structure of this prompt is processed as shown in Figure 11 (sentence creation process).

[0165] In the following, the text creation process of FIG. 11 will be described using an example in which the process is performed by the text creation device 1.

[0166] (S1101) A prompt is read from the prompt acquisition unit 131.

[0167] (S1102) The processing unit 15 checks whether this prompt has a variable portion. If there is a variable portion, the processing unit 15 performs the processing of S1103, and if there is not, the processing unit 15 performs the processing of S1105.

[0168] (S1103) The variable data is read from the storage unit 14.

[0169] (S1104) The variable portion is replaced with the corresponding value obtained from the variable data.

[0170] (S1105) It is confirmed whether there is a reference part in this prompt. If there is, S1106 is executed, and if not, S1108 is executed.

[0171] (S1106) Reference data acquisition processing (for example, that described in the fourth embodiment) is performed.

[0172] (S1107) The reference portion is replaced with the corresponding information obtained from the reference data.

[0173] (S1108) The sentence generation process (for example, the process shown in the second embodiment) is performed, and the process returns.

[0174] The above is merely an example, and it is also preferable to scan the prompt from the beginning and replace the relevant parts one by one as soon as they are found, rather than replacing multiple variable parts or reference parts all at once.

[0175] <Effects>

[0176] The data structure of this prompt makes it possible, for example, to set the claim amount as a variable when generating a complaint, and then replace it with a value defined in the variable data during preprocessing of the sentence generation process. This not only simplifies corrections, but also prevents fluctuations in the factual content and makes it easier to control LM (Problem 4).

[0177] In response to this, it is conceivable to have LM also perform the variable part replacement process in S1104. However, in this case, the longer the prompt or generated result, the less accurate the replacement process can be expected from LM. Furthermore, it takes time and effort to check whether the replacement process was performed correctly. Moreover, it takes even more time and effort to consistently correct parts that were not replaced correctly. These problems arise when LM performs the replacement process.

[0178] Therefore, in the text creation process, the replacement process is not left to the LM but is separated as pre-processing, thereby avoiding these problems and facilitating the control of the LM.

[0179] Furthermore, there is technical significance in combining it with Example 1 or 2, as in the case of writing "Describe the general duties of [{occupation}]" in a sentence block. If the variable definition, output content definition, and output format definition were written separately, and the prompt were too long to fit on one screen, it would be necessary to repeatedly scroll the screen to check their consistency and consistency with the context. Therefore, in the sentence creation process, by defining the output format and output content as a single entity, it becomes easier to understand the impact that changing the variable value has on both definitions. This achieves the significant effect of making LM control even easier.

[0180] As a result, the writing device can easily create writing using variables. Therefore, the present invention can achieve the object of defining information processing by the writing device, thereby facilitating the control of LM (claim 3). [Example]

[0181] <Issues to be resolved>

[0182] In the fourth embodiment, in order to solve the above-mentioned problems (particularly problem 5), an example of the data structure of the prompt of claim 4 (hereinafter referred to as "this prompt" in this embodiment) will be described.

[0183] <Regarding the data structure of the prompt in claim 4>

[0184] An example of the data structure of this prompt is shown in FIG.

[0185] Figure 12(a) defines the data structure of this prompt. The difference from the prompts in Examples 1 to 3 is that the sentence block contains a reference section. One or more reference sections are included in the entire prompt.

[0186] Figure 12(b) shows a specific example of the data structure of this prompt. In this example, the part delimited by "<" and ">" is the reference part, but the delimiters and delimiting method are just examples.

[0187] <Information processing in a writing device>

[0188] The data structure of this prompt is processed as shown in FIG. 11. Furthermore, in S1106, processing is performed as shown in FIG. 13 (reference data acquisition processing). The storage unit can store information obtained in advance or as needed via the Internet, etc. The natural language generation device in S1302 does not have to be the same as the natural language generation device 3, and it does not matter whether an LM is used. The natural language generation processing in S1303 is different from the natural language conversion processing in the first embodiment and is equivalent to the generation processing performed by an LM that does not use a prompt of the present invention.

[0189] In the following, the reference data acquisition process of FIG. 13 will be described taking as an example a case where the process is performed by the document creation device 1.

[0190] (S1301) The reference data acquisition unit 133 searches the storage unit 14 using the reference portion as a search key.

[0191] (S1302) The output unit 12 outputs the reference portion and the search results to the natural language generation device.

[0192] (S1303) The natural language generation device performs natural language generation processing.

[0193] (S1304) The response of the natural language generation device is obtained from the input unit 11.

[0194] (S1305) The obtained answer is returned as reference data.

[0195] The above is merely an example, and it is also preferable to directly search an external resource such as the Internet instead of the storage unit 14 in S1301, or to return the search results as reference data in S1302.

[0196] <Effects>

[0197] The data structure of this prompt clarifies the portion of the prompt that uses additional information as reference information, separates the process of acquiring the additional information into the reference data acquisition unit 133, and embeds the acquired reference data in this prompt, making it possible to generate sentences that utilize the latest information within the same framework as the prompts described in Examples 1 to 3. This makes it possible to avoid complicating the prompt and to avoid complicating the behavior of the LM by separating the reference data acquisition process. Therefore, it becomes easier to control the LM (Problem 5).

[0198] In contrast, it is conceivable to write additional information outside the text block (such as in the comprehensive definition section) rather than embedding it within the output format definition. However, in this case, the connection between the conversion section and the additional information may be weakened and not reflected, or it may have unexpected effects on the conversion of other conversion sections. These problems arise when additional information is written outside the output format definition. Therefore, in the text creation process, by writing the additional information directly in the conversion section, these problems are avoided and the significant effect of making LM control easier is achieved.

[0199] As a result, the writing device can easily create writing using additional information. Therefore, the present invention can achieve the object of defining information processing by the writing device, thereby facilitating control of the LM (claim 4). [Example]

[0200] <Issues to be resolved>

[0201] In the fifth embodiment, an example of realizing processing of the data structure of the prompt in the first to fourth embodiments will be described in order to solve the above-mentioned problems (particularly problems 1 to 5).

[0202] <Regarding processing of data structures claimed in claims 1 to 4>

[0203] The sentence generation process of FIG. 9, the sentence creation process of FIG. 11, and the reference data acquisition process of FIG. 13 can be realized by a sentence creation device (claim 5), a method (claim 10), a program (claim 15), or the like.

[0204] The embodiment is as described above.

[0205] <Effects>

[0206] The above processes make it possible to realize the functions of the data structure of the prompt in the first to fourth embodiments (objectives 1 to 5). [Example]

[0207] <Issues to be resolved>

[0208] In the sixth embodiment, an example of a sentence construction process will be described in order to solve the above-mentioned problems (particularly problem 6).

[0209] <About sentence construction processing>

[0210] The sentence creation process (Fig. 11) can also be performed as part of the following sentence construction process (Fig. 14). These processes can be realized by a sentence creation device (claim 6), a method (claim 11), a program (claim 16), etc.

[0211] An example in which the sentence construction process is implemented by the sentence creation device 1 will be described below.

[0212] (S1401) An arbitrary number (here, n) of prompts are read from the prompt acquisition unit 131.

[0213] (S1402) Assign 1 to the variable i.

[0214] (S1403) The i-th prompt is read from the n prompts that have been read.

[0215] (S1404) A sentence creation process (for example, the one shown in the eleventh embodiment) is performed for the i-th prompt.

[0216] (S1405) It is confirmed whether i is smaller than n. If it is smaller, the process of S1406 is carried out, and if not, the process of S1407 is carried out.

[0217] (S1406) i is incremented by 1, and the process of S1403 is performed.

[0218] (S1407) The created n sentences are structured (arranged in order, organized into a tree structure according to the chapter structure, etc.).

[0219] (S1408) A single integrated sentence is constructed from n structured sentences (by linking them, assigning chapter numbers, setting indents, etc.).

[0220] Note that the above is only one example, and other suitable processes include further dividing the prompt in S1403 and / or grouping multiple prompts together and processing in S1404, using multiple natural language generation devices in the natural language conversion process in S1404, and constructing the data as a document file rather than text in S1408.

[0221] <Effects>

[0222] The sentence construction process divides the prompts required to construct a document into sentence blocks in advance (for example, by chapter item), and executes the sentence construction process for each individual sentence block group, thereby solving other issues that arise from long prompts and issues such as long processing times. Furthermore, by structuring the individually generated results (for example, reproducing the hierarchical structure of chapters in a tree structure) and constructing them (for example, assigning chapter numbers in order for each chapter item and setting appropriate indents), such processing does not need to be performed on the LM side. This makes it easier to control the LM (Problem 6).

[0223] In conventional prompts, the output content definition and the output format definition are defined separately, making it difficult to divide the prompt. On the other hand, the prompt of the present invention defines both as a sentence block that integrates the two, making it easy to divide the prompt. This makes it easy to perform division and integration processes such as sentence construction processes, making it even easier to control the LM. [Example]

[0224] <Issues to be resolved>

[0225] In the seventh embodiment, an example of a prompt editing process will be described in order to solve the above-mentioned problems (particularly problem 7).

[0226] <About prompt editing>

[0227] As preprocessing for the sentence construction process (Fig. 14), the following processes can also be performed (Figs. 15 and 16). These processes can be realized by a sentence construction device (claim 7), a method (claim 12), a program (claim 17), etc.

[0228] Here, an example in which the preprocessing is implemented by the document creation device 1 will be described.

[0229] (S1501) It is determined whether or not prompt generation processing is to be performed. If it is to be performed, processing of S1502 is performed, and if it is not to be performed, processing of S1503 is performed.

[0230] (S1502) A prompt generation process (for example, the one shown in the eighth embodiment) is performed.

[0231] (S1503) A prompt is created without using the prompt generation process (by manually entering the prompt, etc.).

[0232] (S1504) It is determined whether or not prompt editing processing is to be performed. If it is to be performed, the processing of S1505 is carried out, and if it is not to be performed, the processing of S1506 is carried out.

[0233] (S1505) A prompt editing process (for example, the one shown in FIG. 16) is performed.

[0234] (S1506) It is determined whether to perform sentence construction processing. If it is to be performed, the processing of S1507 is carried out, and if it is not to be performed, the processing of S1508 is carried out.

[0235] (S1507) A sentence construction process (for example, the process shown in the sixth embodiment) is performed.

[0236] (S1508) A sentence creation process (for example, the one shown in the third embodiment) is performed.

[0237] The contents of the prompt editing process are as follows (FIG. 16): Here, an example in which the prompt editing process is realized by the document creation device 1 will be described.

[0238] (S1601) A prompt template is read from the storage unit 14.

[0239] (S1602) The output unit 12 displays the prompt.

[0240] (S1603) An edited prompt that has been edited according to the case (for example, edited manually by a human being) is obtained from the edited prompt acquisition unit 132.

[0241] The above is merely an example, and it is also preferable to edit a draft instead of a template in S1601.

[0242] <Effects>

[0243] In conventional prompts, the output content definition and the output format definition are defined separately. This makes it difficult to edit the prompt or reuse only a portion of the prompt. On the other hand, the prompt of the present invention defines both as an integrated sentence block, making it easy to edit the prompt or reuse only a portion of it. Furthermore, the preprocessing and prompt editing process allow the template to be appropriately modified according to the case, making it even easier to reuse the prompt. This makes it possible to reuse already adjusted prompts, making it easier to control the LM (Problem 7). [Example]

[0244] <Issues to be resolved>

[0245] In the eighth embodiment, an example of a prompt generation process will be described in order to solve the above-mentioned problems (particularly problem 8).

[0246] <Data that is subject to prompt generation processing>

[0247] In the prompt generation process shown in FIG. 15, the prompts of claims 1 to 4 are generated using data of the first prompt source and the second prompt source.

[0248] The first prompt source is a sentence similar to the sentence that the user ultimately wants to create, and is assumed to be an existing document when creating a new document based on an existing document, for example (FIG. 17(a)).

[0249] The second prompt source is an edited version of the first prompt source. That is, each part of the first prompt source is identified as a fixed part, a conversion part, a variable part, or a reference part (FIG. 17(b)). The second prompt source is sent to a natural language generation device together with an example prompt such as that shown in FIG. 17(c), thereby generating the prompts of Examples 1 to 4.

[0250] <About prompt generation processing>

[0251] The contents of the prompt generation process are shown in Figure 18. These processes can be realized by an apparatus (claims 8 and 9), a method (claims 13 and 14), a program (claims 18 and 19), etc.

[0252] Here, an example in which the prompt generation process is implemented by the writing support device 5 will be described.

[0253] (S1801) The first prompt source received from the input unit 51 is obtained from the first prompt source obtaining unit 531.

[0254] (S1802) The first prompt source is edited to create a second prompt source.

[0255] (S1803) The second prompt source is acquired from the second prompt source acquisition unit 532.

[0256] (S1804) The second prompt source is output to the natural language generation device.

[0257] (S1805) The natural language generation device performs natural language generation processing.

[0258] (S1806) A prompt is obtained from the natural language generation device, output from the output unit 52, and the process returns.

[0259] Note that the above is merely an example, and for example, a method in which a human manually corrects the first prompt source as the editing process in S1802 is envisioned, but a method in which an LM edits it is also preferable, and any means is acceptable. The natural language generation device in S1804 does not have to be the same as the natural language generation device 3, and it does not matter whether an LM is used. The natural language generation process in S1805 differs from the natural language conversion process in the first embodiment and is equivalent to the generation process performed by an LM without using a prompt of the present invention. If there is a problem with the prompt acquired in S1806, a method in which the process returns to S1804 is also preferable, and any means is acceptable.

[0260] Furthermore, these processes do not necessarily have to be performed on the same terminal as the writing device, but may be performed on a separate terminal, that is, the writing support device.

[0261] <Effects>

[0262] The prompt generation process makes it possible to create sentence blocks from existing documents, which makes it easier to create prompt templates and therefore easier to control LM (Problem 8). [Industrial Applicability]

[0263] LM makes it easier to control and makes it possible to create long documents such as complaints that require logical and formal consistency. [Explanation of symbols]

[0264] A, B Information Systems 1. Information System A's writing device 3. Natural language generation device for information system A 5. Information System A's writing support device 7. Information System B's writing device 11 Input section 12 Output section 13 Acquisition Department 14 Storage section 15 Processing section 31 Input section 32 Output section 33 Prompt Memory 34 Generation part 51 Input section 52 Output section 53 Acquisition Department 131 Prompt Acquisition Section 132 Edited prompt acquisition section 133 Reference Data Acquisition Unit 134 Generation result acquisition unit 531 First prompt source acquisition unit 532 Second prompt source acquisition part A1 Computer A101 Monitor A102 Keyboard A103 housing A104 Bus A105 CD-ROM drive A106 Hard Disk A107 ROM A108 MPU A109 RAM A110 CD-ROM A3 Computer A301 housing A302 Bus A303 Hard Disk A304 ROM A305 MPU A306 RAM A5 Computer A501 Monitor A502 Keyboard A503 housing A504 Bus A505 Hard Disk A506 ROM A507 MPU A508 RAM

Claims

1. A data structure of a prompt used to more easily control a natural language generation device, the data structure including one or more conversion parts indicating parts to be converted into natural language during generation and embedded instructions defining the conversion method, and fixed parts indicating parts to be output as is without conversion during generation and context that serves as a clue for conversion for the conversion parts, the data structure of the prompt being used by the natural language generation device, which is equipped with a prompt memory unit that stores the prompt, and a generation unit that performs generation processing in accordance with the prompt, to output the fixed parts as is, and convert the conversion parts into natural language that connects naturally to the context provided by the other parts while following the embedded instructions written in the conversion parts so as to be consistent with the context provided by the other parts.

2. 2. The data structure of a prompt according to claim 1, which is output from a writing device to the natural language generation device, wherein the writing device has an output unit that outputs the prompt to the natural language generation device and an input unit that receives a generation result from the natural language generation device, and outputs the generation result if the generation result generated by the natural language generation device from the prompt and received by the input unit matches the order of fixed parts and converted parts specified by the prompt, and if not, compares the order specified in the prompt with the generation result from the beginning, identifies a point where the order no longer matches the generation result, updates the prompt to the extent that they match, outputs the updated prompt to the natural language generation device again, and receives the generation result from the natural language generation device, repeating this process until a termination condition is met.

3. 3. The data structure of a prompt according to claim 1 or 2, which includes a variable portion, and which is used by the writing device having a memory unit that stores variable data that defines the correspondence between variables and their values, in a process of replacing the variable portion with the corresponding value specified by the variable data.

4. A data structure of a prompt as described in claims 1 to 3, which includes a reference portion, and is used by the writing device, which has a reference data acquisition unit that acquires reference data including corresponding information based on the content of the reference portion, to replace the reference portion with corresponding information obtained from the reference data.

5. A text creation device having a prompt acquisition unit that acquires the prompt described in claims 1 to 4, a processing unit that performs the processing described in claims 2 to 4 on the prompt, an output unit that outputs the processed prompt to a natural language generation device, and an input unit that receives the generation result from the natural language generation device.

6. 6. The text creation device according to claim 5, comprising: a prompt acquisition unit that acquires the prompts according to any one of claims 1 to 4; an output unit that outputs a plurality of the prompts to a natural language generation device; an input unit that receives a plurality of generation results from the natural language generation device; and a processing unit that structures and connects the generation results to construct a sentence.

7. 7. A writing device according to claim 5 or 6, comprising: a memory unit for storing the prompt according to claims 1 to 4; a display unit for displaying the prompt; and an edited prompt acquisition unit for acquiring an edited prompt obtained by editing the prompt.

8. 8. A writing device according to any one of claims 5 to 7, comprising: a first prompt source acquisition unit that acquires a first prompt source, which is data that serves as the source of the prompt according to any one of claims 1 to 4; a second prompt source acquisition unit that acquires a second prompt source that is an edited version of the first prompt source; an output unit that outputs the second prompt source to a natural language generation device; and an input unit that receives the prompt from the natural language generation device.

9. 5. A writing support device comprising: a first prompt source acquisition unit that acquires a first prompt source, which is data that serves as the source of the prompt described in any one of claims 1 to 4; a second prompt source acquisition unit that acquires a second prompt source obtained by editing the first prompt source; an output unit that outputs the second prompt source to a natural language generation device; and an input unit that receives the prompt from the natural language generation device.

10. 5. A method for creating sentences using a prompt as claimed in any one of claims 1 to 4 in a system having a prompt acquisition means for acquiring the prompt as claimed in any one of claims 1 to 4, a processing means for performing the processing as claimed in any one of claims 2 to 4 on the prompt, an output means for outputting the processed prompt to a natural language generation device, and an input means for receiving a generation result from the natural language generation device, the method comprising the steps of: acquiring the prompt as claimed in any one of claims 1 to 4 using the prompt acquisition means; performing the processing as claimed in any one of claims 2 to 4 on the prompt using the processing means; outputting the prompt to the natural language generation device using the output means; and receiving a generation result from the natural language generation device using the input means.

11. 11. A method for creating sentences using the prompts of claims 1 to 4 in a system having a prompt acquisition means for acquiring the prompts of claims 1 to 4, an output means for outputting a plurality of the prompts to a natural language generation device, an input means for receiving a plurality of generation results from the natural language generation device, and a processing means for structuring and linking the generation results to construct sentences.

12. A method for creating sentences using the prompts of claims 1 to 4 in a system having a prompt acquisition means for acquiring the prompts of claims 1 to 4, an output means for outputting a plurality of the prompts to the natural language generation device using the output means, a step of receiving a generation result from the natural language generation device using the input means, and a step of linking the generation results to construct sentences using the processing means.

12. A writing method as described in claim 10 or 11 for editing the prompt as described in claims 1 to 4 in a system having a storage means for storing the prompt as described in claims 1 to 4, a display means for displaying the prompt, and an edited prompt acquisition means for acquiring an edited prompt obtained by editing the prompt, the writing method as described in claim 10 or 11 for editing the prompt as described in claims 1 to 4, comprising the steps of: using the storage means to store the prompt before editing; using the display means to display the prompt; and using the edited prompt acquisition means to acquire an edited prompt obtained by editing the prompt.

13. 13. A writing creation method according to any one of claims 10 to 12, for generating the prompt of any one of claims 1 to 4 in a system having: first prompt source acquisition means for acquiring a first prompt source, which is data that is the source of the prompt of any one of claims 1 to 4; second prompt source acquisition means for acquiring a second prompt source obtained by editing the first prompt source; output means for outputting the second prompt source to a natural language generation device; and input means for receiving the prompt from the natural language generation device.

14. A writing creation method according to any one of claims 10 to 12, for generating the prompt of any one of claims 1 to 4 in a system having: first prompt source acquisition means for acquiring a first prompt source, which is data that is the source of the prompt; second prompt source acquisition means for acquiring the second prompt source, which is information that identifies the fixed part and other parts of the first prompt source,

14. 5. A writing support method for generating a prompt according to any one of claims 1 to 4, in a system having: first prompt source acquisition means for acquiring a first prompt source, which is data that is the source of the prompt; second prompt source acquisition means for acquiring a second prompt source obtained by editing the first prompt source; output means for outputting the second prompt source to a natural language generation device; and input means for receiving the prompt from the natural language generation device.

6. A writing support method for generating a prompt according to any one of claims 1 to 4, in a system having: first prompt source acquisition means for acquiring a first prompt source, which is data that is the source of the prompt; second prompt source acquisition means for acquiring the second prompt source, which is information that identifies the fixed part and other parts of the first prompt source;

15. A program for enabling a computer having a prompt acquisition unit that acquires the prompt described in claims 1 to 4, a processing unit that performs the processing described in claims 2 to 4 on the prompt, an output unit that outputs the processed prompt to a natural language generation device, and an input unit that receives the generation result from the natural language generation device to create sentences using the prompt described in claims 1 to 4.

16. A program as claimed in claim 15 for enabling a computer having a prompt acquisition unit that acquires the prompts as claimed in claims 1 to 4, an output unit that outputs a plurality of the prompts to a natural language generation device, an input unit that receives a plurality of generation results from the natural language generation device, and a processing unit that structures the generation results and constructs linked sentences, to implement structuring and constructing sentences.

17. A program as claimed in claim 15 or 16 for enabling a computer having a memory unit for storing the prompt as claimed in claims 1 to 4, a display unit for displaying the prompt, and an edited prompt acquisition unit for acquiring an edited prompt obtained by editing the prompt, to edit the prompt.

18. A program as claimed in any one of claims 15 to 17, for enabling a computer having a first prompt source acquisition unit that acquires a first prompt source, which is data that serves as the source of the prompt as claimed in any one of claims 1 to 4, a second prompt source acquisition unit that acquires a second prompt source that has been edited from the first prompt source, an output unit that outputs the second prompt source to a natural language generation device, and an input unit that receives the prompt from the natural language generation device, to generate a prompt.

19. A program for enabling a computer to generate a prompt, the program comprising: a first prompt source acquisition unit that acquires a first prompt source, which is data that serves as the source of the prompt described in any one of claims 1 to 4; a second prompt source acquisition unit that acquires a second prompt source that is an edited version of the first prompt source; an output unit that outputs the second prompt source to a natural language generation device; and an input unit that receives the prompt from the natural language generation device.

Citation Information

Patent Citations

  • Program, patent information processing device, and patent information processing method

    JP7495767B1