Large model chart question and answer correction method and device based on retrieval tree and electronic equipment

By using a retrieval tree-based graph question-and-answer correction method, a retrieval tree is constructed in real time and errors are identified and corrected, which solves the problem of low accuracy of answers in graph question-and-answer and achieves efficient and accurate graph question-and-answer response.

CN121145847APending Publication Date: 2025-12-16CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510588249.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing technologies suffer from knowledge illusion and numerical calculation illusion problems in chart-based question answering, resulting in low accuracy of answers. Existing error correction methods lack real-time and targeted approaches, making it difficult to effectively correct errors in chart-based question answering.

Method used

A large-scale graph question-answering correction method based on retrieval tree is adopted. The retrieval tree is constructed by acquiring graph data in real time. The retrieval tree is used to locate and verify information, identify errors and output candidate correction results, and re-request the language model to continue writing, so as to obtain accurate graph question-answering response results.

Benefits of technology

It significantly improves the accuracy and efficiency of chart-based question answering, and can identify and correct errors in chart-based question answering in real time, thereby improving the accuracy and fluency of the model's answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145847A_ABST
    Figure CN121145847A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, and provides a retrieval tree-based large model chart question and answer correction method and device and electronic equipment, and the method comprises the following steps: obtaining a real-time retrieval text and a chart question and answer response result generated by a language model; constructing a retrieval tree including entity information to be detected according to the real-time retrieval text; respectively introducing auxiliary information into each sub-entity and the corresponding leaf node of the retrieval tree to realize information positioning and verification of the retrieval tree on the chart question and answer response result; carrying out error identification and positioning on the chart question-answer response result by utilizing the retrieval tree, and when error information is detected, outputting candidate information and rewriting to obtain a candidate correction result; and re-requesting the language model for continuous writing based on the candidate correction result, and finally obtaining a target chart question and answer response result. According to the method, the accuracy of text error correction can be improved, and the accuracy of the model in chart answering is remarkably improved on the basis of increasing certain correction complexity.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language processing, and in particular to a large model chart question and answer correction method and device based on a retrieval tree and an electronic device. BACKGROUND

[0002] Chart question and answer refers to the process in which a user asks questions about various charts, and the system understands and gives accurate answers based on the data information in the charts. Chart question and answer not only helps to visualize data, but also improves the scientificity and efficiency of decision-making.

[0003] With the rapid development of large language models, artificial intelligence and other technologies, how to improve the understanding and accuracy of chart question and answer is an important research direction. Currently, the existing technology inevitably has knowledge illusion and numerical calculation illusion problems when answering key questions about charts. For example, large models often have large calculation errors and numerical calculation errors when generating answers, which seriously affects the accuracy of the answers, so it is necessary to correct the text answers.

[0004] However, there is still room for improvement in accuracy and efficiency in current text answer correction. For example, some text answer correction methods use confusion sets, N-gram models and long short-term memory (LSTM) and other technologies to generate candidate data for replacement and determine its rationality by probability, and finally select the candidate sentence with the highest score to complete the correction. However, these methods have significant limitations. For example, confusion sets need to be pre-constructed and cannot be generated in real time for specific problems, lacking real-time and targetedness, which leads to low accuracy of correction. SUMMARY

[0005] The present application provides a large model chart question and answer correction method, device and electronic device based on a retrieval tree to improve the accuracy of text correction and significantly improve the accuracy of the model in chart answering on the basis of increasing the correction complexity.

[0006] The present application provides a large model chart question and answer correction method based on a retrieval tree, comprising: obtaining real-time retrieval text and chart question and answer response results generated by a language model; constructing a retrieval tree including entity information to be detected according to the real-time retrieval text; wherein auxiliary information is introduced into each sub-entity and the corresponding leaf node of the retrieval tree to realize information positioning and verification of the retrieval tree on the chart question and answer response results; using the retrieval tree to identify and locate errors in the chart question and answer response results, output candidate information and rewrite when detecting error information, and obtain candidate correction results; requesting the language model to continue writing based on the candidate correction results, and finally obtaining target chart question and answer response results.

[0007] According to the large model chart question and answer correction method based on the retrieval tree provided by the application, real-time retrieval text is obtained, including: obtaining the tuple information including the row name, column name and numerical value in the chart as entity information in real time, and connecting the entity information through connecting words to form real-time retrieval text; wherein the chart question and answer response result is the response text returned by the language model based on the data in the chart after analysis and thinking.

[0008] According to the large model chart question and answer correction method based on the retrieval tree provided by the application, the language model is requested to continue writing based on the candidate correction result, and the target chart question and answer response result is finally obtained, including: taking the candidate correction result as an input condition, requesting the language model to continue writing the text, and obtaining a continuation result; the continuation result is re-identified and positioned by using the retrieval tree; when no error information is detected or all error information has been eliminated or the termination condition is reached, the current continuation result is output as the target chart question and answer response result.

[0009] According to the large model chart question and answer correction method based on the retrieval tree provided by the application, a multi-level correction model is used in the process of error identification and positioning; the multi-level correction model only processes the first candidate correction result each time, and inputs the optimal subtext obtained based on the first candidate correction result as additional information into the next error identification and positioning for correction until no new candidate correction result is generated; wherein the first candidate correction result is obtained according to the first detected error information in each correction.

