Paper question answering method and system based on large language model

By extracting the structure of the paper and utilizing the chapter description information, combined with the large language model and RAG hybrid retrieval technology, the problem of insufficient response efficiency and accuracy in existing question answering methods is solved, and more accurate and efficient question answering results are achieved.

CN120124638BActive Publication Date: 2026-01-02CHINA COAL RES INST +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510608513.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2026-01-02
Estimated Expiration
2045-05-13

AI Technical Summary

Technical Problem

Existing paper-based question-answering methods still need improvement in response efficiency and accuracy, especially for general and specific questions, where the results are inconsistent.

Method used

By extracting the structure of the target paper and generating a tree structure, the target content is located based on the chapter description information using a large language model. The context length is compressed by combining hierarchical headings and chapter keywords. The RAG hybrid retrieval technology is used to ensure accuracy and response speed.

Benefits of technology

It improves the accuracy and response speed of question answering, enabling more precise and efficient location of target content, avoiding isolated information and misjudgment, and adapting to the needs of answering both general and specific questions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124638B_ABST
    Figure CN120124638B_ABST
Patent Text Reader

Abstract

The application provides a thesis question and answer method and system based on a large language model. The method comprises: performing thesis structure extraction on a target thesis based on the composition content of the target thesis to obtain a tree structure corresponding to the target thesis; determining chapter description information corresponding to any target node in the tree structure based on information of nodes included in a path from a root node of the tree structure to the target node; in response to receiving a question about the target thesis, using a large model to obtain target content in the target thesis that matches the question based on chapter description information corresponding to nodes in the tree structure; and answering the question based on the target content. The path from the root node to the target node can link the chapter logical context, enabling the large model to accurately grasp the context semantic association of the target node, thereby more accurately and efficiently positioning the target content, avoiding information isolation and misjudgment, making the answer more in line with the original meaning and logical system of the thesis, and thereby improving the accuracy of the question and answer.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of question and answer, and particularly relates to a paper question and answer method and system based on a large language model. BACKGROUND

[0002] In today's era of information explosion, the updating speed of knowledge is accelerating, therefore, how to quickly obtain the required information from the vast sea of academic papers has become one of the key factors restricting the progress of scientific research. However, the response efficiency of the current paper-based question and answer method still needs to be improved. SUMMARY

[0003] The present application aims to at least solve one of the technical problems in the related art to some extent.

[0004] To this end, a first object of the present application is to provide a paper question and answer method based on a large language model.

[0005] A second object of the present application is to provide a paper question and answer system based on a large language model.

[0006] A third object of the present application is to provide an electronic device.

[0007] A fourth object of the present application is to provide a computer-readable storage medium.

[0008] A fifth object of the present application is to provide a computer program product.

[0009] To achieve the above objects, a first aspect of the present application provides a paper question and answer method based on a large language model, comprising:

[0010] performing paper structure extraction on the target paper based on the constituent content of the target paper to obtain a tree structure corresponding to the target paper;

[0011] for any target node in the tree structure, determining chapter description information corresponding to the target node based on the information of the nodes included in the path from the root node of the tree structure to the target node;

[0012] in response to receiving a question about the target paper, using a large model to obtain target content in the target paper that matches the question based on the chapter description information corresponding to the nodes in the tree structure;

[0013] based on the target content, answering the question.

[0014] To achieve the above objects, a second aspect of the present application provides a paper question and answer system based on a large language model, comprising:

[0015] extracting a paper structure of the target paper based on component content of the target paper to obtain a tree structure corresponding to the target paper;

[0016] The determining module is configured to determine chapter description information corresponding to any target node in the tree structure based on information of nodes included in a path from a root node of the tree structure to the target node;

[0017] The first obtaining module is configured to, in response to receiving a question for the target paper, use a large model to obtain target content in the target paper that matches the question based on the chapter description information corresponding to nodes in the tree structure;

[0018] The answering module is configured to answer the question based on the target content.

[0019] The technical solutions provided in the present application bring at least the following beneficial effects:

[0020] The present application extracts a paper structure of a target paper based on component content of the target paper to obtain a tree structure corresponding to the target paper; determines chapter description information corresponding to any target node in the tree structure based on information of nodes included in a path from a root node of the tree structure to the target node; in response to receiving a question for the target paper, uses a large model to obtain target content in the target paper that matches the question based on the chapter description information corresponding to nodes in the tree structure; and answers the question based on the target content. The path from the root node to the target node can link chapter logical contexts, enabling the large model to accurately grasp contextual semantic associations at the target node, thereby more accurately and efficiently locating the target content, avoiding information isolation and misjudgment, making the answer more in line with the original meaning and logical system of the paper, and thus improving the accuracy of the answer.

