Information processing device, information processing method, and information processing program

The information processing device addresses the inefficiencies in RAG systems by extracting and chunking text data from electronic documents to generate high-quality QA data, improving accuracy and relevance of answers without additional learning, especially with complex layouts and unstructured data.

JP7784017B1Active Publication Date: 2025-12-10SOFTBANK CORPORATION
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
JP2025050329
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-12-10
Estimated Expiration
2045-03-25

AI Technical Summary

Technical Problem

Existing technologies face challenges in utilizing internal company data with Retrieval-Augmented Generation (RAG) systems, particularly in the search phase, where accuracy of information, chunking, unstructured data, and designing prompts are difficult, especially with PDF files containing embedded text and complex layouts, leading to inefficiencies in generating high-quality answers.

Method used

An information processing device that acquires electronic document files, extracts text data, divides it into chunks of a predetermined number of characters, and generates Q&A data using a large-scale language model (LLM) to improve the accuracy and relevance of answers, even with complex layouts and unstructured data.

Benefits of technology

The solution enhances the accuracy of RAG systems by providing high-quality QA data, reducing the need for additional learning and time, and enabling efficient utilization of internal data, even with complex layouts and unstructured formats like PDF files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007784017000001_ABST
    Figure 0007784017000001_ABST
Patent Text Reader

Abstract

Generate high-quality QA data. [Solution] The information processing device includes an acquisition unit (211) that acquires an electronic document file, an extraction unit (212) that extracts text data from the electronic document file, a chunking unit (213) that divides the text data into chunks of a predetermined number of characters, and a generation unit (214) that generates Q&A data consisting of questions and answers from each chunk using a large-scale language model.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to an information processing device, an information processing method, and an information processing program. [Background technology]

[0002] Conventionally, there is known a technique for automatically generating prompts to be input to a generation AI and having the generation AI generate an FAQ. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent No. 7611621 Summary of the Invention [Means for solving the problem]

[0004] An information processing device according to one embodiment of the present disclosure includes an acquisition unit that acquires an electronic document file, an extraction unit that extracts text data from the electronic document file acquired by the acquisition unit, a chunking unit that divides the text data extracted by the extraction unit into chunks of a predetermined number of characters, and a generation unit that generates Q&A data consisting of questions and answers from each chunk chunked by the chunking unit using a large-scale language model.

[0005] An information processing method according to one embodiment of the present disclosure is an information processing method used in an information processing device, and includes an acquisition step of acquiring an electronic document file, an extraction step of extracting text data from the electronic document file acquired in the acquisition step, a chunking step of dividing the text data extracted in the extraction step into chunks of a predetermined number of characters, and a generation step of generating Q&A data consisting of questions and answers from each chunk chunked in the chunking step using a large-scale language model.

[0006] An information processing program according to one embodiment of the present disclosure is an information processing program for causing a computer to function as an information processing device, and causes the computer to function as an acquisition unit that acquires an electronic document file, an extraction unit that extracts text data from the electronic document file acquired by the acquisition unit, a chunking unit that divides the text data extracted by the extraction unit into chunks of a predetermined number of characters, and a generation unit that generates Q&A data consisting of questions and answers from each chunk chunked by the chunking unit using a large-scale language model. [Brief explanation of the drawings]

[0007] [Figure 1] FIG. 1 is a diagram illustrating an application example of an information processing system according to the present disclosure. [Figure 2] FIG. 1 is a block diagram illustrating an example of a hardware configuration of an information processing device according to the present disclosure. [Figure 3] FIG. 1 is a block diagram illustrating an example of a functional configuration of an information processing device according to the present disclosure. [Figure 4] 10A and 10B are diagrams illustrating an example of an electronic document file for which QA data is generated. [Figure 5] FIG. 2 is a diagram illustrating an example of the data structure of each chunk. [Figure 6] FIG. 10 is a diagram illustrating an example of a prompt. [Figure 7] FIG. 10 is a diagram illustrating an example of layout information. [Figure 8] 10 is a flowchart illustrating an example of processing executed by an information processing device according to the present disclosure. [Figure 9] FIG. 10 is a diagram illustrating an example of table data processing. [Figure 10] FIG. 10 is a diagram illustrating parallel processing of QA data generation. DETAILED DESCRIPTION OF THE INVENTION

[0008] Hereinafter, an embodiment of the present disclosure will be described in detail with reference to the drawings. For ease of understanding, the background and problems of the present disclosure will be described first, and then the details of the present disclosure will be described.

[0009] In recent years, there has been active development of generative AI models (artificial intelligence) such as LLMs (Large Language Models). To broaden the scope of use of such generative AI models, a new approach called RAG (Retrieval-Augmented Generation) has emerged that combines generative AI models with information retrieval. RAG uses the results of external information searches to output answers, making the basis for the answer clear and increasing the reliability of the answer. LLMs are also expected to reduce the risk of hallucination.

[0010] RAG has two main stages: the search phase and the generation phase.

[0011] In the search phase, information related to the question entered by the company's employees is searched from databases, etc. In the generation phase, the employee's question is expanded or detailed information is added based on the search results obtained in the search phase. The expanded question and prompt containing the additional information generated based on the search results are input into the LLM. The LLM takes the expanded question and additional information into consideration to generate a more detailed and relevant answer. This process enables employees to obtain high-quality answers.