[0010] According to the large model chart question and answer correction method based on the retrieval tree provided by the application, the error identification and positioning of the chart question and answer response result are performed by using the retrieval tree, including: searching and positioning the chart question and answer response result by using the retrieval tree to obtain a first identification result, analyzing the first identification result, and determining whether there is error information.

[0011] According to the large model chart question and answer correction method based on the retrieval tree provided by the application, the auxiliary information includes at least one of entity category, entity length information, starting position information and numerical value information.

[0012] The application further provides a large model chart question and answer correction device based on a search tree, comprising: an acquisition module, configured to acquire real-time search text and a chart question and answer response result generated by a language model; a construction module, configured to construct a search tree comprising entity information to be detected according to the real-time search text; wherein auxiliary information is introduced into each sub-entity and the corresponding leaf node of the search tree respectively to realize information positioning and verification of the search tree on the chart question and answer response result; an identification module, configured to perform error identification positioning on the chart question and answer response result by using the search tree, output candidate information and rewrite when detecting error information, and obtain a candidate correction result; and a continuation module, configured to request the language model to continue writing based on the candidate correction result, and finally obtain a target chart question and answer response result.

[0013] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements any of the above large model chart question and answer correction methods based on a search tree when executing the program.

[0014] The application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program is executable on a processor to implement any of the above large model chart question and answer correction methods based on a search tree.

[0015] The application further provides a computer program product comprising a computer program, and the computer program is executable on a processor to implement any of the above large model chart question and answer correction methods based on a search tree.

[0016] The application provides a large model chart question and answer correction method, device and electronic device based on a search tree, the large model chart question and answer correction method based on a search tree comprising: acquiring real-time search text and a chart question and answer response result generated by a language model; constructing a search tree comprising entity information to be detected according to the real-time search text; wherein auxiliary information is introduced into each sub-entity and the corresponding leaf node of the search tree respectively to realize information positioning and verification of the search tree on the chart question and answer response result; performing error identification positioning on the chart question and answer response result by using the search tree, outputting candidate information and rewriting when detecting error information, and obtaining a candidate correction result; and requesting the language model to continue writing based on the candidate correction result, and finally obtaining a target chart question and answer response result. In the above manner, the application performs real-time analysis on the chart question and answer response result by using the search tree constructed in real time, corrects and continues writing in time if error information is identified, can improve the accuracy of text correction, significantly improves the accuracy of the model in chart answering on the basis of increasing a certain correction complexity, and further improves the correction efficiency by introducing auxiliary information into each sub-entity and the corresponding leaf node of the search tree respectively to quickly position the entity text. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0018] Figure 1 is one of the flowcharts of the large model chart question and answer correction method based on the retrieval tree provided by the embodiments of the present application.

[0019] Figure 2 is the second flowchart of the large model chart question and answer correction method based on the retrieval tree provided by the embodiments of the present application.

[0020] Figure 3 is the flowchart of the automatic generation of retrieval information provided by the embodiments of the present application.

[0021] Figure 4 is the structure diagram of the retrieval tree provided by the embodiments of the present application.

[0022] Figure 5 is the structure diagram of the large model chart question and answer correction device based on the retrieval tree provided by the embodiments of the present application.

[0023] Figure 6 is the physical structure diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0024] In order to make the objects, technical solutions and advantages of the present application clearer, the following will combine the drawings in the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0025] It should be noted that all actions of obtaining signals, information or data in the present application are performed under the premise of complying with the corresponding data protection regulations and policies of the country where the device is located, and with the authorization given by the corresponding device owner.

[0026] The present application provides a large model chart question and answer correction method based on a retrieval tree, which can solve the numerical display and calculation illusion problem existing in the current large model response result in the chart question and answer field, can significantly improve the answer accuracy of the related product chart question and answer, and improve the user experience of the product.

[0027] Please refer to Figure 1 , Figure 1is one of the flowcharts of the large model chart question and answer correction method based on a retrieval tree provided by the embodiments of the present application. In this embodiment, the large model chart question and answer correction method based on a retrieval tree can include steps S110 to S140, and each step is as follows: S110: Obtain real-time retrieval text and a chart question and answer response result generated by a language model.

[0028] S120: Construct a retrieval tree including entity information to be detected according to the real-time retrieval text; wherein auxiliary information is introduced into each sub-entity and the corresponding leaf node of the retrieval tree to realize information positioning and verification of the retrieval tree on the chart question and answer response result.

[0029] S130: Use the retrieval tree to identify and locate errors in the chart question and answer response result, output candidate information and rewrite when detecting error information, and obtain a candidate correction result.

[0030] S140: Re-request the language model to continue writing based on the candidate correction result, and finally obtain a target chart question and answer response result.

[0031] The language model can receive the user's question text and analyze and think about the data of the chart based on the question text, thereby obtaining a chart question and answer response result. After receiving the user's question about the chart, the language model will analyze and think deeply about the data in the chart. It interprets, reasons and induces the data based on the knowledge and patterns learned by itself, thereby generating a response text that can answer the user's question. This process involves understanding data, judging trends, analyzing relationships, and other aspects.

