Retrieval question and answer method and device for table, medium, equipment and program product
By conducting the first stage of search in the table database and using large language models for search planning, the problems of insufficient accuracy and over-retrieval of table questions and answers in the existing technology are solved, and the intelligence and automation of table questions and answers are realized, and the flexibility and accuracy of the search process are improved.
Patent Information
- Application Number
- CN202510941250.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-07-08
AI Technical Summary
The existing form Q&A technology has problems with insufficient accuracy or over-retrieval of search results in real business scenarios, and additional intervention is required for table configuration.
By conducting the first phase of search in the table database, using the large language model (LLM) for search planning, independently decide on the best search strategy, reduce dependence on high-cost entity recognition and synonyms, adopt mixed search mode and parallel search technology, and dynamically adjust the search strategy to meet different query needs.
It improves the intelligence and automation level of table Q&A, reduces over-retrieval, enhances the flexibility and accuracy of the search process, and ensures the reliability of the target table data and the accuracy of the search results.
Smart Images

Figure CN120448407A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of intelligent retrieval technology, and in particular, to a retrieval question-answering method, apparatus, medium, device, and program product for tables. Background Art
[0002] Table question answering technology is mainly based on semantic models, entity recognition technology, and template matching technology. It performs poorly on problems involving deep semantic understanding and requires additional intervention in table configuration.
[0003] In related technologies, the same retrieval strategy is used for different query questions in real business scenarios, which may result in insufficient retrieval results or excessive retrieval. Summary of the Invention
[0004] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides a query-and-answer method for a table, the query-and-answer method for a table comprising: In response to a query question input by a user, performing a first-stage search in a table database according to the query question to obtain candidate table data for answering the query question; Performing retrieval planning based on the query question and the candidate table data through the first large model to obtain a retrieval strategy, wherein the retrieval strategy represents whether to perform a second-stage retrieval or not; Based on the search strategy, determining target table data for answering the query question; An answer to the query question is generated by a second large model based on at least the candidate table data or the target table data.
[0006] In a second aspect, the present disclosure provides a search and question-answering device for a table, the search and question-answering device for a table comprising: a response module configured to respond to a query question input by a user, perform a first-stage search in a table database according to the query question, and obtain candidate table data for answering the query question; A first execution module is configured to perform retrieval planning based on the query question and the candidate table data through a first large model to obtain a retrieval strategy, wherein the retrieval strategy represents whether to perform a second-stage retrieval or not; A second execution module is configured to determine target table data for answering the query question based on the retrieval strategy; The third execution module is configured to generate an answer to the query question based on at least the candidate table data or the target table data through a second large model.
[0007] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the method described in the first aspect when executed by a processing device.
[0008] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the method described in the first aspect.
[0009] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the method described in the first aspect when executed by a processor.
[0010] Through the above technical solution, a first-stage search can be performed in a table database based on a query input by a user to obtain candidate table data for answering the query. The query text is then associated with the rows or columns of the table to which the candidate table data belongs, thereby achieving a deep semantic connection between the user's query and the table content in the table database, reducing the reliance on high-cost and difficult-to-maintain entity recognition, synonym libraries, or rule templates in the subsequent retrieval process. A first large model is then used to perform retrieval planning based on the query and the candidate table data obtained in the first-stage retrieval to obtain a retrieval strategy. Different retrieval strategies can be used for different queries, and the optimal retrieval strategy can be independently determined for subsequent use. This makes the entire retrieval process task-aware and adaptive, thereby improving the flexibility of the entire retrieval process and reducing over-searching while ensuring the accuracy of the retrieval results. Based on the retrieval strategy, target table data for answering the query is then determined. Different retrieval strategies can be flexibly implemented to determine the target table data for answering the query, thereby improving the reliability of the target table data. Finally, a second large model is used to generate an answer to the query based on at least the candidate table data or the target table data, thereby improving the intelligence and automation level of retrieval question answering.
[0011] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 The flowchart of a table search question answering method according to an exemplary embodiment of the present disclosure is shown.
[0013] Figure 2 is another flow chart of a table search and answering method according to an exemplary embodiment of the present disclosure. Figure 3 It is a block diagram showing a retrieval question-answering device for a table according to an exemplary embodiment of the present disclosure.
[0014] Figure 4 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0015] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0016] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0017] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0018] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0019] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0021] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0022] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0023] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0024] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0025] At the same time, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0026] It should be understood that using the same search strategy for different queries in real business scenarios may result in insufficient search precision or over-searching. For example, if the search strategy in the current business scenario is a coarse search strategy, executing a coarse search strategy for a query statement that requires a deep search may result in insufficient search precision. If the search strategy in the current business scenario is a deep search strategy, executing a deep search for a query statement that requires a coarse search may result in over-searching and waste resources.
[0027] In view of this, the present disclosure provides a table search and answering method, apparatus, medium, device, and program product to solve some or all of the above technical problems.
[0028] The disclosed embodiments are further explained below with reference to the accompanying drawings.
[0029] Figure 1 is a flowchart of a table search question answering method according to an exemplary embodiment of the present disclosure, referring to Figure 1 , the table retrieval question answering method may include the following steps: In step S11 , in response to a query question input by a user, a first-stage search is performed in a table database according to the query question to obtain candidate table data for answering the query question.
[0030] In step S12, a retrieval plan is performed based on the query question and the candidate table data by using the first large model to obtain a retrieval strategy, wherein the retrieval strategy represents whether to perform a second-stage retrieval or not.
[0031] In step S13, based on the search strategy, target table data for answering the query question is determined.
[0032] In step S14 , an answer to the query question is generated based on at least the candidate table data or the target table data by the second largest model.
[0033] In this embodiment, the query questions of user data include but are not limited to private domain knowledge, professional terms or spoken expressions. The table database is used to store table data of different table types. Each table data includes the metadata and specific content of the table unit to which the table data belongs, where the metadata includes the table name, column name and table description, etc.
[0034] It's worth noting that before the first-stage search in the table database based on the query, a query rewriting module driven by a large language model (LLM) can perform semantic completion, typo correction, or coreference elimination on the query. For example, a user-entered query such as "Who is A, who is B?" can be semantically completed and typo corrected to produce "Who is A, who is B?"
[0035] It is worth noting that in the field of table question answering, pre-trained model technology represented by LLM, with its powerful contextual learning and text generation capabilities, can directly understand and process natural language questions and interact with table data (i.e., adjust detection strategies according to different query questions), bringing a paradigm shift in the field of table question answering and significantly improving the flexibility and intelligence of the system.
[0036] It should be understood that in real business scenarios, user queries are often colloquial, ambiguous, and even contain domain-specific terminology, while tabular data is generally structured and precise. There is a significant semantic gap between user queries and tabular data. Related technologies, such as Named Entity Recognition (NER) combined with synonym libraries or rule templates for retrieval, are expensive to configure and cannot exhaustively enumerate all possibilities. When LLM serves as the core of a Retrieval-Augmented Generation (RAG) system, its ultimate performance is largely limited by the quality of information provided by the upstream retrieval module. Therefore, in the absence of clear context, LLM cannot effectively associate the semantics of the text with its meaning within a specific row and column structure.
[0037] In this embodiment, the first-stage search (i.e., Base-Search) can employ a hybrid search model combining BM25 (Best Matching 25) and DPR (Dense Passage Retrieval). Specifically, this hybrid BM25 and DPR search model performs a preliminary, coarse-grained search of the table database based on the query, obtaining candidate table data for answering the query.
[0038] In the above technical solution, a first-stage search can be performed in a table database based on a query input by the user to obtain candidate table data for answering the query. This allows the text in the query to be associated with the rows or columns of the table to which the candidate table data belongs, thus achieving a deep semantic connection between the user's query and the table content in the table database, reducing the subsequent retrieval process's reliance on high-cost and difficult-to-maintain entity recognition, synonym libraries, or rule templates. A first large model is then used to perform retrieval planning based on the query and the candidate table data obtained in the first-stage retrieval to obtain a retrieval strategy. Different retrieval strategies can be used for different queries, and the optimal retrieval strategy to be used in the subsequent retrieval can be independently determined. This makes the entire retrieval process task-aware and adaptive, thereby improving the flexibility of the entire retrieval process and reducing over-searching while ensuring the accuracy of the retrieval results. Based on the retrieval strategy, the target table data for answering the query is determined. Different retrieval strategies can be flexibly implemented to determine the target table data for answering the query, thereby improving the reliability of the target table data. Finally, a second large model is used to generate an answer to the query based on at least the candidate table data or the target table data, thereby improving the intelligence and automation level of retrieval question answering.
[0039] To facilitate understanding of the table search and answering method provided by the present disclosure, possible implementations of the present disclosure are described below.
[0040] In a possible manner, the candidate table data includes metadata of the table to which the candidate table data belongs. The first model is used to perform retrieval planning based on the query question and the candidate table data to obtain a retrieval strategy, which may include: Based on the query question and metadata, determine the subquery question corresponding to the candidate table data; The candidate table data and subquery questions are input into the first model for retrieval planning, and the retrieval strategy output by the first model is obtained.
[0041] It is worth noting that the candidate table data retrieved in the first stage may belong to one or more candidate tables, and the subquery questions corresponding to each candidate table data may be the same or different. When the candidate table data belongs to one candidate table and the subquery questions corresponding to each candidate table data are the same, the candidate table corresponds to one subquery question; when the candidate table data belongs to one candidate table and the subquery questions corresponding to each candidate table data are different, the candidate table corresponds to multiple subquery questions; when the candidate table data belongs to multiple candidate tables and the subquery questions corresponding to the candidate table data belonging to the same candidate table are the same, each candidate table corresponds to one subquery question; when the candidate table data belongs to multiple candidate tables and the subquery questions corresponding to the candidate table data belonging to the same candidate table are different, each candidate table corresponds to multiple subquery questions corresponding to the candidate table; in summary, each candidate table may correspond to one or more subquery questions.
[0042] In this embodiment, the candidate table data and subquery questions are input into the LLM-driven planner (i.e., the Plan module). Based on a preset structured evaluation framework, the planner performs retrieval planning based on the candidate table data and subquery questions and outputs the retrieval strategy for the next step.
[0043] In the above technical solution, retrieval planning is performed based on the candidate table data and the subquery questions corresponding to each candidate table data to obtain a retrieval strategy. Compared with the existing RAG system that directly inputs the candidate table data obtained from the first stage of retrieval into the generation model, the present disclosure can independently determine the optimal retrieval strategy to be adopted subsequently. The entire retrieval process is task-aware and adaptive, which improves the flexibility of the entire retrieval process.
[0044] In a possible manner, based on the query question and metadata, determining the subquery question corresponding to the candidate table data may include: Fill the query question and metadata into the preset prompt word template to obtain the target prompt word, wherein the target prompt word is used to prompt the third model to rewrite the query question according to the metadata; The target prompt word is input into the third model to obtain a sub-query question corresponding to the candidate table data output by the third model.
[0045] In this embodiment, the candidate table data retrieved through the first stage provides context for subsequent query rewriting. The query question and the metadata of the candidate table data are input into the query rewriting module driven by LLM. The query rewriting module rewrites the query question based on the metadata and outputs the sub-query question corresponding to the candidate table data.
[0046] It is worth noting that the following prompt words can be input into the first model to obtain the search strategy: {{user_input}} / / represents the user input query problem ''' {{query_result}} / / represents an example of the search results ''' Compare and analyze the search requirements and search results, semantically align and optimize the current search requirements based on table attributes (metadata) and sample data (candidate table data), and provide subsequent search plans.
[0047] In this technical solution, by analyzing the characteristics of the query and candidate table data to determine the optimal search strategy, computing resources can be rationally allocated, unnecessary calculations and data processing can be avoided, and thus search efficiency can be improved. The search strategy can also be dynamically adjusted based on the query and candidate table data to adapt to different search scenarios and user query requirements, increasing the flexibility of the search process.
[0048] Among other things, the third model can be used to rephrase the query in at least one of the following ways: Identify colloquial expressions in query questions and associate column names in metadata with colloquial expressions; Identify the same type of data with inconsistent formats in the query question and candidate table data, and normalize the same type of data with inconsistent formats; Perform intent recognition on the query question to obtain the intent recognition result, and generalize or complete the query question based on the intent recognition result.
[0049] The query question and the similar data in the candidate table data that are inconsistent in format include but are not limited to dates and currency units.
[0050] In this embodiment, the rewriting of the query question can be summarized as field name association, field value format normalization, and semantic generalization or semantic completion. For example, for field name association: identify the colloquial expression "net profit" in the query question, and associate the column name "Net_Income" in the metadata of the candidate table data with "net profit". For field value format normalization: identify the date "last year" in the query question and the date "YYYY / MM / DD" in the candidate table data, and convert "last year" to the specific "YYYY / MM / DD". For semantic generalization or semantic completion: combine common sense to perform semantic recognition on the query question, obtain the user's true intention, and perform reasonable semantic generalization on the overly brief query question based on the user's true intention, or complete the missing conditions in the query question.
[0051] In the above technical solution, by analyzing the query question and the candidate table data, the query question is rewritten as a subquery question more suitable for execution on the candidate table to which the candidate table data belongs. This decomposes the global search task into multiple independent in-table search tasks, preparing for the second stage of refined search. The subqueries can be processed in parallel, significantly reducing query time and improving retrieval efficiency. It can also avoid subsequent scanning and processing of unnecessary data, thereby reducing the consumption of computing resources. On the other hand, by decomposing the query question into multiple subqueries, the target table data can be more accurately located, reducing the interference of false positives and noise data, and improving retrieval accuracy.
[0052] Among possible approaches, the first large model can be used for search planning in the following way: Determining, based on the candidate table data and the subquery question, a directness result of the candidate table data and a data density of the candidate table data, wherein the directness result indicates whether the candidate table data has data that can answer the query question, and the data density indicates whether the candidate table data has data dilution; When the directness result indicates that the candidate table data does not contain data that can answer the query question, and the data density indicates that the candidate table data has semantic dilution, a retrieval strategy for generating a representation to perform a second-stage retrieval (i.e., Table-Search) is generated; When the directness result indicates that the candidate table data has data that can answer the query question, and the data density indicates that the candidate table data does not have semantic dilution, a retrieval strategy indicating that the second-stage retrieval is not performed is generated.
[0053] In this embodiment, based on the two evaluation dimensions of directness and data density, the optimal subsequent retrieval strategy (for example, skipping the second-stage retrieval and conducting the second-stage retrieval) is decided autonomously, and then multiple subsystems including the second-stage retrieval and the extended retrieval are orchestrated and scheduled.
[0054] In the above technical solution, reasonable selection of retrieval strategies from the two aspects of directness and data density can better handle various complex query requirements, thereby improving the accuracy of retrieval results, and avoiding unnecessary calculations and data processing, significantly reducing the consumption of computing resources, and making the entire retrieval process task-aware and adaptive.
[0055] Among possible approaches, determining target table data for answering query questions based on a retrieval strategy may include: When the retrieval strategy indicates that the second-stage retrieval is not to be performed, the candidate table data is determined as the target table data for answering the query question.
[0056] In the above technical solution, when the retrieval strategy indicates that no second-stage retrieval is required, the candidate table data is direct and reliable enough. In this case, the complex second-stage retrieval is skipped, and the answer to the query question can be directly generated based on the candidate table data, thereby improving the retrieval efficiency. This retrieval strategy is suitable for simple and clear query questions.
[0057] Among possible approaches, determining target table data for answering query questions based on a retrieval strategy may include: In the case where the retrieval strategy represents the second stage retrieval, determining the candidate table to which the candidate table data belongs and the sub-query questions corresponding to the candidate table data respectively obtained by rewriting the query question; Based on the sub-query question, a parallel search is performed in the candidate tables to which the corresponding candidate table data belongs, and the target table data used to answer the query question is obtained.
[0058] It should be understood that when processing tabular data from diverse sources, heterogeneous structures, and vastly varying record lengths, the information retrieval field faces the problem of document length bias. For example, sparse retrieval algorithms based on keyword matching (such as BM25) have an inherent score accumulation problem, whereby long documents may receive unreasonably high scores simply because they contain more terms. While dense retrieval methods, such as DPR, can capture semantic information, they can also lead to semantic dilution (i.e., document length bias) when processing overly long table rows or serialized tables, as key information is surrounded by a large amount of irrelevant information. This can affect retrieval accuracy.
[0059] In this embodiment, when the retrieval strategy characterizes the second stage of retrieval, a corresponding sub-query task is generated according to the sub-query question, and parallel, independent sub-query tasks are simultaneously initiated for the candidate table to which the candidate table data belongs. Parallel retrieval is performed among the candidate table data to implement multi-way table retrieval (i.e., Table-Search) to obtain the target table data used to answer the query question.
[0060] In the above technical solution, each subquery task is searched within the context of a single table, greatly narrowing the search scope. This avoids semantic dilution caused by key information being surrounded by a large amount of irrelevant information, and allows for quick and accurate location of specific row-level information within the table. Furthermore, because the candidate table data belonging to the same candidate table have a relatively uniform source, identical data structure, and minimal differences in record length, independent searches of the candidate table to which the corresponding candidate table data belongs based on the subquery question eliminate the document length bias inherent in traditional search methods. Regardless of the length of the table, fair and accurate relevance assessments can be performed, avoiding distortion of results due to score accumulation or semantic dilution, thereby improving search efficiency.
[0061] In a possible manner, the query-answering method for a table may further include: Determine a first correlation between the candidate table data and the query question and a second correlation between the target table data and the query question by using the first large model; Accordingly, generating an answer to the query question based on at least the candidate table data or the target table data by the second largest model may include: generating, by the second largest model, an answer to the query question based on at least the target table data when the second correlation is greater than the first correlation; When the second correlation is less than or equal to the first correlation, an answer to the query question is generated based on at least the candidate table data by the second largest model. In the above technical solution, by comparing the relevance of the retrieval results of the two phases to the query, it is determined whether the retrieval results of the second phase provide more valuable information than the retrieval results of the first phase. If the retrieval results of the second phase provide more valuable information, the answer to the query is generated based on the retrieval results of the second phase, thereby obtaining a high-quality answer. On the other hand, if the retrieval results of the second phase do not provide more valuable information, a fault tolerance and fallback mechanism can be provided to fall back and use the more reliable retrieval results of the first phase to generate the answer to the query.
[0062] In a possible manner, the query-answering method for a table may further include: Determining the confidence of the target table data or the consistency between the candidate table data and the target table data through the first large model; Accordingly, generating an answer to the query question based on at least the candidate table data by the second largest model may include: When the confidence level of the second largest model is less than a preset threshold or the candidate table data is inconsistent with the target table data, an answer to the query question is generated based on the candidate table data.
[0063] The preset threshold value may be preset according to the search accuracy or search requirements, and this disclosure does not limit this.
[0064] It should be understood that the subquery question is rewritten based on the query question. In extreme cases, the subquery question may contradict the query question. At this time, the target table data retrieved according to the subquery question in the second retrieval stage conflicts with the candidate table data retrieved in the first stage.
[0065] In the above technical solution, when the confidence level of the retrieval results of the second stage retrieval is too low, or the retrieval results of the second stage retrieval conflict with the retrieval results of the first stage retrieval, a fault tolerance and fallback mechanism is provided to abandon the retrieval results of the second stage retrieval, fall back and use the more reliable retrieval results of the first stage retrieval to generate an answer to the query question.
[0066] In a possible manner, the query-answering method for a table may further include: According to the query question, an additional search (i.e., additional search) is performed in the table data in the table database except for the candidate table data to obtain the extended table data; Accordingly, generating an answer to the query question based on at least the candidate table data or the target table data by the second largest model may include: An answer to the query question is generated based on the expanded table data and the candidate table data by the second largest model, or an answer to the query question is generated based on the expanded table data and the target table data by the second largest model.
[0067] It is worth noting that because different tables in the enterprise knowledge base vary in size, structure or keyword density, when a user initiates a query, the scoring mechanism of the traditional retrieval algorithm often makes the results heavily biased towards a few dominant tables (for example, tables with a large number of rows or a high degree of overlap with the query keywords), while ignoring other small or semantically related but differently expressed tables that may contain more relevant or even more accurate answers. This results in the feedback answers being narrow and biased, and unable to fully reflect all relevant information in the enterprise knowledge base, that is, table data skew.
[0068] In this embodiment, based on the query question, additional low-cost fast searches are performed in sequence in the table data other than the candidate table data in the table database to capture table data that has not been retrieved due to table data skew, or long-tail table data that does not score high from a global perspective but may contain key information, that is, table data that has a low preliminary score in the first-stage retrieval or is considered to be less relevant to the query question, thereby ensuring the comprehensiveness of the retrieval and overcoming the problem of table data skew.
[0069] In the above technical solution, an extended search task is initiated simultaneously with the first-stage search. This extended search task covers all table data in the table database, excluding the candidate table data. This overcomes the tendency for search results to be overly concentrated on a single document due to differences in document structure or user representation, ensuring comprehensive and balanced recall of relevant information from multiple heterogeneous tables. This significantly improves the system's recall completeness, ensuring that tables that may contain critical information but are overlooked by the primary search due to keyword mismatches or small size can be rediscovered.
[0070] In a possible manner, generating an answer to the query question based on at least the target table data by the second largest model may include: Determining a first confidence threshold using the second largest model when information redundancy exists in the target table data, filtering the first table data from the target table data based on the first confidence threshold, and generating an answer to the query question based on the first table data; When information is scarce in the target table data, a second confidence threshold is determined through the second largest model, and second table data is filtered from the target table data based on the second confidence threshold. An answer to the query question is generated based on the second table data, wherein the second confidence threshold is less than the first confidence threshold.
[0071] It's worth noting that after all search tasks in the second phase of retrieval are completed, two extreme situations may arise. The first is information scarcity: in a massive data table, there may be only one piece of data suspected to be relevant to the user's query. The second is information redundancy: a single query may match hundreds or even thousands of relevant data points. Fixed-threshold recall and sorting strategies used in related technologies are inflexible in addressing both of these situations. The confidence thresholds for recall and sorting need to be adaptively adjusted in different scenarios to balance accuracy and recall, tackling the contradiction between information scarcity and information redundancy.
[0072] In this embodiment, after all retrieval tasks in the second stage of retrieval are completed, the system enters the final result integration and generation stage. In the result integration and generation stage, based on the confidence of all target table data, it is determined whether the target table data has information redundancy or information scarcity. In the case of information redundancy in the target table data, a high confidence threshold (such as a confidence of 2) is used to filter the first table data from the target table data, thereby maximizing the accuracy (i.e., Precision) of the answer. In the case of information scarcity in the target table data, a low confidence threshold (such as a confidence of 1) is used to filter the second table data from the target table data, thereby maximizing the recall (i.e., Recall) of the answer, avoiding missing the only possible answer due to overly strict standards.
[0073] The above technical solution dynamically adjusts the confidence threshold, using a low confidence threshold to maximize answer recall when information is scarce, and a high confidence threshold to maximize answer precision when information is redundant. This automatically strikes an optimal balance between precision and recall in scenarios with varying information densities, enabling adaptive detection of information scarcity and redundancy. Furthermore, based on the confidence threshold, high-confidence table data is filtered from the target table data as context for generating the answer (i.e., grounding), achieving robust retrieval performance.
[0074] In a possible manner, the query-answering method for a table may further include: Determine a target proportion of the third table data having a confidence level greater than a third confidence threshold in the target table data; When the target proportion is greater than or equal to the first proportion threshold, determining that information redundancy exists in the target table data; When the target proportion is less than the second proportion threshold or the number of the third table data is less than the number threshold, it is determined that the target table data has information scarcity, wherein the second proportion threshold is less than the first proportion threshold.
[0075] The first proportion threshold and the second proportion threshold may be preset according to the number of table data in the table database, or may be preset according to the search accuracy, which is not limited in the present disclosure.
[0076] For example, the confidence levels of the target table data include 0, 1, and 2, where 0 indicates that the target table data is completely irrelevant to the query question, 1 indicates that the target table data is possibly relevant to the query question, and 2 indicates that the target table data is highly relevant to the query question. If the target table data with a confidence level of 2 is greater than 80%, the evidence for the answer is very sufficient, and in this case, it is determined that the target table data has information redundancy. If the target table data with a confidence level of 2 is less than 10%, the evidence for generating an answer to the query question is insufficient, and in this case, it is determined that the target table data has information scarcity.
[0077] In this technical solution, LLM is applied to the target table data retrieved in the second phase of the search to perform a data quality assessment (i.e., Fine Rank). Specifically, by analyzing the distribution density of high-confidence target table data, the algorithm autonomously determines whether information is currently redundant or scarce, and dynamically selects a high or low confidence threshold accordingly. By dynamically adjusting the decision threshold based on real-time feedback, the algorithm automatically balances precision and recall, achieving optimal performance in diverse query scenarios and data environments without any human intervention.
[0078] like Figure 2 As shown, the following is a complete example to illustrate the retrieval question-answering method for a table provided by the present disclosure: I. Pre-search: 1. Obtain the query questions entered by the user and optimize the query questions.
[0079] 2. Perform a first-stage search in the table database based on the query question to obtain candidate table data for answering the query question.
[0080] 3. Through the first model, path planning is performed based on the query question and the red lotus selection table data to obtain the retrieval strategy.
[0081] II. Refined search: a. Retrieval strategy corresponding path 1: skip the second stage retrieval, perform extended retrieval, obtain extended table data, and generate answers based on the candidate table data and the extended table data.
[0082] b. Retrieval strategy corresponding path two: perform the second stage retrieval, sub-table query: search the corresponding candidate table data based on the sub-query question to obtain multiple target table data. The target table data provides more valuable information and the target table data is merged; at the same time, perform extended retrieval to obtain extended table data; generate answers based on the extended table data and the target table data after data merging.
[0083] c. Retrieval strategy corresponding path three: Perform second-stage retrieval, sub-table query: Search the corresponding candidate table data based on the sub-query question to obtain multiple target table data. The target table data does not provide more valuable information, so fall back to the first-stage retrieval results; perform extended retrieval at the same time to obtain extended table data; generate answers based on the candidate table data and extended table data.
[0084] In this embodiment, when the pre-retrieval results already contain clear answers, and the pre-retrieval results have high directness and high data density, path one is executed, the second stage retrieval is skipped, and the answer is generated directly based on the pre-retrieval results, which is suitable for simple and clear query scenarios. When the pre-retrieval results are insufficient or divergent, and the pre-retrieval results have low directness or low data density, path two is executed, the second stage retrieval is performed, Table-Search and Additional-Search are triggered, FineRank is executed and the results are integrated to generate answers, which is suitable for complex, fuzzy or query scenarios that require deep reasoning. When the confidence level of the retrieval results of the second stage retrieval is low or the retrieval results of the pre-retrieval stage are conflicting, path three is executed, the retrieval results of the second stage retrieval are abandoned, and the retrieval results of the first stage are used to generate answers. This is suitable for scenarios where deep retrieval introduces too much noise or generates contradictory information and falls back to more reliable baseline results.
[0085] In this technical solution, the first-stage search establishes semantic connections between the query and the table database by learning the overall table data (including inter-table relationships, table names, attributes, and partial data). This creates candidate table data. After understanding the characteristics of the candidate data tables, search planning is performed based on the query, resulting in a targeted search strategy. During the planning stage, scoring and planning are performed based on a multi-dimensional evaluation framework (e.g., directness: whether the table data contains a direct answer; data density: whether the table data is concise; and search strategy: whether alternative strategies can be adopted). This significantly improves the quality and reliability of LLM search planning. Furthermore, an extended search performs an additional recall on the complement of the pre-search, ensuring that table data that was underestimated in the first search stage due to structural or presentational differences is also reconsidered. This significantly mitigates data skew and improves the system's recall completeness. Furthermore, the system identifies both information redundancy and information scarcity in the second-stage search results and adaptively adjusts the confidence threshold to maximize recall when information is scarce and precision when information is redundant. When faced with complex and ever-changing enterprise data, it demonstrates stability and efficiency far exceeding that of fixed threshold methods.
[0086] Based on the same concept, the present disclosure also provides a retrieval question-answering device for a table, such as Figure 3As shown, the table search question answering device 300 includes: Response module 301, in response to a query question input by a user, performs a first-stage search in a table database according to the query question to obtain candidate table data for answering the query question; The first execution module 302 is configured to perform retrieval planning based on the query question and the candidate table data through the first large model to obtain a retrieval strategy, wherein the retrieval strategy represents whether to perform the second stage retrieval or not; The second execution module 303 is configured to determine target table data for answering the query question based on the retrieval strategy; The third execution module 304 is configured to generate an answer to the query question based on at least the candidate table data or the target table data through the second large model.
[0087] In the above technical solution, a first-stage search can be performed in a table database based on a query input by the user to obtain candidate table data for answering the query. The text in the query is then associated with the rows or columns of the table to which the candidate table data belongs, achieving a deep semantic connection between the user's query and the table content in the table database, thereby reducing the reliance on high-cost and difficult-to-maintain entity recognition, synonym libraries, or rule templates. Then, a first-stage model is used to perform search planning based on the query and the candidate table data obtained in the first-stage search to obtain a search strategy. Different search strategies can be used for different queries, and the optimal search strategy to be used subsequently can be independently determined. This makes the entire search process task-aware and adaptive, thereby improving the flexibility of the entire search process and reducing over-searching while ensuring the accuracy of the search results. Based on the search strategy, the target table data for answering the query is determined. Different search strategies can be flexibly implemented to determine the target table data for answering the query, thereby improving the reliability of the target table data. Finally, a second-stage model is used to generate an answer to the query based on at least the candidate table data or the target table data, thereby improving the intelligence and automation level of search question answering.
[0088] Furthermore, the candidate table data includes metadata of the table to which the candidate table data belongs, and the first execution module 302 is configured to determine a subquery question corresponding to the candidate table data based on the query question and the metadata; The candidate table data and subquery questions are input into the first model for retrieval planning, and the retrieval strategy output by the first model is obtained.
[0089] Furthermore, the first execution module 302 is configured to fill the query question and metadata into a preset prompt word template to obtain a target prompt word, wherein the target prompt word is used to prompt the third model to rewrite the query question according to the metadata; The target prompt word is input into the third model to obtain the subquery problem corresponding to the candidate table data output by the third model.
[0090] Furthermore, the third model is used to rephrase the query in at least one of the following ways: Identify colloquial expressions in the query question and associate column names in metadata in the candidate table data with the colloquial expressions; Identify the same type of data with inconsistent formats in the query question and candidate table data, and normalize the same type of data with inconsistent formats; Perform intent recognition on the query question to obtain the intent recognition result, and generalize or complete the query question based on the intent recognition result.
[0091] Furthermore, the first model is used for retrieval planning in the following way: Based on the candidate table data and the subquery question, determining the directness result of the candidate table data and the data density of the candidate table data, wherein the directness result indicates whether the candidate table data has data that can answer the query question, and the data density indicates whether the candidate table data has data dilution; When the direct result represents that the candidate table data does not have data that can answer the query question, and the data density represents that the candidate table data has semantic dilution, a retrieval strategy for generating a representation for the second stage retrieval is generated; When the directness result indicates that the candidate table data has data that can answer the query question, and the data density indicates that the candidate table data does not have semantic dilution, a retrieval strategy indicating that the second-stage retrieval is not performed is generated.
[0092] Furthermore, the second execution module 303 is configured to determine the candidate table to which the candidate table data belongs and the sub-query questions corresponding to the candidate table data respectively obtained by rewriting the query question when the retrieval strategy indicates that the second stage retrieval is to be performed; Based on the sub-query question, a parallel search is performed in the candidate tables to which the corresponding candidate table data belongs, and the target table data used to answer the query question is obtained.
[0093] Furthermore, the first execution module 304 is further configured to determine a first relevance between the candidate table data and the query question and a second relevance between the target table data and the query question through the first large model; Accordingly, the third execution module 304 is configured to generate an answer to the query question based on at least the target table data by using the second large model when the second correlation is greater than the first correlation; When the second correlation is less than or equal to the first correlation, an answer to the query question is generated based on at least the candidate table data by the second largest model. Furthermore, the first execution module 304 is further configured to determine the confidence of the target table data or the consistency between the candidate table data and the target table data through the first large model; Accordingly, the third execution module 304 is configured to generate an answer to the query question based on the candidate table data using the second largest model when the confidence level is less than a preset threshold or the candidate table data is inconsistent with the target table data.
[0094] Furthermore, the response module 301 is further configured to perform an extended search in the table data in the table database except the candidate table data according to the query question to obtain the extended table data; Accordingly, the third execution module 304 is configured to generate an answer to the query question based on the expanded table data and the candidate table data through the second large model, or to generate an answer to the query question based on the expanded table data and the target table data through the second large model.
[0095] Furthermore, the third execution module 304 is configured to determine a first confidence threshold using the second large model when information redundancy exists in the target table data, filter the first table data from the target table data based on the first confidence threshold, and generate an answer to the query question based on the first table data; When information is scarce in the target table data, a second confidence threshold is determined through the second largest model, and second table data is filtered from the target table data based on the second confidence threshold. An answer to the query question is generated based on the second table data, wherein the second confidence threshold is less than the first confidence threshold. Furthermore, the third execution module 304 is configured to determine a target proportion of the third table data having a confidence level greater than a third confidence threshold in the target table data; When the target proportion is greater than or equal to the first proportion threshold, determining that information redundancy exists in the target table data; When the target proportion is less than the second proportion threshold or the number of the third table data is less than the number threshold, it is determined that the target table data has information scarcity, wherein the second proportion threshold is less than the first proportion threshold.
[0096] Furthermore, the second execution module 303 is configured to determine the candidate table data as the target table data for answering the query question when the retrieval strategy indicates that the second stage retrieval is not to be performed.
[0097] The specific manner in which each module performs operations in the table search question-answering device 300 in the above embodiment has been described in detail in the embodiment of the method, and will not be elaborated on here.
[0098] Based on the same concept, an embodiment of the present disclosure further provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements any of the above-mentioned retrieval question-answering methods for tables.
[0099] Based on the same concept, the present disclosure further provides an electronic device, which may include: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement any of the above-mentioned retrieval question-answering methods for tables.
[0100] Based on the same concept, an embodiment of the present disclosure further provides a computer program product, including a computer program, which implements any of the above-mentioned retrieval question-answering methods for tables when executed by a processor.
[0101] Reference below Figure 4 , which shows a schematic structural diagram of an electronic device 400 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0102] like Figure 4 As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 402 or programs loaded from a storage device 408 into a random access memory (RAM) 403. Various programs and data required for the operation of electronic device 400 are also stored in RAM 403. Processing device 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0103] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0104] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0105] It should be noted that the computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0106] In some embodiments, communications may be conducted using any currently known or later developed network protocol, such as HTTP (Hypertext Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0107] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0108] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: responds to the query question input by the user, performs a first-stage search in the table database according to the query question, and obtains candidate table data for answering the query question, wherein the candidate table data includes metadata of the table to which the candidate table data belongs; performs retrieval planning based on the query question and the candidate table data through the first large model to obtain a retrieval strategy; determines the target table data for answering the query question based on the retrieval strategy; and generates an answer to the query question through the second large model based at least on the candidate table data or the target table data.
[0109] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0111] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0112] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0113] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0114] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the scope of the above disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0115] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0116] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. A retrieval question-answering method for a table, characterized in that: The retrieval question-answering method for a table includes: In response to a query question input by a user, performing a first-stage search in a table database according to the query question to obtain candidate table data for answering the query question; Performing retrieval planning based on the query question and the candidate table data through the first large model to obtain a retrieval strategy, wherein the retrieval strategy represents whether to perform a second-stage retrieval or not; Based on the search strategy, determining target table data for answering the query question; An answer to the query question is generated by a second large model based on at least the candidate table data or the target table data.
2. The table search question answering method according to claim 1, characterized in that: The candidate table data includes metadata of the table to which the candidate table data belongs. The retrieval planning is performed based on the query question and the candidate table data by the first large model to obtain a retrieval strategy, including: Determine, based on the query question and the metadata, a subquery question corresponding to the candidate table data; The candidate table data and the sub-query question are input into the first large model for retrieval planning, and a retrieval strategy output by the first large model is obtained.
3. The table search and answering method according to claim 2, wherein: The determining, based on the query question and the metadata, a subquery question corresponding to the candidate table data includes: Filling the query question and the metadata into a preset prompt word template to obtain a target prompt word, wherein the target prompt word is used to prompt the third model to rewrite the query question according to the metadata; The target prompt word is input into the third model to obtain a sub-query question corresponding to the candidate table data output by the third model.
4. The table search question answering method according to claim 3, characterized in that: The third model is used to rewrite the query question in at least one of the following ways: Identifying a colloquial expression in the query question and associating a column name in the metadata with the colloquial expression; Identifying the query question and the similar data in the candidate table data that are inconsistent in format, and performing normalization processing on the similar data in the inconsistent format; Intent recognition is performed on the query question to obtain an intent recognition result, and based on the intent recognition result, the query question is generalized or completed.
5. The table search question answering method according to claim 2, characterized in that: The first model is used to perform search planning in the following way: Determining, based on the candidate table data and the sub-query question, a directness result of the candidate table data and a data density of the candidate table data, wherein the directness result indicates whether the candidate table data has data that can answer the query question, and the data density indicates whether the candidate table data has data dilution; If the directness result indicates that the candidate table data does not contain data that can answer the query question, and the data density indicates that the candidate table data has semantic dilution, generating a search strategy for performing a second-stage search; When the directness result indicates that the candidate table data contains data that can answer the query question, and the data density indicates that the candidate table data does not have semantic dilution, a search strategy indicating that a second-stage search is not performed is generated.
6. The table search question answering method according to any one of claims 1 to 5, characterized in that: The step of determining target table data for answering the query question based on the retrieval strategy includes: In the case where the search strategy indicates that a second-stage search is to be performed, determining the candidate table to which the candidate table data belongs and the sub-query questions corresponding to the candidate table data respectively obtained by rewriting the query question; Based on the sub-query question, a parallel search is performed in the candidate tables to which the corresponding candidate table data belongs, to obtain the target table data for answering the query question.
7. The table search and answering method according to claim 6, characterized in that: The retrieval question-answering method for a table further includes: Determine, by using the first large model, a first relevance between the candidate table data and the query question and a second relevance between the target table data and the query question; The generating, by the second largest model, an answer to the query question based at least on the candidate table data or the target table data, includes: generating, by the second largest model, an answer to the query question based at least on the target table data when the second correlation is greater than the first correlation; When the second correlation is less than or equal to the first correlation, an answer to the query question is generated by the second large model at least based on the candidate table data.
8. The table search and answering method according to claim 6, characterized in that: The retrieval question-answering method for a table further includes: Determining the confidence of the target table data or the consistency between the candidate table data and the target table data by using the first large model; The generating, by the second largest model, an answer to the query question based at least on the candidate table data, includes: When the confidence level is less than a preset threshold or the candidate table data is inconsistent with the target table data, the second largest model generates an answer to the query question based on the candidate table data.
9. The table search question answering method according to claim 6, characterized in that: The retrieval question-answering method for a table further includes: performing an extended search in other table data in the table database except the candidate table data according to the query question to obtain extended table data; The generating, by the second largest model, an answer to the query question based at least on the candidate table data or the target table data, includes: An answer to the query question is generated based on the expanded table data and the candidate table data by a second large model, or an answer to the query question is generated based on the expanded table data and the target table data by a second large model.
10. The table search question answering method according to claim 6, characterized in that: Generating an answer to the query question based on at least the target table data by using the second largest model includes: determining a first confidence threshold using the second large model when information redundancy exists in the target table data, filtering first table data from the target table data based on the first confidence threshold, and generating an answer to the query question based on the first table data; When information is scarce in the target table data, a second confidence threshold is determined by the second large model, and second table data is filtered from the target table data based on the second confidence threshold, and an answer to the query question is generated based on the second table data, wherein the second confidence threshold is less than the first confidence threshold.
11. The table search question answering method according to claim 10, characterized in that: The retrieval question-answering method for a table further includes: Determine a target ratio of third table data having a confidence level greater than a third confidence threshold in the target table data; When the target proportion is greater than or equal to a first proportion threshold, determining that information redundancy exists in the target table data; When the target proportion is less than a second proportion threshold or the number of the third table data is less than a number threshold, it is determined that the target table data has information scarcity, wherein the second proportion threshold is less than the first proportion threshold.
12. The table search question answering method according to any one of claims 1 to 5, characterized in that: The step of determining target table data for answering the query question based on the retrieval strategy includes: When the search strategy indicates that a second-stage search is not to be performed, the candidate table data is determined as target table data for answering the query question.
13. A search and answer device for a table, characterized in that: The retrieval question-answering device for a table includes: a response module configured to respond to a query question input by a user, perform a first-stage search in a table database according to the query question, and obtain candidate table data for answering the query question; A first execution module is configured to perform retrieval planning based on the query question and the candidate table data through a first large model to obtain a retrieval strategy, wherein the retrieval strategy represents whether to perform a second-stage retrieval or not; A second execution module is configured to determine target table data for answering the query question based on the retrieval strategy; The third execution module is configured to generate an answer to the query question based on at least the candidate table data or the target table data through a second large model.
14. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the method according to any one of claims 1 to 12 is implemented.
15. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the method according to any one of claims 1 to 12.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Retrieval method and device based on large language model and medium
CN118277442A
Large model training method for query conversion, database query method, computer equipment and computer readable storage medium
CN120123367A
Financial intelligent question and answer method and system based on mixed retrieval and dynamic query
CN120256574A
Large language model-based data query method and apparatus, device, and storage medium
WO2025077268A1
Question-answering method and apparatus based on large language model
WO2025098195A1
Cited By
Knowledge question-answering method and device based on large model, medium, equipment and product
CN121524314A
Knowledge-based question answering methods, devices, media, equipment, and products based on large models
CN121524314B