[0012] Examples of RAG needs include "I want to use knowledge about my company's products and services" and "I want to know answers that comply with my company's business rules." While LLMs are expected to provide high-quality answers in language processing tasks such as writing, summarizing, and translating, as well as program code generation, they do not understand the company's business rules and regulations. Therefore, in order to utilize internal data, it is necessary to have the LLM understand the company's business rules and regulations. However, in order to have the LLM understand the company's business rules and regulations, it is necessary to prepare the target training data and spend a certain amount of time on additional training, which is time-consuming and costly.

[0013] In this regard, RAG is a system that searches internal company data and provides the search results to LLM, so LLM can provide employees with high-quality answers to questions about, for example, how to proceed with work based on the company's business rules, without any additional learning. Also, even if internal company data is updated, RAG can instantly reflect the latest information. This ease of updating information is also a strength of RAG.

[0014] However, there are several problems with using RAG to utilize internal data (various documents). Specifically, the following problems (1) to (4) can be mentioned. (1) Accuracy of Information (2) Chunking (dividing information) (3) Unstructured data (4) Difficulty in designing prompts

[0015] <Accuracy of information> There is no right answer in the documents regarding the accuracy of the information. Therefore, even if RAG tries to search for documents that are highly relevant to the employee's question, it is difficult to search because there is no right answer.

[0016] <Chunking (dividing information)> The chunk (part of the document) retrieved by the RAG may be different from the context of the answer, or may not contain the information needed for the answer.

[0017] <Unstructured Data> Within companies, documents are often managed in PDF (Portable Document Format) for reasons such as readability. While PDF offers many advantages, it also has its disadvantages. For example, PDF files may contain embedded text as image data or table data. In such cases, RAGs have difficulty recognizing the embedded text as text, making it difficult to correctly understand the contents of the PDF file. PDF files may also contain handwritten text. This handwritten text is often important to employees. However, because handwritten text is typically stored as image data, RAGs have difficulty recognizing it as text. Furthermore, PDF files often have complex layouts, and for RAGs to correctly understand the contents of a PDF file, the unstructured data must be properly structured.

[0018] <Difficulties in prompt design> Vague prompts are unlikely to elicit high-quality responses, but it's difficult for inexperienced employees to design appropriate prompts.

[0019] As explained above, even if you try to use RAG to utilize internal data, it is difficult to obtain high-quality answers.

[0020] Therefore, the information processing device according to the present disclosure is configured to include an acquisition unit that acquires an electronic document file, an extraction unit that extracts text data from the electronic document file acquired by the acquisition unit, a chunking unit that divides the text data extracted by the extraction unit into chunks of a predetermined number of characters, and a generation unit that generates Q&A data consisting of questions and answers from each chunk chunked by the chunking unit using a large-scale language model (LLM).

[0021] As described above, by dividing text data into chunks, the text data is processed in smaller units, allowing the LLM to more accurately understand the content and context of the chunks. This allows the information processing device according to the present disclosure to generate high-quality QA data using the LLM.

[0022] The QA data generated in this way contributes to improving the accuracy of RAG. In this regard, a large amount of QA data provides a variety of answer candidates for a question. This makes it easier for RAG to select information that is more relevant to the question. In addition, a large amount of QA data enriches the context of the question. This allows RAG to more accurately understand the intent of the question and expand the question appropriately.

[0023] When an employee who wants to utilize internal data inputs a question into the RAG, the RAG can search for information more relevant to the question from the Q&A data. The RAG provides the search results to the LLM, which then incorporates richer context and information to generate high-quality answers to the employee's questions without additional learning. In this way, this disclosure makes it possible to effectively utilize internal data while reducing the time and cost associated with additional learning. Details are provided below.

[0024] <Application Examples of the Present Disclosure> An application example of the present disclosure will be described with reference to FIG.

[0025] 1, an information processing system 10 includes a terminal 11, a RAG 12, a database 13, and an LLM 14. A large number of in-house electronic document files are stored in the database 13. The database 13 may be constructed in an in-house storage device or on an external cloud server.

[0026] In this embodiment, the entity using the information processing system 10 is described as an arbitrary company, but is not limited to this. The entity using the information processing system 10 may also be an arbitrary university, an arbitrary research institute, or any other arbitrary organization.

[0027] The format of the electronic document file is not particularly limited, and may be the PDF format described above, a well-known document format such as Word, Excel, PowerPoint, or other document format. In the following, the format of the electronic document file will be described as PDF as an example.

[0028] The contents of an electronic document file include proprietary information of the company, such as information about the company's products and services, or about the company's business rules and regulations. In the following, the electronic document file will be described as consisting only of proprietary information of the company, but is not limited to this. In addition to proprietary information of the company, the contents of an electronic document file may also include information that is not directly related to the company (for example, information about education and training, information about the industry community, etc.).

[0029] <Terminal 11> The terminal 11 is, for example, a smartphone that can be carried by a company employee, or a stationary personal computer (PC) installed anywhere within the company. As another example, the terminal 11 may be a tablet terminal, a laptop PC, etc. The employee uses the terminal 11 to input a question to the RAG 12.