[0032] Illustratively, the chart question and answer problem raised by the user is input into the pre-trained language model, and the language model will generate a preliminary chart question and answer response result based on the knowledge and patterns learned by itself. However, due to the limitations of the language model, the generated chart question and answer response result may have problems such as outdated information, inaccurate data, or logical errors. Therefore, it is necessary to identify and correct errors in the chart question and answer response result through the retrieval tree.

[0033] In this embodiment, the retrieval tree is constructed by real-time retrieval text, and the retrieval tree includes entity information to be detected, wherein the entity information to be detected is obtained from the data of the chart. Further, in order to realize fast positioning and verification of information, auxiliary information is also introduced into each sub-entity and the corresponding leaf node of the retrieval tree in this embodiment, so as to realize information positioning and verification of the retrieval tree on the chart question and answer response result.

[0034] Optionally, the auxiliary information can include at least one of entity category, entity length information, starting position information, and numerical information.

[0035] Compared with some solutions that adopt pre-set fixed retrieval text in advance, the embodiment adopts real-time retrieval text obtained through chart data, can accurately retrieve information according to the specific content presented by the chart, is more in line with the actual situation of the chart, reduces errors caused by information mismatch, and thus improves the accuracy of information.

[0036] A retrieval tree is a data structure commonly used for fast lookup and retrieval of information. It is similar to an inverted tree, with a root node branching out to multiple child nodes, each of which can further branch until reaching leaf nodes.

[0037] Each node contains an entity, which can be any object that needs to be retrieved, such as a word, a name, a code snippet, etc. At key nodes of the retrieval tree, the category of the sub-entity is marked. For example, if the retrieval tree is used for text processing, the categories may be "noun", "verb", "place name", etc. Category information can help quickly determine the nature of the entity, thereby optimizing the retrieval process.

[0038] Each sub-entity has a length, and length information can help quickly locate the entity in the text. For example, if an entity is "apple", its length is 2 characters. When retrieving, if the length is known, it can quickly skip parts that do not meet the length, improving efficiency.

[0039] The starting position information is the position information of the entity in the retrieval tree. It tells the retrieval system where to start looking for this entity. For example, in a text, "apple" may appear at the 5th character position, and this position information can help quickly locate it.

[0040] In addition, at the leaf nodes, in addition to containing the entity itself, it also contains numerical information related to the entity.

[0041] In this embodiment, the main role of the retrieval tree is to quickly retrieve and locate information. By storing additional information (such as category, length, position, etc.) at each node, the retrieval tree can quickly narrow the search range when identifying and locating errors in the chart question and answer response results, improving retrieval efficiency.

[0042] When no error information is detected in the chart question and answer response results through the retrieval tree, the current chart question and answer response results can be directly output as the target chart question and answer response results; when no error information is detected in the chart question and answer response results through the retrieval tree, candidate information needs to be output and rewritten, and after obtaining the candidate correction results, the language model is re-requested for continuation, until no error information is detected or all error information has been eliminated or the termination condition is reached, the correction process is terminated, and the corresponding response result is output to the user, without subsequent correction.

[0043] In the above manner, the embodiment of the present application provides a large model chart question and answer correction method based on a search tree. The search tree constructed in real time is used to analyze the chart question and answer response result in real time. If error information is identified, correction and continuation are performed in a timely manner. The accuracy of text correction can be improved. On the basis of increasing correction complexity, the accuracy of the model in chart answering is significantly improved. In addition, each sub-entity and the corresponding leaf node of the search tree also introduces auxiliary information. The entity text can be quickly positioned, and the correction efficiency is further improved.

[0044] In some embodiments, the step of obtaining real-time search text can specifically include: The tuple information including row names, column names and numerical values in the chart is obtained in real time as entity information, and the entity information is connected through conjunctions to form real-time search text. The chart question and answer response result is a response text returned by a language model based on analysis and thinking of data in the chart.

[0045] In this embodiment, key tuple information in the chart can be obtained in real time. These information covers row names, column names and numerical values. Row names usually represent different categories or objects, column names represent different attributes or indicators, and numerical values are corresponding data. Then, specific conjunctions can be used to string these entity information together to form logical real-time search text.

[0046] In this embodiment, the tuple information obtained in real time directly comes from the chart and is the most original and accurate data, avoiding errors caused by inaccurate information conversion or preset text. The real-time search text formed by conjunctions can clearly express the data relationship in the chart. When searching for information, it can be more accurately positioned to the information related to the question, reducing the interference of irrelevant information and greatly improving the accuracy of the search.

[0047] In some embodiments, the step of re-requesting the language model to continue writing based on the candidate correction result to finally obtain the target chart question and answer response result can specifically include: The candidate correction result is used as an input condition to re-request the language model to continue writing the text to obtain a continuation result. The search tree is used to re-identify and locate errors in the continuation result. When no error information is detected or all error information has been eliminated or a termination condition is reached, the current continuation result is output as the target chart question and answer response result.

[0048] In this embodiment, after error identification and correction of the chart question and answer response result, a candidate correction result is obtained. This candidate correction result is provided as a new input to the language model, which will continue to write text based on its own knowledge reserve and training mode based on the candidate correction result. This embodiment can give the language model a new starting point to continue to improve the answer to the chart question and answer, making the answer more detailed, comprehensive and logical.

[0049] After the language model continues to write, the re-examination of the continuation result can be performed using the previously constructed retrieval tree. The retrieval tree contains accurate entity information and auxiliary information extracted from real-time retrieval text. By matching and comparing the continuation result with the information in the retrieval tree, possible error information can be identified again, and the location and specific content of the error can be accurately located.