[0021] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0022] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the accompanying drawings, in which:

[0023] Figure 1 A flowchart of a paper question-answering method based on a large language model according to an embodiment of the present application;

[0024] Figure 2 A flowchart of a paper question-answering method based on a large language model according to another embodiment of the present application;

[0025] Figure 3A flowchart of a thesis question answering method based on a large language model according to another embodiment of the present application is shown in FIG. 2.

[0026] Figure 4 A flowchart of a thesis question answering method based on a large language model according to another embodiment of the present application is shown in FIG. 2.

[0027] Figure 5 A structural diagram of a thesis question answering system based on a large language model according to an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION

[0028] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, in which the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.

[0029] In the related art, the thesis-based question answering method includes:

[0030] 1. Traditional keyword retrieval related content and answer generation based on a large language model

[0031] The scheme includes two stages of preparation and execution, wherein the preparation stage indexes the keywords after splitting the thesis, and the execution stage indexes the relevant document segments according to the keywords in the query as the basis for answering, and finally inputs the large language model (LLM) to generate the answer. The large language model can be referred to as a large model.

[0032] 2. Retrieval-augmented Generation (RAG) technology-based retrieval related content and answer generation

[0033] There are various schemes for answer generation based on RAG technology, mainly including:

[0034] (1) Conventional RAG technology scheme

[0035] The RAG process is directly performed on the query, in which semantic vector retrieval, hybrid retrieval, retrieval result rearrangement and other strategies are used.

[0036] The scheme includes two stages of preparation and execution, wherein the preparation stage generates semantic vectors after splitting the thesis, and the execution stage calculates the top-N (Top-N) text blocks most similar to the semantic vector of the query as the basis for answering, and finally inputs the large language model to generate the answer.

[0037] (2) Multi-angle rewriting of query + RAG technology

[0038] First, the query is rewritten from different angles to increase the coverage of recall, and then the RAG technology is used to retrieve and generate answers for the original query and each rewritten query.

[0039] (3) Generate initial answer + RAG technology

[0040] First, use a large language model to generate an initial answer based on its knowledge, and then replace the query with the initial answer to retrieve and generate answers using RAG technology.

[0041] 3. Use hierarchical summary method and filter relevant content based on large language model to generate answers

[0042] The scheme includes two stages of preparation and execution. In the preparation stage, the tree structure is divided according to the structure of the paper, and then the large language model is used to generate summaries for the content of each node of the tree structure. In the execution stage, starting from the top of the tree structure, the large language model is used to select the next layer of nodes based on the query and the summaries of the nodes, and then the selected nodes are used as the top of the next round of drilling and selection. Finally, the relevant paper fragments of the query are obtained, and the large language model is used to generate answers.

[0043] 4. Directly use the fine-tuned large language model to generate answers

[0044] The scheme includes two stages of preparation and execution. In the preparation stage, the large language model needs to be fine-tuned by collecting relevant information about the paper, so that the large model can learn relevant knowledge. In the execution stage, the fine-tuned large language model is directly used to answer the query.

[0045] 5. Directly use the general large language model to generate answers

[0046] This scheme uses the current large language model's ability to understand long text to directly answer questions. When executing, the full text of the paper and the query are input into the large language model, so that the large model can find useful information and generate answers.

[0047] However, the above schemes have some problems, specifically:

[0048] 1. Traditional keyword retrieval of relevant content and generation of answers based on large language model

[0049] For questions that do not contain effective keywords, the answer cannot be given, and the semantic information of the query cannot be understood, resulting in too much irrelevant content and too little content that meets the query semantics, affecting the accuracy and comprehensiveness of the answer.

[0050] 2. Retrieving relevant content and generating answers based on RAG technology

[0051] Conventional RAG technical solution: For summary questions, the number of effective keywords included is small and the semantics are different from the semantics of the target answer, accurate retrieval cannot be performed, and useful answers cannot be generated.

[0052] Multi-angle rewriting of query + RAG technology: The same shortcomings as the "conventional RAG technical solution".

[0053] Generating an initial answer + RAG technology: The generated initial answer is likely to deviate from the target answer, and the accuracy of the results retrieved based on the initial answer is poor, and the answering effect is unstable.

[0054] 3. Using hierarchical summarization and filtering relevant content based on large language models to generate answers

[0055] On the one hand, the process of generating summaries for all nodes is very time-consuming, and in real-time interactive scenarios, users often start asking questions immediately after importing papers, which cannot meet the immediacy; on the other hand, the process of extracting summaries will lose a lot of specific details, so the answering effect for specific questions is unstable.