[0030] <rag12> The RAG 12 may be a service provided as an application in a PaaS (Platform as a Service). PaaS is a service that provides a platform that serves as a foundation for running software via the Internet. In this embodiment, the RAG 12 is described as a service provided by a PaaS as an example, but is not limited to this. The RAG 12 may also be provided in another manner.

[0031] RAG 12 searches database 13 for information related to the question entered by the employee. RAG 12 combines the search results with the employee's question to generate a prompt that expands on the employee's question. The prompt generated by RAG 12 (the "expanded question" in Figure 1) is input to LLM 14.

[0032] <Database 13> As will be described in more detail later, the database 13 stores Q&A data consisting of questions and answers related to the contents of electronic document files. By referencing a large amount of Q&A data, the RAG 12 can easily select more relevant information, even if the employee's question is vague. This increases the likelihood that the prompts generated by the RAG 12 will reflect a more accurate understanding of the employee's intentions.

[0033] <llm14> LLM14 generates an answer to the question based on the prompt generated by RAG12 and taking into account the search results. As described above, the prompt more accurately understands the employee's intent, allowing LLM14 to incorporate richer context and information, thereby generating a higher-quality answer. RAG12 receives the answer from LLM14 and provides it to the employee. This series of processes allows the employee to obtain a high-quality answer.

[0034] The manner in which the LLM 14 is used is not particularly limited, but for example, the LLM 14 may be provided via an API (Application Programming Interface).

[0035] An example of the hardware configuration of the information processing device 20 that generates the above-mentioned QA data will be described with reference to Fig. 2. Fig. 2 is a block diagram showing an example of the hardware configuration of the information processing device 20.

[0036] <Information processing device 20> 2, the information processing device 20 includes a processor 21, a memory 22, a storage 23, and a communication I / F 24. These components are connected via a bus 25 so as to be able to communicate with each other.

[0037] <Processor 21> The processor 21 reads a program from the storage 23, loads it into the memory 22, and executes processing in accordance with the program. Such a program is a program that causes a computer to execute at least some of the functions described below. Note that the program may be one that performs its functions in combination with other programs already stored in the storage 23 or in combination with other programs implemented in other devices. The program may also be distributed to the information processing device 20 via wireless communication. In this case, the processor 21 loads the distributed program into the memory 22 and executes processing. In other words, the program does not necessarily have to be stored in the storage 23.

[0038] The processor 21 is not particularly limited, but may be realized as, for example, a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor unit (MPU), a field-programmable gate array (FPGA), etc. Although one processor is shown in FIG. 2, the present invention is not limited to this, and multiple processors may be provided.

[0039] <Memory 22> The memory 22 is a computer-readable recording medium, and is configured by at least one of, for example, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable ROM), EEPROM (registered trademark) (Electrically Erasable Programmable ROM), etc. Such memory 22 may also be called a register, cache, main memory (primary storage device), etc.

[0040] <Storage 23> The storage 23 is a computer-readable recording medium that stores various data and programs. Such storage 23 may be configured, for example, by an HDD (Hard Disk Drive) or an SSD (Solid State Drive). The storage 23 may also be a portable recording medium such as a flexible disk, an optical disk, a compact disk, or a Blu-ray (registered trademark) disk. The storage 23 may also be called an auxiliary storage device.

[0041] <Communication I / F24> The communication I / F 24 is an interface for communicating with external devices. The communication I / F 24 is implemented as, for example, hardware such as a network adapter, various communication software, or a combination thereof, and is configured to realize wireless or wired communication via a communication network. In the example shown in Fig. 2, the information processing device 20 is configured to acquire electronic document files from the database 13 via the communication I / F 24.

[0042] The hardware configuration of the information processing device 20 is not limited to the above-described configuration. For example, the information processing device 20 may include an input / output I / F as hardware. Such an input / output I / F may include, for example, an information input device such as a keyboard or a pointing device (e.g., a mouse or a touch panel), an audio input device such as a microphone, or an image input device such as a camera. The input / output I / F may also include an image output device such as a display, or an audio output device such as a speaker.

[0043] <Example of Processor 21 functions> Next, an example of the functions of the processor 21 of the information processing device 20 will be described with reference to FIG. 3. FIG. 3 is a block diagram showing an example of the functions of the processor 21. The processor 21 reads a program from the storage 23 and executes the program using the memory 22 as a work area, thereby functioning as an acquisition unit 211, an extraction unit 212, a chunking unit 213, and a generation unit 214. The term "unit" used here may be rephrased as "circuit," "device," or "instrument," or as "step," "procedure," or "process." That is, the term "unit" may be realized by a program stored in the storage 23 as described above, or may be implemented solely by hardware such as elements, devices, boards, and wiring, or by a combination of software and hardware. These functions will be described below.

[0044] <Acquisition part 211> The acquisition unit 211 acquires electronic document files for which QA data is to be generated from the database 13. As described above, examples of electronic document files for which QA data is to be generated include files related to the company's products and services, files related to the company's business rules and regulations, etc.

[0045] The acquisition unit 211 outputs the acquired electronic document file to the extraction unit 212 .