[0050] Further, this embodiment pre-sets a termination condition. When no error information is detected after re-examination, or all detected error information has been eliminated, or the pre-set termination condition is reached (such as the maximum number of iterations is reached), the current continuation result is output as the final target chart question and answer response result to the user.

[0051] Based on this, through multiple continuation and error identification and positioning processes, the answer is continuously corrected and improved, which can gradually improve the accuracy and completeness of the answer. Each continuation may supplement new information and optimize the logical structure, and error identification and positioning can timely discover and correct errors, so that the final output target chart question and answer response result is of higher quality and can better meet the needs of users. The continuation process of the language model is based on the candidate correction result, which helps to maintain the logicality and coherence of the answer. At the same time, after continuation, error identification and positioning is performed, and if logical incoherence or unreasonable expression is found, it can be adjusted in time, so that the entire answer forms a reasonable and smooth whole from beginning to end, which is convenient for users to understand.

[0052] In some embodiments, the chart question and answer correction method based on the retrieval tree further comprises: In the process of error identification and positioning, a multi-level correction model is used; the multi-level correction model only processes the first candidate correction result each time, and inputs the optimal subtext obtained based on the first candidate correction result as additional information into the next error identification and positioning for correction until no new candidate correction result is generated; wherein the first candidate correction result is obtained according to the first detected error information in each correction.

[0053] In this embodiment, it is further illustrated that the multi-level correction model can be used in the process of error identification positioning. Specifically, multiple error information may be found in the chart question and answer response result or the continuation result in the process of error identification positioning, and since the information is coherent, only the first detected error information needs to be used to generate the corresponding first candidate correction result in this embodiment. The multi-level correction model only focuses on processing this first candidate correction result each time, and performs in-depth analysis and correction on it.

[0054] In some embodiments, after processing the first candidate correction result, multiple subtexts may be generated, and the optimal subtext needs to be found from the multiple subtexts. This optimal subtext is the part that performs best in terms of accuracy, logic, etc. after correction. Then this optimal subtext is input as additional information into the next error identification positioning process. In this way, the subsequent correction process can be based on the previous correction results to gradually optimize the text.

[0055] The entire correction process will continue to circulate until no new candidate correction result is generated. This means that after multiple corrections, the errors in the text have been identified and corrected as much as possible, reaching a relatively stable and accurate state. Therefore, the multi-level correction model is used in this embodiment to perform multiple cycles of checking on the chart question and answer response result or the continuation result, and only the first detected error information is focused on and the corresponding correction result is generated in each correction, avoiding processing all possible error information at the same time and reducing unnecessary computational load. At the same time, the optimal subtext is passed as additional information to the next correction, so that the subsequent correction can be based on the existing results, improving the computational efficiency and saving the computational resources.

[0056] In some embodiments, the step of using the retrieval tree to perform error identification positioning on the chart question and answer response result can specifically include: Using the retrieval tree to perform retrieval positioning on the chart question and answer response result to obtain a first identification result, and analyzing the first identification result to determine whether there is error information.

[0057] In this embodiment, when the chart question and answer response result is obtained, it is compared and matched with the information in the retrieval tree. Using the structural characteristics of the retrieval tree, the part related to the response result can be quickly found in the tree, thereby obtaining the first identification result. This first identification result can be the preliminary output after matching the response result with the information in the retrieval tree, containing various information that may be related to the response result. Detailed analysis of the first identification result is mainly to check whether there is deviation between the response result and the accurate information in the retrieval tree. If some content in the response result does not match the information in the retrieval tree, or does not meet the requirements of logical relationship, data consistency, etc., it can be determined that there is error information.

[0058] The embodiment can strictly compare the chart question and answer response result with accurate entity information by searching and positioning and error judgment through the search tree, greatly improving the accuracy of judging whether the response result is wrong. It can effectively avoid errors and omissions caused by subjectivity and limitations of manual judgment, and ensure that the answer provided to the user is based on accurate data and logic. Compared with some related traversal search methods, the search tree can find related information in a shorter time, so as to quickly obtain the first recognition result and perform error judgment. This is particularly important for processing a large amount of chart data and frequent question and answer requests, and can significantly improve response efficiency.

[0059] In related technologies, there are two implementation schemes for chart question and answer: 1) identifying relevant text information from the chart, and performing relevant answers based on the text information through a language model; 2) based on a multi-modal large model, the chart structure information can be directly used to respond to related questions. However, when processing chart key problems, both schemes have knowledge and digital calculation illusion problems, such as large answer calculation errors, digital calculation errors, etc.

[0060] The related technologies for text answer correction mainly include: 1) based on confusion sets, N-gram models and LSTM models, etc. to realize replacement and correction of related candidate data, and probability judgment of candidate sentences before and after correction, and finally select the candidate sentence with the highest score to realize text correction. 2) a pure deep learning model text correction scheme, which realizes the judgment and selection of text before and after correction through text perplexity and other indicators.