[0056] 4. Directly using a fine-tuned large language model to generate answers

[0057] Whether the fine-tuning corpus of the large model contains relevant information, it cannot support new papers; it cannot internalize all the content in the paper into the large model through fine-tuning; fine-tuning the large model still has hallucinations, and the fine-tuning process is time-consuming and resource-consuming.

[0058] 5. Directly using a general large language model to generate answers

[0059] In a long context, the ability to identify relevant content for specific questions is still limited, resulting in unstable answering results; in addition, the long input context significantly increases the response time of question answering.

[0060] It should be noted that summary questions refer to questions that do not contain specific content, such as "What is the main content?", "What are the research highlights?", "What is the key technology?" and other questions; specific questions refer to questions that explicitly contain specific content, such as "How does multi-head attention improve the capabilities of the transformer?", "What are the key steps in the lithium battery charge and discharge experiment?", "In the ablation experiment, how much loss is there after removing the regularization term?" and other questions.

[0061] To solve the above problems, the present application provides a paper question and answer method and system based on a large language model.

[0062] Figure 1 A flowchart of a thesis question answering method based on a large language model provided by an embodiment of the present application.

[0063] As shown in the figure, the thesis question answering method based on a large language model includes the following steps: Figure 1

[0064] Step 101, based on the constituent content of the target thesis, performing thesis structure extraction on the target thesis to obtain a tree structure corresponding to the target thesis.

[0065] In an embodiment of the present application, the target thesis can refer to a thesis file uploaded by a user, or a thesis file browsed online by a user using a publisher's reading platform, or a thesis file returned by a search. For example, the target thesis can refer to an academic thesis in the field of coal.

[0066] In an embodiment of the present application, the constituent content of the target thesis can include the title, author, abstract, main text, and references of the thesis.

[0067] In an embodiment of the present application, the element content corresponding to each element can be obtained in the target thesis according to the title, author, abstract, main text, and references, and the element content can be spliced into a tree structure according to the article structure. Among them, the above elements correspond to chapter contents, for example, the abstract corresponds to the abstract chapter content, the main text corresponds to the main text chapter content, and the references correspond to the references chapter content.

[0068] Step 102, for any target node in the tree structure, based on the information of the nodes included in the path from the root node of the tree structure to the target node, determining the chapter description information corresponding to the target node.

[0069] In an embodiment of the present application, the target node can refer to any node in the tree structure; the chapter description information corresponding to the target node can include the chapter description information corresponding to the nodes included in the path from the root node of the tree structure to the target node.

[0070] As an example, the chapter description information can include the chapter keywords of the chapter content corresponding to the node.

[0071] As an example, in addition to the chapter keywords, the chapter description information can also include the importance of the corresponding chapter content, which can be used to indicate whether the chapter content is the core content of the target thesis. For example, the importance of the chapter content can be indicated by the importance score of the chapter content.

[0072] Step 103, in response to receiving a question about the target thesis, using a large model to obtain target content in the target thesis that matches the question based on the chapter description information corresponding to the nodes in the tree structure.​

[0073] In the embodiments of the present application, the question can be input into the large model to obtain the target content recalled by the large model.

[0074] Step 104, answering the question based on the target content.

[0075] In the embodiments of the present application, the large model can be used to generate the answer to the question based on the target content.

[0076] It should be noted that the large model used to generate the answer and the large model used to obtain the target content can be the same large model or different large models.

[0077] In the embodiments, based on the composition content of the target paper, the paper structure of the target paper is extracted to obtain a tree structure corresponding to the target paper; for any target node in the tree structure, based on the information of the nodes included in the path from the root node of the tree structure to the target node, the chapter description information corresponding to the target node is determined; in response to receiving a question about the target paper, a large model is used to obtain target content in the target paper that matches the question based on the chapter description information corresponding to the nodes in the tree structure; and the question is answered based on the target content. The path from the root node to the target node can string together the chapter logical context, enabling the large model to accurately grasp the contextual semantic association of the target node, thereby more accurately and efficiently positioning the target content, avoiding information isolation and misjudgment, and making the answer more consistent with the original meaning and logical system of the paper, thereby improving the accuracy of the question and answer.

[0078] The embodiments provide another paper question and answer method based on a large language model, Figure 2 A flowchart of a paper question and answer method based on a large language model is provided in the embodiments of the present application.

[0079] As shown in the flowchart, the paper question and answer method based on a large language model can include the following steps: Figure 2

[0080] Step 201, based on the composition content of the target paper, the paper structure of the target paper is extracted to obtain a tree structure corresponding to the target paper.