[0046] <Extraction part 212> The extraction unit 212 extracts text data from the electronic document file acquired by the acquisition unit 211. If the text data is stored in a format that can be read by a program, the extraction unit 212 can extract the text data without performing any special processing. On the other hand, if the text data is not stored in a format that can be read by a program, the extraction unit 212 executes a predetermined character recognition process on the electronic document file to extract the text data.

[0047] "When the text data is not stored in a format that can be read by a program" refers to, for example, when the text data is embedded in an electronic document file as image data, table data, handwritten data, etc., as described above.

[0048] The extraction unit 212 extracts text data and makes it available as digital data by performing a predetermined character recognition process on such embedded image data, embedded table data, handwritten data, etc. The character recognition process is not particularly limited, but may be, for example, OCR (Optical Character Recognition).

[0049] The extraction unit 212 outputs the extracted text data to the chunking unit 213 .

[0050] The extraction unit 212 may analyze the layout information of the electronic document file and convert it into a predetermined format, as will be described in detail later.

[0051] <Chunking section 213> The chunking unit 213 divides the text data extracted by the extraction unit 212 into chunks by dividing it into a predetermined number of characters. An example of chunking text data will now be described with reference to FIG. 4. In this embodiment, "chunking" means dividing the text data of an electronic document file into multiple small parts and processing them. The small parts obtained by the division process are called "chunks."

[0052] Figure 4 shows a PDF file 30, which is an electronic document file for which QA data is generated. The PDF file 30 shown as an example in Figure 4 is composed of a "title," "date," "heading," "body," and "page number." In Figure 4, it is assumed that each of these elements is embedded as image data.

[0053] The extraction unit 212 executes OCR processing on the embedded image data to extract text data, which enables the chunking unit 213 to recognize each element shown in FIG.

[0054] If each element shown in FIG. 4 is stored recognizably as text data, the extraction unit 212 may omit the OCR process.

[0055] As shown in Fig. 4, the chunking unit 213 divides the text data into a predetermined number of characters starting from the top of the first page. In Fig. 4, the divided text data is shown as regions R1, R2, R3, .... The predetermined number of characters may be any number of characters that is expected to generate a certain amount of QA data, and is not particularly limited, but may be, for example, about 900 to 1000 characters.

[0056] The number of characters to be chunked may be preset to a standard value of approximately 900 to 1000 characters, or the number of characters may be specified by the user. The fewer the number of characters to be chunked, the more Q&A data is generated, which allows for enriching the answers to the LLM14 using the RAG12. Therefore, if the number of characters can be specified by the user, it becomes possible to enrich the answers by preparing more Q&A data for documents with high demand, depending on the content of the PDF file 30.

[0057] The text data to be divided is all of the text data in the PDF file 30. Therefore, all of the "title," "date," "heading," "body," and "page number" are subject to division. In the above description, the chunking unit 213 divides the text data at a predetermined number of characters. More specifically, when the generation unit 214 generates QA data, the chunking unit 213 divides the text data so that appropriate QA data is generated. For example, the chunking unit 213 may set a comma as the target position for division and divide the text data so that the number of characters of the text data included in region R1 is approximately 900 to 1000 characters. The reason for setting a comma as the target position for division is that if the text is divided at a point other than a comma, it may be difficult for the LLM 14 to correctly understand the text.

[0058] In the example shown in FIG. 4, region R1 is split in the middle of the body of heading B. In this way, the chunking unit 213 splits the text data into regions R1, R2, R3, ... starting from the top of the first page. Note that since FIG. 4 shows only the first page of the PDF file 30, region 4 is only shown partway through. However, in reality, region 4 is a region that is split across the second page. In other words, the chunking unit 213 splits the text data across all pages of the PDF file 30.

[0059] After the division process, the chunking unit 213 chunks the text data of the regions R1, R2, R3, .... Through the chunking process, chunks (chunks 1, 2, 3, ...) having a specific data structure are generated. Here, an example of the data structure of the chunks will be described with reference to Fig. 5.

[0060] <Chunk data structure> FIG. 5 is a diagram showing an example of the data structure of each chunk (chunks 1, 2, 3, ..., 100). As shown in FIG. 5, a chunk is mainly composed of meta information, size information, and content information. As described above, the text data is divided into chunks of approximately 900 to 1000 characters, and it can be seen that this is reflected in the size information. The content information stores the divided text data. Note that the number of chunks is just an example and is not limited to 100. Depending on the size of the PDF file, the number of chunks may be more than 100 or less than 100.

[0061] The explanation will return to Fig. 3. The chunking unit 213 outputs each chunk that has been chunked (chunks 1, 2, 3, . . . , 100) to the generation unit 214.

[0062] <Generation unit 214> The generation unit 214 generates QA data from each chunk chunked by the chunking unit 213, using the LLM 14. To explain the specific process, first, the generation unit 214 generates a prompt for causing the LLM 14 to generate QA data for each chunk. Here, an example of the prompt for causing the LLM 14 to generate QA data for each chunk will be explained with reference to Fig. 6.