[0061] The above two methods are mainly for homophone and homograph correction, and have low adaptation for correcting errors such as numerical display errors and calculation errors in chart question and answer response results. For example, the above correction methods cannot well handle problems such as missing decimal points in response text and large model response result errors caused by mathematical expression calculation errors, and have limitations as follows: 1) The effect of the above related scheme is not good for long text form generated by the large model answer. The above related scheme mainly targets short text, and the correction effect for longer text is generally poor, which needs to be processed and judged sentence by sentence.

[0062] 2) The confusion set needs to be constructed in advance and cannot be adapted and constructed in real time according to specific problems. The above related scheme generally uses a general confusion set text, and the same data set is used for different request cases, which does not have real-time and specificity.

[0063] 3) The correction of the above related scheme mainly corrects homophones and homographs, and does not support data correction of numbers and mathematical expression calculation results.

[0064] In contrast, the embodiment of the present application has obvious advantages: 1. Support long text error correction: related solutions mainly consider single sentence text error correction, and multi-sentence error correction is limited by sentence confusion degree and needs to be called multiple times. The embodiment of the present application can identify and correct multiple long texts at a time through the search tree, and the error correction recognition efficiency is higher.

[0065] 2. Real-time construction of search text: related solutions need to prepare confusion data set in advance, and lack specificity and real-time performance. The real-time search text of the embodiment of the present application can be constructed according to the specific data of the chart question and answer in real time, and supports dynamic updating. Based on the automatic construction method of the chart structure and the specific row and column name, the real-time search text can be automatically constructed for each question request, which improves the recognition accuracy and efficiency.

[0066] 3. Support for number and expression verification: related solutions mainly correct homophones and homonyms, and the error correction accuracy of numbers and mathematical expression calculation results is low. Based on the search tree constructed in real time, the embodiment of the present application can quickly identify and locate the errors of the chart question and answer response results, and perform model continuation writing based on the corrected results, which significantly improves the accuracy of chart question and answer.

[0067] The embodiment of the present application proposes a large model chart question and answer correction method based on a search tree, generates a specific search tree in real time, analyzes and locates the errors of the chart question and answer response results. If there is an error, the first error result is corrected, the corrected result is input to request model continuation writing again, and re-verification is performed until the data and text correction is completed. The embodiment can improve the accuracy of the language model in the chart answer field.

[0068] Please refer to Figure 2 , Figure 2 is a second flowchart of the large model chart question and answer correction method based on the search tree provided by the embodiment of the present application.

[0069] The multi-level large model question and answer generation method based on the search tree of the embodiment of the present application has good answer accuracy, especially for the digital problems and mathematical expression calculation abnormal problems in the chart question and answer. The following will be further described in the scheme of the embodiment of the present application in combination with the details of the module, and the large model is the language model mentioned above: 1) Real-time and efficient generation of search information The chart question and answer process is often that the large model analyzes and thinks based on the data in the chart and returns the corresponding response. Exemplarily, the user inputs the question text of the large model as "What is the consumption index of city A to the consumption index of city B? What can be found from the data?" But in the actual use process, large models will have data reading errors and mathematical expression calculation errors when responding. These errors in chart question answering are the real problems that the embodiment of the application needs to solve.

[0070] Data reading error example: The consumption index of city A is 4.56, but the large model has a certain probability of missing decimal point information when generating the analysis process text. In this case, the consumption index data of city A read by the large model will become 456, which will obviously cause errors in the subsequent analysis and calculation results.

[0071] Mathematical expression calculation error example: When calculating the consumption index multiple index of city A and city B, the large model has a large calculation result error due to its generated response characteristics. The output of a real large model is 4.56 / 2.74≈1.84, but the real multiple is 1.664.

[0072] Based on this, the embodiment constructs an entity containing all possible statements (i.e., the above-mentioned real-time retrieval text) for subsequent corpus data positioning and verification, and also generates and supports user-defined extensions in real time.

[0073] Please refer to Figure 3 , Figure 3 is the retrieval information automatic generation process schematic diagram provided by the embodiment of the application.

[0074] First, the tuple information (row name, column name, numerical value) in the chart is obtained in real time, and the above-mentioned entity data is connected through the corresponding entity connecting word, and the length of the entity connected text and other information are calculated for standby. The generated retrieval information data (i.e., the above-mentioned real-time retrieval text) also supports user-defined extensions, enhancing the user's self-expanding nature.

[0075] It should be noted that the connecting word in the figure is also an example, and the user can extend it to a certain extent according to his own needs. The retrieval information construction method mentioned in the embodiment of the application is: [row name] (connecting word)? [column name], which is only one of the construction methods. Users can adjust the construction method in real time according to the differences of specific problems, and through the supplement of the construction method, the completeness and comprehensiveness of the retrieval data can be dynamically improved, and the efficiency and accuracy of data correction can be improved.

[0076] The real-time retrieval text can be presented in the form of retrieval tuple information, and the format of the retrieval tuple information can be expressed as: (retrieval text, numerical value corresponding to the retrieval text, length of the retrieval text), for example: (number of users in city A, 1277565, 7).

[0077] The real-time retrieval text can be used to subsequently verify the large model chart question and answer generation result, and the retrieval text length data can assist in positioning the retrieval text.

[0078] 2) Real-time construction of retrieval tree After the above real-time retrieval information is generated, since the large model chart question and answer response text is generally long, how to efficiently position and judge the response text is also in urgent need. The retrieval tree with time efficiency O(n) is constructed based on the retrieval tuple information generated in the above steps. According to test, 1W retrieval tuple information constructs a retrieval tree only in 5ms, and the construction time can be ignored.