[0081] Step 202, for any target node in the tree structure, based on the information of the nodes included in the path from the root node of the tree structure to the target node, the chapter description information corresponding to the target node is determined.

[0082] In some embodiments, the composition content of the target paper includes the title and author of the paper.

[0083] ​In response to the target node being a root node corresponding to the paper name, the paper name and / or keywords extracted based on the paper name are taken as chapter description information corresponding to the root node; and / or, for a node in the tree structure corresponding to an author, the chapter description information corresponding to the root node and the author name are taken as corresponding chapter description information.

[0084] In some embodiments, the constituent content of the target paper further includes an abstract, a hierarchical title, and references.

[0085] In response to the target node being a node corresponding to the abstract, the hierarchical title, or the references, a hierarchical title included in a path from a root node of the tree structure to the target node is obtained, and a chapter keyword of chapter content corresponding to the target node is obtained; based on the hierarchical title included in the path and the chapter keyword, chapter description information corresponding to the target node is generated.

[0086] Optionally, the chapter keyword of the chapter content corresponding to the target node can be obtained by a graph ranking algorithm (TextRank) or a Term Frequency-Inverse Document Frequency (TF-IDF) algorithm.

[0087] Optionally, the hierarchical titles included in the path can be spliced to obtain a hierarchical title text; the hierarchical title text + the chapter keyword is taken to obtain corresponding chapter description information. The chapter description information can also be referred to as chapter description language.

[0088] Based on the hierarchical title included in the path and the chapter keyword, the chapter description information corresponding to the target node is generated, which helps the large model to understand the core content and key detail information of the chapter, so that correct and reasonable relevant chapter selection can be made for the question (including general questions and specific questions).

[0089] In step 203, in response to receiving a question for a target paper, the question and chapter description information corresponding to the nodes in the tree structure are input into a first large model for inference analysis to obtain recall content output by the first large model.

[0090] In the embodiments of the present application, the first large model can analyze, compare, and judge the chapter description information corresponding to each node according to the question, so as to select chapter content matching the question as the recall content.

[0091] In the embodiments of the present application, the first large model can output the chapter number of the recall content.

[0092] The number of recalled chapter content can be preset, for example, the number of recalled chapter content can be 3 or 4.

[0093] Step 204, judging whether the recalled content can answer the question.

[0094] In the embodiments of the present application, the question and the recalled content are input into the second large model for inference analysis to obtain the indication information output by the second large model; wherein the indication information is used to indicate whether the recalled content can answer the question, and the model parameters of the second large model are less than those of the first large model.

[0095] The second large model is used to evaluate the support degree of the recalled content, that is, to evaluate whether the recalled content can answer the question.

[0096] Optionally, the output indication information of the second large model can be "support" or "not support", or the output indication information can be "yes" or "no".

[0097] As an example, the model parameter amount of the first large model can be 30B (Billion, ten billion) level, and the model parameter amount of the second large model can be 10B level.

[0098] Step 205, in the case that the recalled content can answer the question, the recalled content is taken as the target content.

[0099] If the recalled content can answer the question, the answer to the question can be directly generated based on the recalled content.

[0100] Step 206, in the case that the recalled content cannot answer the question, the question keywords in the question are extracted, and the semantic vector corresponding to the question is obtained; the target content block including the question keywords is queried in the plurality of content blocks, and / or the target content block with a similarity greater than a set threshold is queried based on the similarity between the semantic vector corresponding to the question and the semantic vector corresponding to the content block; and the queried target content block is taken as the target content.

[0101] In the embodiments of the present application, in addition to the paper structure extraction of the target paper, the constituent content of the target paper can be divided into a plurality of content blocks (such as division according to paragraphs), and the corresponding semantic vector of each content block is generated and stored in the vector library.

[0102] As an example, the keyword extraction algorithm can be used to extract the keywords of the question to obtain the question keywords.

[0103] In the embodiments of the present application, if the recalled content cannot answer the question, the question is more likely to be a specific question. In this case, in order to improve the accuracy of the answer, RAG semantic + keyword hybrid retrieval can be used for specific content matching to recall the relevant chapter content containing correct detailed content.

[0104] Step 207, based on the target content, answer the question.

[0105] The relevant content in step 207 can refer to the relevant description in step 104, which will not be repeated here.