[0063] <prompt> Prompt 40 shown in Figure 6 is an example of a prompt for causing LLM 14 to generate QA data for each chunk. As shown in Figure 6, prompt 40 includes {layout_info} indicating an instruction for reading layout information of PDF file 30, {chunk} indicating an instruction for reading each chunk, and an instruction for generating QA data based on the layout information and each chunk.

[0064] {layout_info} will now be described. As described above, the extraction unit 212 may analyze the layout information of an electronic document file and convert it into a predetermined format. The command for reading the "layout information" referred to here is {layout_info}. The layout information is information that indicates the structure of an electronic document file (for example, the PDF file 30 described in FIG. 4).

[0065] Examples of layout information include the font, size, position, and content of text data, the size and position of image data, the position of table data, the text data contained in each cell, the size of each cell, page number, page size, and orientation (portrait or landscape).

[0066] When the LLM 14 generates QA data for each chunk, if the LLM 14 generates the QA data for each chunk after understanding the entire text of the PDF file 30, it can generate higher quality QA data than if the LLM 14 does not understand the entire text. For this reason, in this embodiment, the generation unit 214 is configured to provide the LLM 14 with layout information for the PDF file 30, including the content of the text. However, as described above, PDF files may use complex layouts. For this reason, it is necessary to provide the layout information in a format that is easy for the LLM 14 to understand.

[0067] Therefore, in this embodiment, the layout information of the PDF file 30 is converted into a format that is easily understood by the LLM 14 and then loaded into the LLM 14. One example of a format that is easily understood by the LLM 14 is the JSON (JavaScript Object Notation) format. An example of the JSON format for the PDF file 30 will be described with reference to FIG. 7 . As shown in FIG. 7 , the extraction unit 212 can analyze each element of the layout information of the PDF file 30, such as text data and image data, for each page and convert it into a JSON format 50. The JSON format 50 has a structure in which data is expressed as key-value pairs, making it easier for the LLM 14 to understand the data. Another advantage of the JSON format 50 is that by adopting a data structure that is easily understood by the LLM 14, communication with the LLM 14 via the API becomes smoother. This contributes to reducing API errors.

[0068] The LLM 14 reads the layout information expressed in JSON format 50 in accordance with the {layout_info} command. As described above, the layout information expressed in JSON format 50 includes the text content of the PDF file 30. Therefore, by reading the layout information expressed in JSON format 50, the LLM 14 can accurately understand the entire text of the PDF file 30.

[0069] Specifically, the LLM 14 can understand the context of the PDF file 30 by reading layout information expressed in JSON format 50. For example, even for a complex layout structure in which text data and table data span multiple pages, the JSON format 50 allows the LLM 14 to link the text data and table data and interpret the context as intended by the document creator. In this way, the LLM 14 can accurately understand the entire text of the PDF file 30, thereby generating high-quality QA data.

[0070] For the explanation, refer back to Figure 6. The LLM 14 reads each chunk (chunk 1, 2, 3, ..., 100) in order starting from 1 according to the {chunk} command. The LLM 14 generates QA data for the chunks that it reads.

[0071] Based on the above explanation, the overall processing of the prompt 40 will be explained as follows: First, the LLM 14 reads the layout information expressed in JSON format 50 in accordance with the {layout_info} command and understands the entire text of the PDF file 30. Next, the LLM 14 reads chunk 1 in accordance with the {chunk} command and understands the text of chunk 1. Then, the LLM 14 generates QA data corresponding to the text of chunk 1 based on the content of the entire text. This results in high-quality QA data being generated.

[0072] The algorithm used by the LLM 14 to generate QA data is not particularly limited. For example, the LLM 14 may utilize context caching of past questions asked by employees. By utilizing context caching, the LLM 14 can analyze trends in past questions and generate questions and answers that employees are likely to want to know from the target chunk.

[0073] After generating QA data corresponding to the text in chunk 1, the LLM 14 then generates QA data corresponding to the text in chunk 2. At this time, the LLM 14 again reads the layout information expressed in JSON format 50 and understands the entire text of the PDF file 30. That is, in this embodiment, the LLM 14 reads the layout information expressed in JSON format 50 and understands the entire text of the PDF file 30 every time the chunk to be read is switched.

[0074] After generating QA data corresponding to the text in chunk 2, the LLM 14 then generates QA data corresponding to the text in chunk 3. At this time, as described above, the LLM 14 also reads the layout information expressed in JSON format 50 and understands the entire text in the PDF file 30. Thereafter, the above process is repeated until reading of the specified chunk is completed (up to chunk 100 in this embodiment).

[0075] The number of QA data generated by the LLM 14 is not particularly limited, but is expected to be 20 to 40 per chunk. If you want to increase the number of QA data generated by the LLM 14, as described above, you can reduce the number of characters to less than 900 to 1000 characters.

[0076] 6 does not specify the number of QA data to be generated, but is not limited to this. The prompt 40 may specify the number of QA data to be generated.

[0077] The QA data generated by the LLM 14 is stored in a database 13 (see FIG. 3).

[0078] <Processing flow> Next, a flow of processing executed by the information processing device 20 will be described with reference to Fig. 8. Fig. 8 is a flowchart showing an example of processing executed by the acquisition unit 211, extraction unit 212, chunking unit 213, and generation unit 214 included in the information processing device 20.