[0079] Please refer to Figure 4 , Figure 4 is a retrieval tree structure diagram provided by the embodiment of the application.

[0080] The retrieval tree contains the entity information to be detected, and also contains the category information, length information and starting position of the sub-entity in the retrieval tree at each key node, wherein the length information and the starting position information can assist in positioning the entity in the response text (i.e. the chart question and answer response result).

[0081] The leaf node of the entity information also contains the numerical information corresponding to the entity information. Since the number of real-time constructed chart question and answer retrieval information is in a controllable range, the time consumption of the retrieval tree construction process can be ignored, achieving the purpose of real-time construction. At the same time, the generation of retrieval information and the construction of retrieval tree are carried out synchronously with the chart answering process, and the synchronous process also guarantees the real-time synchronization of subsequent response retrieval.

[0082] 3) Error positioning and correction The process of constructing the retrieval tree is synchronized with the process of generating the first chart question and answer response of the large model. After the response result and the construction of the retrieval tree are completed, the retrieval tree will perform information retrieval, positioning and correction on the response text generated by the large model for the first time, and judge whether it is correct or not. For example, for the chart information and question in Figure 2 , a possible chart question and answer response result generated by the large model can be: "The consumption index of city A is 456, and the consumption index of city B is 2.74. The consumption index of city A / the consumption index of city B=456 / 2.74≈167.34. Therefore, the consumption index of city A is 167.34 times the consumption index of city B. From the consumption index, it can be seen that the consumption vitality of city A is greater, and it is possible that the economic development of city A is better and the income level of the residents is higher." By analyzing the above large model response result, it can be known that there are two main error information in the response text: first, the consumption index of city A is 4.56 (in the above response, the large model missed the decimal point, resulting in a large error in the value corresponding to the entity); second, the numerical calculation accuracy between entities is not high when performing multiplication and division calculation (assuming that the consumption index of city A is 456, the calculation result still has certain error, the calculation result of 456 / 2.74 is 166.42. This is due to the limitations of the generative large model itself).

[0083] For the above response text, when the text is input into the retrieval tree, the retrieval tree can complete the positioning and correction judgment of the entity retrieval information at the ms time level. Still taking the above response text as an example, the response text can output the following candidate information after positioning and expression verification of the retrieval tree:

(Corrected entity: consumption index of city A, start position: 0, correction information: 4.56, error information: 456), (Corrected entity: consumption index of city A, start position: 25, correction information: 4.56, error information: 456), (Corrected entity: consumption index of city A / consumption index of city B=456 / 2.74, start position: 25, correction information: 166.42, error information: 167.34)

[0084] And based on the candidate information, the graph question and answer response result is rewritten, and the rewritten target graph question and answer response result is as follows: “The consumption index of city A is 4.56, and the consumption index of city B is 2.74. The consumption index of city A / consumption index of city B=4.56 / 2.74≈1.66. Therefore, the consumption index of city A is 1.66 times that of city B. From the consumption index, it can be seen that the consumption vitality of city A is greater, and it is possible that the economic development of city A is better and the income level of residents is higher.” 4) Multi-level correction model It should be noted that after obtaining the target graph question and answer response result, the multi-level model generation and correction process can be performed, so that each time the error positioning only needs to process the first candidate correction result (the first detected error information entity). If the retrieval tree does not detect the corresponding error information or all error information has been eliminated or reaches the termination condition, the correction process will be terminated, and the corresponding response result will be output to the user without subsequent correction.

[0085] Specifically, since the subsequent content in the large model generated result depends on the generation result of the previous content, the error correction content generated earlier is selected as the first candidate correction result. Then the text (for example, the corrected text) is regenerated and re-verified. That is, the optimal correct text can be selected from the previous rewritten and corrected result as additional information for the second model generation to continue writing.

[0086] The optimal text substring after the above correction is: "The consumer index of city A is 4.56, and the consumer index of city B is 2.74". The large model generates additional information based on this information. One possible generation result is: "The consumer index of city A is 4.56, and the consumer index of city B is 2.74. The consumer index of city A / city B = 4.56 / 2.74 ≈ 1.62. Therefore, the consumer index of city A is 1.62 times the consumer index of city B. From the consumer index, it can be seen to some extent that the consumer vitality of city A is greater, and it is possible that the economic development of city A is better and the income level of the residents is higher."

[0087] And repeat the above steps of error positioning and correction for the response text. Since the result error of 4.56 / 2.74 ≈ 1.62 in the response result is still large, after multiple corrections, the final result is output: "The consumer index of city A is 4.56, and the consumer index of city B is 2.74. The consumer index of city A / city B = 4.56 / 2.74 ≈ 1.66. Therefore, the consumer index of city A is 1.66 times the consumer index of city B. From the consumer index, it can be seen to some extent that the consumer vitality of city A is greater, and it is possible that the economic development of city A is better and the income level of the residents is higher."

[0088] It should be noted that since the multi-layer correction process sacrifices a certain complexity to improve the accuracy of the result, the maximum number of multi-layer verification needs to be controlled to avoid unlimited increase in complexity.