[0106] In this embodiment, in response to receiving a question about the target paper, the question and the chapter description information corresponding to the node in the tree structure are input into the first large model for inference analysis to obtain the recall content output by the first large model; it is judged whether the recall content can answer the question; in the case that the recall content can answer the question, the recall content is taken as the target content; in the case that the recall content cannot answer the question, the question keywords in the question are extracted, and the semantic vector corresponding to the question is obtained; the target content block including the question keywords is queried in the plurality of content blocks, and / or the target content block with a similarity greater than a set threshold is queried based on the similarity between the semantic vector corresponding to the question and the semantic vector corresponding to the content block; the queried target content block is taken as the target content. Using the description method of hierarchical title + chapter keywords greatly compresses the text length of the description of the chapter content, that is, the context length of the input large model is compressed, the response speed of the large model is improved, and through the prompt of the hierarchical title and the chapter keyword, the large model can understand the core content and key detail information of each chapter, so that the correct and reasonable related chapter selection can be made for the summary question and the partial specific question. In addition, in the case that the recall content cannot answer the question, RAG hybrid retrieval is used as a bottom line, so as to recall the target content containing correct detail content, and the robustness of the recall effect is guaranteed.

[0107] The embodiment provides another paper question answering method based on a large language model, Figure 3 A flowchart of a paper question answering method based on a large language model provided by the embodiment of the present application.

[0108] As Figure 3 shown, the paper question answering method based on a large language model can include the following steps:

[0109] Step 301, based on the composition content of the target paper, performing paper structure extraction on the target paper to obtain a tree structure corresponding to the target paper.

[0110] Step 302, for any target node in the tree structure, based on the information of the nodes included in the path from the root node of the tree structure to the target node, determining the chapter description information corresponding to the target node.

[0111] Step 303, in response to receiving a question about the target paper, detecting whether the first language type corresponding to the question and the second language type corresponding to the target paper are the same.

[0112] The first language type and the second language type can be any one of Chinese, English, Korean, Japanese, and the like.

[0113] In the embodiment of the application, it can be detected whether the first language type of the problem corresponding to the third large model and the second language type of the target paper are the same.

[0114] In step 304, if the first language type and the second language type are different, the problem is converted based on the second language type.

[0115] In the embodiment of the application, the third large model can be used to convert the language of the problem to the language type of the target paper.

[0116] In step 305, based on the chapter description information corresponding to the node in the tree structure, the target content in the target paper that matches the problem after language conversion is obtained.

[0117] The problem after language conversion and the chapter description information corresponding to the node in the tree structure can be input into the first large model for inference analysis to obtain the recall content output by the first large model. It is determined whether the recall content can answer the problem. In the case that the recall content can answer the problem, the recall content is taken as the target content. In the case that the recall content cannot answer the problem, the problem keywords in the problem after language conversion are extracted, and the semantic vector corresponding to the problem after language conversion is obtained. The target content block including the problem keywords is queried in the plurality of content blocks, and / or the target content block with a similarity greater than a set threshold is queried based on the similarity between the semantic vector corresponding to the problem after language conversion and the semantic vector corresponding to the content block. The target content block queried is taken as the target content.

[0118] In step 306, if the first language type and the second language type are different, the answer in the first language type is generated based on the target content.

[0119] In the embodiment of the application, the fourth large model can be used to generate the answer in the first language type. The fourth large model needs to think and reason based on the target content, and therefore, the model parameters of the third large model are less than those of the fourth large model.

[0120] As an example, the model parameter amount of the third large model can be 10B level, and the model parameter amount of the second large model can be 30B level.

[0121] The related content in step 301 can refer to the related description in step 101, which will not be repeated here.

[0122] In this embodiment, in response to receiving a question for a target paper, it is detected whether a first language type corresponding to the question and a second language type corresponding to the target paper are the same. In a case where the first language type and the second language type are different, the question is subjected to language conversion based on the second language type. Target content in the target paper that matches the question subjected to language conversion is obtained based on chapter description information corresponding to nodes in a tree structure. In the case where the first language type and the second language type are different, an answer in the first language type is generated based on the target content. In the case where the first language type and the second language type are different, the language conversion can ensure the accuracy of question understanding, and finally an answer consistent with the language type of the question is generated, which can enhance user experience and question and answer effect.

[0123] The embodiment provides another paper question and answer method based on a large language model. Figure 4 FIG. 1 is a flowchart of a paper question and answer method based on a large language model provided by an embodiment of the present application.

[0124] The present application improves the accuracy and comprehensiveness of answers to questions by designing effective content recall strategies and execution processes. By integrating multiple complementary query-related content recall methods, the answer effect of both generalization questions and specific questions is well balanced. By optimizing the settings of each module, the accuracy and response delay of the answers are balanced.

[0125] As shown in FIG. 1, the method specifically includes: Figure 4

[0126] (1) Paper document analysis: identifying paper name, author, abstract, hierarchical marker, chapter, paragraph, reference, and other elements in the target paper, and storing the corresponding text;