[0079] <Step S101> In step S101, the acquisition unit 211 acquires an electronic document file for which QA data is to be generated from the database 13. In this flowchart, the electronic document file is described as a PDF file 30 (see FIG. 4). The PDF file 30 is, for example, a file related to a company's products or services, or a file related to the company's business rules and regulations.

[0080] <Step S102> In step S102, the extraction unit 212 extracts text data from the PDF file 30 obtained in the process of step S101. The extraction unit 212 may extract the text data by, for example, performing OCR processing on the PDF file 30.

[0081] <Step S103> In step S103, the chunking unit 213 divides the text data extracted in the process of step S102 into chunks by a predetermined number of characters (see FIG. 5).

[0082] <Step S104> In step S104, the generation unit 214 generates a prompt 40 for causing the LLM 14 to generate QA data for each chunk (chunks 1, 2, 3, . . . , 100) chunked in the process of step S103 (see FIG. 6).

[0083] <Step S105> In step S105, the generation unit 214 inputs the prompt 40 generated in the processing of step S104 to the LLM 14, thereby generating QA data from each chunk chunked in the processing of step S103. The prompt 40 includes {layout_info} described in FIG. 6. In accordance with the command of {layout_info}, the LLM 14 reads the layout information expressed in JSON format 50 and understands the entire text of the PDF file 30. Then, the LLM 14 generates QA data corresponding to the text of each chunk, taking into account the content of the entire text. This generates high-quality QA data.

[0084] As described above, the information processing method according to this embodiment includes an acquisition step (S101) of acquiring an electronic document file, an extraction step (S102) of extracting text data from the electronic document file acquired in the acquisition step, a chunking step (S103) of dividing the text data extracted in the extraction step into chunks of a predetermined number of characters, and a generation step (S105) of generating Q&A data consisting of questions and answers from each chunk chunked in the chunking step using a large-scale language model.

[0085] The processing flow in the flowchart shown in FIG. 8 is an example, and steps may be deleted, new steps may be added, or the processing order may be changed within the scope of the invention.

[0086] <Action and effect> As described above, according to this embodiment, the following advantageous effects can be obtained.

[0087] The information processing device 20 according to this embodiment includes an acquisition unit 211 that acquires an electronic document file (e.g., a PDF file 30), an extraction unit 212 that extracts text data from the electronic document file acquired by the acquisition unit 211, a chunking unit 213 that divides the text data extracted by the extraction unit 212 into chunks of a predetermined number of characters, and a generation unit 214 that generates Q&A data consisting of questions and answers from each chunk chunked by the chunking unit 213 using a large-scale language model (e.g., LLM14).

[0088] As described above, by dividing text data into chunks, the text data is processed in smaller units, allowing the LLM 14 to more accurately understand the content and context of the sentences in the chunks. This allows the generation unit 214 to generate high-quality QA data using the LLM 14.

[0089] The QA data generated in this way contributes to improving the accuracy of RAG12. A large amount of QA data provides a variety of answer candidates for a question. This makes it easier for RAG12 to select information that is more relevant to the question. In addition, a large amount of QA data enriches the context of the question. This allows RAG12 to more accurately understand the intent of the question and appropriately expand the question.

[0090] When an employee who wants to utilize internal data inputs a question into RAG 12, RAG 12 can search the Q&A data for information that is more relevant to the question. RAG 12 provides the search results to LLM 14, which then incorporates richer context and information to generate high-quality answers to the employee's questions without additional learning. As such, this embodiment makes it possible to effectively utilize internal data while reducing the time and cost associated with additional learning.

[0091] Furthermore, prompts generated by employees who are unfamiliar with prompt design are likely to be vague, but by generating a large amount of Q&A data in advance, the probability of relevant information being found within the Q&A data increases, even for vague prompts, thereby increasing the probability of obtaining a high-quality answer.

[0092] Furthermore, generating QA data in advance contributes to providing information that is closer to the correct answer with regard to the above-mentioned "(1) accuracy of information."

[0093] Furthermore, the generating unit 214 may use the LLM 14 to generate QA data from layout information indicating the structure of each chunk and electronic document file chunked by the chunking unit 213. Furthermore, the layout information may be information expressed in JSON format.

[0094] According to the above configuration, the LLM 14 can read the layout information expressed in JSON format, thereby accurately understanding the entire text of the PDF file 30. The LLM 14 generates QA data corresponding to the target chunk while taking into account the entire text, thereby generating high-quality QA data.

[0095] Depending on the content, PDF files may contain complex layouts. Even in such cases, LLM14 can accurately understand the complex layout by converting the layout information into JSON format. LLM14 accurately understands the complex layout and also the entire text to generate QA data, resulting in high-quality QA data.

[0096] Furthermore, the generating unit 214 may cause the LLM 14 to read layout information and generate QA data every time the chunk read by the LLM 14 is switched.

[0097] According to the above configuration, the LLM 14 generates QA data for each chunk after understanding the entire sentence, thereby generating high-quality QA data.

[0098] The electronic document file may also include at least one of embedded image data, embedded table data, and handwritten data. The extraction unit 212 may extract text data by performing OCR processing on the electronic document file.