[0089] In summary, for large model chart question answering, the response result correction scheme mentioned in the embodiment of the present application can significantly improve the accuracy of the model in the chart question answering process, as follows: 1. Compared with the short text error correction scheme based on the fixed confusion data set, the dynamic search tree construction scheme based on the search information of the application can be dynamically and real-time constructed for different problems and chart information. Since the real-time construction data is derived from the chart information corresponding to each problem, the magnitude is controllable, which can support the real-time construction and matching of the search tree. The method dynamically constructs the search tree model for a specific problem, which has good problem specificity and adaptability.

[0090] 2. Compared with the tree model based on pure text information construction, the search tree construction process in the application respectively introduces entity category, entity length information, starting position information and numerical information to assist the search tree in positioning and verifying the information of the response text at each sub-entity and corresponding leaf node. Through the combination of entity length information and starting position information, the entity text can be quickly positioned, and the numerical information corresponding to the entity can be obtained through various identification rules (such as: [entity information] (punctuation symbol | placeholder)? (numerical value) (punctuation symbol | placeholder)?). The information verification method based on the search tree has high error information detection rate and correction rate.

[0091] 3. Compared with a single model verification process, the application proposes a multi-level correction model in order to retain the thinking process and structure of the large model generation result and at the same time ensure the smoothness of the connection between texts. The multi-level correction model only processes the first candidate correction result each time, and inputs the optimal subtext as additional information into the next level of submodel for correction until no candidate correction result is generated. The scheme has a good error repair rate, and at the same time significantly improves the answer accuracy on the basis of ensuring the smoothness of the chart answer response result text.

[0092] The embodiment of the application can be used for the application scenarios of common decimal point omission and inaccurate mathematical calculation in the large model chart question and answer response result, and can construct a search tree by means of automatically generated chart question and answer related phrases to realize accurate positioning and effective correction of the large model chart question and answer response text errors, and has the following technical advantages: 1. Accurate search and efficient processing: The embodiment of the application can automatically generate the minimum and optimal search information related to each specific chart question and answer problem, and construct a search tree according to the search information. These search information only surrounds the specific problem, effectively avoids the interference of a large amount of invalid information, and significantly improves the search efficiency.

[0093] 2. Quick positioning and high detection rate: By constructing a multi-information information search tree, the corresponding text can be quickly positioned and the result can be accurately judged. The method has high text error detection rate and optimization rate, and can timely find and correct the errors in the response text.

[0094] 3. Progressive correction, considering accuracy and fluency: The progressive result correction method is adopted to guide the large model to return the correct result. This multi-layer large model correction scheme can improve the accuracy of the model answer while retaining the fluency and rationality of the large model generated result, ensuring the quality of the answer.

[0095] The application also provides a large model chart question and answer correction device based on a search tree. The large model chart question and answer correction device based on a search tree provided by the application is described below, and the large model chart question and answer correction device based on a search tree described below can be mutually corresponding and referred to the large model chart question and answer correction method based on a search tree described above.

[0096] Please refer to Figure 5 , Figure 5 is a structural schematic diagram of the large model chart question and answer correction device based on a search tree provided by the embodiment of the application. In this embodiment, the large model chart question and answer correction device based on a search tree includes: The acquisition module 510 is configured to acquire real-time search text and a chart question and answer response result generated by a language model; The construction module 520 is configured to construct a search tree including entity information to be detected according to the real-time search text; wherein auxiliary information is introduced into each sub-entity and the corresponding leaf node of the search tree to realize information positioning and verification of the search tree on the chart question and answer response result; The identification module 530 is configured to perform error identification positioning on the chart question and answer response result by using the search tree, output candidate information and rewrite when detecting error information, and obtain a candidate correction result; The continuation module 540 is configured to request the language model to continue writing based on the candidate correction result, and finally obtain a target chart question and answer response result.

[0097] In some embodiments, the acquisition module 510 can be specifically configured to: The tuple information including row names, column names and numerical values in the chart is acquired as entity information in real time, and the entity information is connected by connecting words to form real-time search text; wherein the chart question and answer response result is a response text returned by the language model based on analysis and thinking of the data in the chart.

[0098] In some embodiments, the continuation module 540 can be specifically configured to: The candidate correction result is taken as an input condition to request the language model to continue writing the text again to obtain a continuation result; the search tree is used to re-perform error identification positioning on the continuation result; when no error information is detected or all error information has been eliminated or a termination condition is reached, the current continuation result is output as the target chart question and answer response result.

[0099] In some embodiments, the method further comprises: adopting a multi-level correction model in the process of error identification positioning; the multi-level correction model only processes a first candidate correction result each time, and inputs an optimal subtext obtained based on the first candidate correction result as additional information into the next error identification positioning for correction until no new candidate correction result is generated; wherein the first candidate correction result is obtained according to the first detected error information in each correction.

[0100] In some embodiments, the identification module 530 can be specifically configured to: search and locate the chart question and answer response result by using the search tree to obtain a first identification result, and analyze the first identification result to determine whether there is error information.

[0101] In some embodiments, the auxiliary information includes at least one of an entity category, entity length information, start position information, and numerical value information.