[0127] (2) Structure extraction: concatenating each element into a tree structure according to the article structure to obtain a tree structure corresponding to the target paper;

[0128] (3) Document segmentation and storage in vector library: segmenting the document content by blocks (such as by paragraphs), generating semantic vectors, and storing them in the vector library;

[0129] (4) Chapter keyword generation: generating top 10 keywords according to chapter content, which can be generated using TextRank or TF-IDF algorithms.

[0130] (5) Chapter description information (chapter description) concatenation: chapter description is the basis for LLM to select relevant chapters for recall according to query, which is composed of hierarchical title + chapter keywords. For any node: according to the tree structure, concatenate all hierarchical node titles from the top (root node) to the current node to generate hierarchical title text, and append the chapter keywords to obtain the chapter description of the node.​

[0131] (6) Query language recognition and conversion: automatically recognize the language type of the query and whether the language type of the target paper is consistent; if not, perform language conversion on the query. This step can be implemented using a model with a small number of parameters (the third largest model).

[0132] (7) LLM-driven relevant section recall: using LLM (the first largest model) to analyze and compare the spliced language of each section according to the query, and select the section that can support answering the query as the recall content. The number of recalled sections can be set to 3 or 4.

[0133] (8) Support evaluation of recall content: using a model with a small number of parameters (the second largest model) to judge whether the recall content can answer the query, outputting "support" or "not support".

[0134] (9) RAG-based hybrid retrieval recall: if the support evaluation is "not support", use RAG hybrid retrieval (dense + sparse retrieval) technology, that is, based on query semantics and keywords to perform matching retrieval of paper content, and recall relevant document fragments (target content blocks).

[0135] (10) LLM answer: LLM (the fourth largest model) answers the query according to the recalled content, matches the language type of the query, and answers the query.

[0136] The present application has the following beneficial effects:

[0137] (1) The present application uses a hierarchical title + chapter keyword description method, which greatly compresses the text length of the chapter content description, that is, the context length of the input LLM, improving the response speed of the LLM. At the same time, through the prompt of hierarchical title and chapter keyword, the LLM can understand the core content and key detail information of the corresponding chapter, so as to make correct and reasonable relevant section selection for summary questions and partial specific questions.

[0138] (2) The present application uses RAG hybrid retrieval as a backup, which is complementary to (1) and ensures the robustness of the recall effect. If the recall content of the question is insufficient, it means that the query is more inclined to be a specific detail question, and RAG semantic + keyword hybrid retrieval can be used for specific content matching to recall relevant section information containing correct detail content.

[0139] (3) The architecture and process of the present application are simple, and the LLM configuration is optimized, shortening the overall execution time. Specifically, the present application includes the following LLM execution processes:

[0140] ① The first time in flow (6), the LLM recommends 10B or so, the parameter quantity is small, and at the same time, the LLM responds quickly due to the short query content;

[0141] ② The second time in flow (7), the LLM recommends 30B or more, and due to the use of hierarchical title + keyword description method, and the output can be chapter number, the context content is not long, and the LLM responds quickly;

[0142] ③ The third time in flow (8), the LLM recommends 10B or so, the parameter quantity is small, and at the same time, the output is "yes" or "no", and the LLM responds quickly;

[0143] ④ The fourth time in flow (10), since the question needs to be answered according to the recall information, the LLM recommends 30B or more.

[0144] In order to realize the above-mentioned embodiments, an article question answering system based on a large language model is further provided by the embodiments of the present application.

[0145] Figure 5 A structural schematic diagram of an article question answering system based on a large language model provided by the embodiments of the present application.

[0146] As shown in Figure 5 , the article question answering system 500 based on the large language model includes:

[0147] An extraction module 510 is configured to perform article structure extraction on a target article based on component content of the target article, to obtain a tree structure corresponding to the target article;

[0148] A determination module 520 is configured to determine chapter description information corresponding to any target node in the tree structure based on information of nodes included in a path from a root node of the tree structure to the target node;

[0149] A first acquisition module 530 is configured to acquire target content in the target article that matches a question based on chapter description information corresponding to nodes in the tree structure by using a large model in response to receiving the question for the target article;

[0150] An answering module 540 is configured to answer the question based on the target content.

[0151] Optionally, the component content of the target article includes an abstract, hierarchical titles, and references, and the determination module 520 is specifically configured to:

[0152] In response to the target node being a node corresponding to the abstract, the hierarchical titles, or the references, acquire hierarchical titles included in a path from a root node of the tree structure to the target node, and acquire chapter keywords of chapter content corresponding to the target node;