[0099] Embedded image data, embedded table data, and handwritten data may contain information that employees want to know. Therefore, in this embodiment, the extraction unit 212 is configured to extract text data from these data by performing OCR processing. This generates Q&A data related to the information that employees want to know, making it possible to provide high-quality answers to employees' questions.

[0100] <Other embodiments> <Markdown format> Other embodiments will be described below. In the above description, it has been explained that the chunking unit 213 divides the text data of the PDF file 30 and chunks the divided areas (areas R1, R2, R3, ...). It has also been explained that in the chunked chunks, the text data is stored in the content information.

[0101] Here, if table data is included in the PDF file 30, the chunking unit 213 may convert the table data into Markdown format when chunking the data. This point will be described with reference to FIG. 9. Assume that table data 60 shown in FIG. 9 is included in the PDF file 30. The chunking unit 213 converts the table data 60 into Markdown format when chunking the data. The Markdown format of the table data 60 is a format in which each column is separated by "|" and the header and data are separated by "---", as shown in FIG. 9.

[0102] The Markdown format is easy for LLM14 to understand. Therefore, the Markdown format makes it easier for LLM14 to understand the row and column structure, allowing it to accurately understand the contents of the table data 60. The table data 60 often contains important information for generating QA data. Accurate understanding of such table data 60 contributes to generating high-quality QA data.

[0103] <Parallel processing> Fig. 10 is a diagram illustrating parallel processing of QA data generation for each chunk. As shown in Fig. 10, the generation unit 214 may use the LLM 14 to execute the QA data generation process for each chunk (chunks 1, 2, 3, ..., 100) in parallel. This can reduce the overall time required for QA data generation. Note that the number of processes that can be performed in parallel depends on the performance of the LLM 14, hardware resources, etc.

[0104] As an example, the inventors performed the above-described method, including parallel processing, on a PDF file consisting of 60 pages and 60,000 characters, to generate QA data for each chunk. In this case, the inventors were able to generate a total of 1,400 pieces of QA data for each chunk in 15 minutes. Please note that this result was based on the performance and hardware resources of LLM14 at the time of filing. Further time reductions are expected as the performance and hardware resources of LLM14 improve.

[0105] As a comparative example, we will explain the case where a user manually inputs prompts to an arbitrary large-scale language model to generate QA data. Manual prompt input requires a huge amount of time. Furthermore, manual prompt input can result in an inappropriate prompt being input, which can cause an API error and result in the failure of QA data generation. Furthermore, manual prompt input that is not chunked can result in duplicate QA data being generated. These problems occur when attempting to generate QA data by manually inputting prompts.

[0106] In contrast to such manual prompt input, in the configuration of this embodiment, the prompt 40 generated by the generation unit 214 is input to the LLM 14. This allows the LLM 14 to generate QA data for each chunk while taking into account the entire sentence, thereby preventing duplicate generation of QA data. Furthermore, by adopting a data structure that is easy for the LLM 14 to understand, such as JSON format, API errors are reduced. Furthermore, the generation unit 214 can generate QA data in parallel, allowing a large amount of QA data to be generated in a short period of time.

[0107] As described above, according to this embodiment, it is possible to generate high-quality QA data in a short time compared to manual generation of QA data.

[0108] Although the method described in this disclosure has been described as being used to utilize in-house data as an example, the method described in this disclosure can also be used as, for example, an FAQ generation tool.

[0109] <Software implementation example> The functions of the information processing device 20 (hereinafter simply referred to as the "device") can be realized by an information processing program for causing a computer to function as the device, and a program for causing a computer to function as each control block of the device (particularly the acquisition unit 211, extraction unit 212, chunking unit 213, and generation unit 214).

[0110] In this case, the device includes a computer having at least one control device (e.g., a processor) and at least one storage device (e.g., a memory) as hardware for executing the program. The control device and storage device execute the program, thereby realizing the functions described in each of the above embodiments.

[0111] The program may be non-transitory and may be recorded on one or more computer-readable recording media. The recording media may or may not be included in the device. In the latter case, the program may be supplied to the device via any wired or wireless transmission medium.

[0112] In addition, some or all of the functions of each of the control blocks can be realized by a logic circuit. For example, an integrated circuit in which a logic circuit that functions as each of the control blocks is formed is also included in the scope of the present disclosure. In addition, the functions of each of the control blocks can be realized by, for example, a quantum computer.

[0113] Furthermore, each process described in each of the above embodiments may be executed by AI. In this case, the AI ​​may run on the control device or on another device (for example, an edge computer or a cloud server).

[0114] <Summary> An information processing device according to aspect 1 of the present disclosure includes an acquisition unit that acquires an electronic document file, an extraction unit that extracts text data from the electronic document file acquired by the acquisition unit, a chunking unit that divides the text data extracted by the extraction unit into chunks of a predetermined number of characters, and a generation unit that generates Q&A data consisting of questions and answers from each chunk chunked by the chunking unit using a large-scale language model.

[0115] In an information processing device according to aspect 2 of the present disclosure, in aspect 1 above, the generation unit may generate the QA data using the large-scale language model from layout information indicating the structure of each chunk chunked by the chunking unit and the electronic document file.