[0102] In another aspect, the embodiments of the present application also provide an electronic device, please refer to Figure 6 , Figure 6 is a schematic diagram of the physical structure of the electronic device provided by the embodiments of the present application, as Figure 6 shown, the electronic device can include a memory 620, a processor 610, and a computer program stored on the memory 620 and executable on the processor 610. The processor 610 can implement the large model chart question and answer correction method based on the search tree when executing the program, which can include: obtaining a real-time search text and a chart question and answer response result generated by a language model; constructing a search tree including entity information to be detected according to the real-time search text; wherein auxiliary information is introduced at each sub-entity and corresponding leaf node of the search tree to realize information positioning and verification of the search tree on the chart question and answer response result; using the search tree to identify and locate errors in the chart question and answer response result, and when error information is detected, outputting candidate information and rewriting to obtain a candidate correction result; re-requesting the language model to continue writing based on the candidate correction result, and finally obtaining a target chart question and answer response result.

[0103] Optionally, the electronic device can further include a communication bus 630 and a communication interface 640, wherein the processor 610, the communication interface 640, and the memory 620 can complete mutual communication through the communication bus 630. The processor 610 can invoke the computer program in the memory 620 to execute the large model chart question and answer correction method based on the search tree provided by the above-mentioned methods.

[0104] In addition, the logical instructions in the memory 620 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0105] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the search tree-based large model chart question and answer correction method provided by the above-mentioned method, the steps and principles of which have been described in detail in the above-mentioned method and will not be repeated here.

[0106] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the search tree-based large model chart question and answer correction method provided by the above-mentioned method, the steps and principles of which have been described in detail in the above-mentioned method and will not be repeated here.

[0107] The non-transitory computer readable storage medium can be any available medium or data storage device accessible by the processor, including but not limited to magnetic storage (such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid state disk (SSD), etc.).

[0108] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e. they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.

[0109] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0110] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A large model chart question and answer correction method based on a search tree, characterized by, The method comprises the following steps: obtaining real-time retrieval text and a chart question and answer response result generated by a language model; constructing a retrieval tree including entity information to be detected according to the real-time retrieval text; wherein auxiliary information is introduced into each sub-entity and the corresponding leaf node of the retrieval tree to realize information positioning and verification of the retrieval tree on the chart question and answer response result; performing error identification positioning on the chart question and answer response result by using the retrieval tree, outputting candidate information and rewriting when error information is detected, and obtaining a candidate correction result; re-requesting the language model to continue writing based on the candidate correction result, and finally obtaining a target chart question and answer response result.

2. The retrieval tree-based large model graph question answering correction method according to claim 1, characterized in that, The real-time retrieval text is obtained by: obtaining tuple information including row names, column names and numerical values in the chart as entity information in real time, and connecting the entity information by connecting words to form the real-time retrieval text; wherein the chart question and answer response result is a response text returned by the language model based on analysis and thinking of data in the chart.

3. The retrieval tree-based large model graph question answering correction method according to claim 1, characterized in that, The method of re-requesting the language model to continue writing based on the candidate correction result and finally obtaining a target chart question and answer response result comprises the following steps: taking the candidate correction result as an input condition, re-requesting the language model to continue writing, and obtaining a continuation result; performing error identification positioning on the continuation result by using the retrieval tree; when no error information is detected or all error information has been eliminated or a termination condition is reached, outputting the current continuation result as the target chart question and answer response result.

4. The retrieval tree-based large model chart question answering correction method according to claim 3, characterized in that, The method further comprises the following steps: adopting a multi-level correction model in the process of error identification positioning; the multi-level correction model only processes a first candidate correction result each time, and takes an optimal subtext obtained based on the first candidate correction result as additional information input into the next error identification positioning for correction until no new candidate correction result is generated; wherein the first candidate correction result is obtained according to the first detected error information in each correction.

5. The retrieval tree-based large model graph question answering correction method according to claim 1, characterized in that, The method of performing error identification positioning on the chart question and answer response result by using the retrieval tree comprises the following steps: performing retrieval positioning on the chart question and answer response result by using the retrieval tree to obtain a first identification result, and analyzing the first identification result to determine whether there is error information.

6. The retrieval tree-based large model chart question answering correction method according to any one of claims 1 to 5, characterized in that, The auxiliary information includes at least one of entity category, entity length information, starting position information and numerical value information.

7. A search tree-based large model chart question and answer correction device, characterized by, The method comprises the following steps: an obtaining module, configured to obtain real-time retrieval text and a chart question and answer response result generated by a language model; a constructing module, configured to construct a retrieval tree including entity information to be detected according to the real-time retrieval text; wherein auxiliary information is introduced into each sub-entity and the corresponding leaf node of the retrieval tree to realize information positioning and verification of the retrieval tree on the chart question and answer response result; an identification module, configured to perform error identification positioning on the chart question and answer response result by using the retrieval tree, output candidate information and rewrite when error information is detected, and obtain a candidate correction result. A continuation module is configured to request the language model to continue based on the candidate correction result, and finally obtain a target graph question and answer response result.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor implements the large model graph question and answer correction method based on the retrieval tree according to any one of claims 1-6 when executing the computer program. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The processor implements the large model graph question and answer correction method based on the retrieval tree according to any one of claims 1-6 when executing the computer program.

10. A computer program product comprising a computer program, characterized in that, The processor implements the large model graph question and answer correction method based on the retrieval tree according to any one of claims 1-6 when executing the computer program. The processor implements the large model graph question and answer correction method based on the retrieval tree according to any one of claims 1-6 when executing the computer program.