[0153] The chapter description information corresponding to the target node is generated based on the hierarchical titles and the chapter keywords included in the path.

[0154] Optionally, the composed content of the target paper further includes a paper name and an author, and the determining module 520 is specifically configured to:

[0155] in response to the target node being a root node corresponding to the paper name, taking the paper name and / or a keyword extracted based on the paper name as the chapter description information corresponding to the root node; and / or, in response to the target node being a node corresponding to the author, taking the chapter description information corresponding to the root node and the author name as the corresponding chapter description information.

[0156] Optionally, the first obtaining module 530 is specifically configured to:

[0157] input the question and the chapter description information corresponding to the node in the tree structure into the first large model for inference analysis to obtain recall content output by the first large model;

[0158] determine whether the recall content can answer the question;

[0159] in a case where the recall content can answer the question, take the recall content as the target content.

[0160] Optionally, the first obtaining module 530 is specifically configured to:

[0161] input the question and the recall content into the second large model for inference analysis to obtain indication information output by the second large model;

[0162] The indication information is used to indicate whether the recall content can answer the question, and the model parameters of the second large model are less than those of the first large model.

[0163] Optionally, the composed content of the target paper is divided into a plurality of content blocks, and the content blocks correspond to semantic vectors, and the system further includes:

[0164] The second obtaining module is configured to, in a case where the recall content cannot answer the question, extract a question keyword in the question, and obtain a semantic vector corresponding to the question;

[0165] The querying module is configured to query a target content block including the question keyword in the plurality of content blocks, and / or query a target content block having a similarity greater than a set threshold based on a similarity between the semantic vector corresponding to the question and the semantic vectors corresponding to the content blocks;

[0166] The processing module is configured to take the queried target content block as the target content.

[0167] Optionally, the first obtaining module 530 is specifically configured to:

[0168] determine whether the first language type corresponding to the detection question and the second language type corresponding to the target paper are same;

[0169] In a case where the first language type and the second language type are not same, language conversion is performed on the question based on the second language type;

[0170] Based on the chapter description information corresponding to the nodes in the tree structure, target content in the target paper that matches the question after language conversion is obtained.

[0171] Optionally, the answering module 540 is specifically configured to:

[0172] In a case where the first language type and the second language type are not same, a first language type answer is generated based on the target content.

[0173] Optionally, a third large model is used to perform language conversion on the question, and / or a fourth large model is used to generate the first language type answer; wherein the model parameters of the third large model are less than those of the fourth large model.

[0174] It should be noted that the foregoing explanation and description of the paper question answering method based on a large language model also applies to the paper question answering system based on a large language model of this embodiment, which will not be described here.

[0175] In this embodiment, based on the constituent content of the target paper, paper structure extraction is performed on the target paper to obtain a tree structure corresponding to the target paper; for any target node in the tree structure, based on the information of the nodes included in the path from the root node of the tree structure to the target node, chapter description information corresponding to the target node is determined; in response to receiving a question for the target paper, a large model is used to obtain target content in the target paper that matches the question based on the chapter description information corresponding to the nodes in the tree structure; and an answer is given to the question based on the target content. The path from the root node to the target node can link the chapter logic context, enabling the large model to accurately grasp the context semantic association of the target node, so as to more accurately and efficiently locate the target content, avoid information isolation and misjudgment, make the answer more consistent with the original meaning and logic system of the paper, and thus improve the accuracy of the question and answer.

Claims

1. A thesis question answering method based on a large language model, characterized in that, The method comprises the following steps: Based on the composition of the target paper, the paper structure of the target paper is extracted to obtain the tree structure corresponding to the target paper; For any target node in the tree structure, based on the information of the nodes included in the path from the root node of the tree structure to the target node, the chapter description information corresponding to the target node is determined; In response to receiving a question about the target paper, a large model is used to obtain target content in the target paper that matches the question based on the chapter description information corresponding to the nodes in the tree structure, including: inputting the question and the chapter description information corresponding to the nodes in the tree structure into a first large model for inference analysis to obtain recall content output by the first large model; determining whether the recall content can answer the question, including: inputting the question and the recall content into a second large model for inference analysis to obtain indication information output by the second large model, wherein the indication information indicates whether the recall content can answer the question, the model parameters of the second large model are less than those of the first large model, and the second large model is used to evaluate the support of the recall content, that is, to evaluate whether the recall content can answer the question, the output indication information of the second large model includes support or does not support, or the output indication information is yes or no; in the case that the recall content can answer the question, the recall content is taken as the target content; Based on the target content, the question is answered; The composition of the target paper includes abstract, hierarchical title, and reference, and the determination of the chapter description information corresponding to the target node based on the information of the nodes included in the path from the root node of the tree structure to the target node comprises: In response to the target node being a node corresponding to the abstract, hierarchical title or reference, the hierarchical title included in the path from the root node of the tree structure to the target node is obtained, and the chapter keyword of the chapter content corresponding to the target node is obtained; Based on the hierarchical title included in the path and the chapter keyword, the chapter description information corresponding to the target node is generated; The composition of the target paper also includes the paper name and the author, and the determination of the chapter description information corresponding to the target node based on the information of the nodes included in the path from the root node of the tree structure to the target node comprises: In response to the target node being a root node corresponding to the paper name, the paper name and / or the keyword extracted based on the paper name are taken as the chapter description information corresponding to the root node; And / or, In response to the target node being a node corresponding to the author, the chapter description information corresponding to the root node and the author name are taken as the corresponding chapter description information.