[0116] In an information processing device according to aspect 3 of the present disclosure, in aspect 2 above, the generation unit may generate the QA data by reading the layout information into the large-scale language model each time the chunk read by the large-scale language model is switched.

[0117] An information processing device according to aspect 4 of the present disclosure may be such that, in any of aspects 1 to 3 above, the electronic document file includes at least one of embedded image data, embedded table data, and handwritten data, and the extraction unit performs OCR processing on the electronic document file to extract the text data.

[0118] In the information processing device according to aspect 5 of the present disclosure, in aspect 2 above, the layout information may be information expressed in JSON format.

[0119] In the information processing device according to a sixth aspect of the present disclosure, in any one of the first to fifth aspects, the chunking unit may convert table data included in the electronic document file into a Markdown format.

[0120] In the information processing device according to aspect 7 of the present disclosure, in any one of aspects 1 to 6 above, the generation unit may generate QA data for each chunk in parallel using the large-scale language model.

[0121] An information processing method according to aspect 8 of the present disclosure is an information processing method used in an information processing device, and includes an acquisition step of acquiring an electronic document file, an extraction step of extracting text data from the electronic document file acquired in the acquisition step, a chunking step of dividing the text data extracted in the extraction step into chunks of a predetermined number of characters, and a generation step of generating Q&A data consisting of questions and answers from each chunk chunked in the chunking step using a large-scale language model.

[0122] An information processing program according to aspect 9 of the present disclosure is an information processing program for causing a computer to function as an information processing device, and is configured to cause the computer to function as an acquisition unit that acquires an electronic document file, an extraction unit that extracts text data from the electronic document file acquired by the acquisition unit, a chunking unit that divides the text data extracted by the extraction unit into chunks containing a predetermined number of characters, and a generation unit that generates QA data consisting of questions and answers from each chunk chunked by the chunking unit using a large-scale language model.

[0123] <Additional Notes> The present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present disclosure.

[0124] This disclosure will enable RAG to use QA data generated by chunking text data from electronic document files to provide high-quality answers, forming the technological foundation for the field of generative AI and contributing to the achievement of Goal 9 of the Sustainable Development Goals (SDGs), which is to "build resilient infrastructure, promote inclusive and sustainable industrialization, and foster innovation." [Explanation of symbols]

[0125] 10 Information Processing Systems 11 Terminals 12 RAG 13 Database 14 LLM 20 Information processing equipment 211 Acquisition Department 212 Extraction part 213 Chunking 214 Generation part 30 PDF files 40 prompts 50 JSON format 60 Table Data

Claims

1. an acquisition unit that acquires an electronic document file; an extraction unit that extracts text data from the electronic document file acquired by the acquisition unit; a chunking unit that divides the text data extracted by the extraction unit into chunks by a predetermined number of characters; a generation unit that generates Q&A data consisting of questions and answers from each chunk that has been chunked by the chunking unit, using a large-scale language model; the generation unit generates the QA data using the large-scale language model from layout information indicating the entire structure of each chunk chunked by the chunking unit and the electronic document file. Information processing device.

2. the generation unit reads the layout information into the large-scale language model and generates the QA data every time the chunk read by the large-scale language model is switched. The information processing device according to claim 1 .

3. the electronic document file includes at least one of embedded image data, embedded table data, and handwritten data; the extraction unit executes an OCR process on the electronic document file to extract the text data.

3. The information processing device according to claim 1 or 2.

4. The layout information is information expressed in JSON format. The information processing device according to claim 1 .

5. the chunking unit converts table data included in the electronic document file into a Markdown format. The information processing device according to claim 1 .

6. the generation unit generates QA data for each chunk in parallel using the large-scale language model; The information processing device according to claim 1 .

7. An information processing method used in an information processing device, an acquiring step of acquiring an electronic document file; an extraction step of extracting text data from the electronic document file acquired in the acquisition step; a chunking step of dividing the text data extracted in the extraction step into chunks by a predetermined number of characters; a generation step of generating Q&A data consisting of questions and answers from each chunk obtained in the chunking step by using a large-scale language model; In the generating step, the QA data is generated using the large-scale language model from layout information indicating the chunks chunked in the chunking step and the overall structure of the electronic document file. Information processing methods.

8. An information processing program for causing a computer to function as an information processing device, The computer an acquisition unit that acquires an electronic document file; an extraction unit that extracts text data from the electronic document file acquired by the acquisition unit; a chunking unit that divides the text data extracted by the extraction unit into chunks by a predetermined number of characters; a generation unit that generates Q&A data consisting of questions and answers from each chunk chunked by the chunking unit using a large-scale language model; It functions as the generation unit generates the QA data using the large-scale language model from layout information indicating the entire structure of each chunk chunked by the chunking unit and the electronic document file. Information processing program.

Citation Information

Patent Citations

  • Question and answer pair generation method and device, electronic equipment and computer storage medium

    CN115114416A

  • Document creation assisting device, document creation assisting method and program

    JP2022080691A

  • Inspection system and inspection method

    JP2025136431A

  • Browsing support system, browsing support method and program

    JP7601361B1

  • Program, method, information processing device, and system

    JP7611621B1