2. The method of claim 1, wherein, The composition of the target paper is divided into multiple content blocks, and the content blocks correspond to semantic vectors, and the method further comprises: In the case that the recall content cannot answer the question, the question keyword in the question is extracted, and the semantic vector corresponding to the question is obtained; querying a target content block including the question keyword from the plurality of content blocks, and / or querying a target content block with a similarity greater than a set threshold based on a similarity between the semantic vector corresponding to the question and the semantic vector corresponding to the content block; taking the queried target content block as the target content.

3. The method of claim 1, wherein, The target content in the target paper that matches the question is obtained based on the chapter description information corresponding to the nodes in the tree structure in response to receiving the question for the target paper, including: detecting whether the first language type corresponding to the question and the second language type corresponding to the target paper are the same; in the case where the first language type and the second language type are not the same, performing language conversion on the question based on the second language type; obtaining target content in the target paper that matches the question after language conversion based on the chapter description information corresponding to the nodes in the tree structure.

4. The method of claim 3, wherein, The question is answered based on the target content, including: in the case where the first language type and the second language type are not the same, generating an answer in the first language type based on the target content.

5. The method of claim 4, wherein, language conversion on the question is performed using a third large model, and / or an answer in the first language type is generated using a fourth large model; wherein the model parameters of the third large model are less than those of the fourth large model.

6. A thesis question answering system based on a large language model, characterized in that, including: an extraction module configured to perform paper structure extraction on a target paper based on the constituent content of the target paper to obtain a tree structure corresponding to the target paper; a determination module configured to determine chapter description information corresponding to any target node in the tree structure based on information of nodes included in a path from a root node of the tree structure to the target node; a first obtaining module configured to obtain target content in the target paper that matches the question based on the chapter description information corresponding to the nodes in the tree structure using a large model in response to receiving the question for the target paper, including: inputting the question and the chapter description information corresponding to the nodes in the tree structure into a first large model for inference analysis to obtain recall content output by the first large model; determining whether the recall content can be used to answer the question, including: inputting the question and the recall content into a second large model for inference analysis to obtain indication information output by the second large model, wherein the indication information is used to indicate whether the recall content can be used to answer the question, the model parameters of the second large model are less than those of the first large model, the second large model is used to evaluate the support of the recall content, that is, to evaluate whether the recall content can be used to answer the question, the indication information output by the second large model includes support or does not support, or the indication information output is yes or no; and in the case where the recall content can be used to answer the question, taking the recall content as the target content; an answering module configured to answer the question based on the target content. The composition of the target paper includes an abstract, a hierarchical title, and a reference. The chapter description information corresponding to the target node is determined based on information of nodes included in a path from a root node of the tree structure to the target node, including: In response to the target node being a node corresponding to the abstract, the hierarchical title, or the reference, the hierarchical title included in the path from the root node of the tree structure to the target node is obtained, and the chapter keyword of the chapter content corresponding to the target node is obtained; Based on the hierarchical title included in the path and the chapter keyword, the chapter description information corresponding to the target node is generated; The composition of the target paper also includes a paper name and an author. The chapter description information corresponding to the target node is determined based on information of nodes included in a path from a root node of the tree structure to the target node, including: In response to the target node being a root node corresponding to the paper name, the paper name and / or a keyword extracted based on the paper name are taken as the chapter description information corresponding to the root node; and / or, In response to the target node being a node corresponding to the author, the chapter description information corresponding to the root node and the author name are taken as the corresponding chapter description information.

Citation Information

Patent Citations

  • Method and system of data retrieval

    CN101685455A

  • User question and knowledge point matching method and device

    CN109857846A

  • Data question-answering method, data question-answering model training method, device and equipment

    CN118657222A

  • Knowledge text retrieval method and device, storage medium and computer equipment

    CN119807328A