A retrieval enhanced intelligent question answering method and system fusing complex table understanding
By integrating multiple rewriting strategies and Text2SQL technology, this approach addresses the shortcomings of existing question-answering systems in understanding user needs and handling tabular questions. It achieves a deep understanding of user queries and precise processing of tabular questions, generating reliable answers and improving the accuracy and stability of the question-answering system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING NORMAL UNIVERSITY
- Filing Date
- 2026-04-28
- Publication Date
- 2026-07-21
AI Technical Summary
Existing question-answering systems struggle to deeply understand user needs, especially when dealing with diverse and personalized queries and table-related questions, where accuracy is insufficient. Furthermore, existing methods struggle to accurately locate fields, understand cross-row and cross-column relationships, and compare values when handling table-based questions and answers.
Multiple rewriting strategies are employed to rewrite user queries, including intent recognition strategies based on entities, context, and keywords, combined with vector library retrieval and Text2SQL technology to process tabular data, thereby achieving a deep understanding of user queries and accurate processing of tabular questions.
It achieves a deep understanding of user queries, accurate retrieval of relevant documents, and precise processing of table questions, generating reliable answers and improving the efficiency and quality of information retrieval and question answering.
Smart Images

Figure CN122432293A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent question answering technology, specifically relating to a retrieval-enhanced intelligent question answering method and system that integrates complex table understanding. Background Technology
[0002] With the continuous growth of internet information volume and the increasing digitalization of various business scenarios, users urgently need comprehensive, accurate, and real-time information support in acquiring knowledge, querying rules, understanding processes, and assisting in decision-making. Given the diverse sources, complex content structures, and frequent updates of information, how to build an efficient, intelligent, and reliable question-and-answer service model, improve the efficiency and quality of information retrieval and question-and-answer responses, and help users quickly obtain and effectively utilize the information they need has become a crucial issue that urgently needs to be addressed in the field of intelligent information services.
[0003] Existing question-answering systems mostly rely on keyword matching retrieval and answering based on preset rules. This method has low accuracy and is difficult to adapt to users' complex questions. With the development of large language model technology and retrieval augmentation generation technology (RAG), people have begun to study RAG-based question-answering systems. This system uses a dense model to initially retrieve documents, uses a re-ranking model to re-rank the retrieval results, and finally uses a large language model to answer users' questions by referring to the re-ranked documents.
[0004] While existing methods have overcome the limitations of traditional retrieval methods and have initially achieved the handling of complex problems by leveraging the powerful capabilities of large models, these methods still cannot meet the diverse and personalized queries of users. Furthermore, when dealing with table-related issues, existing methods often convert tables into unstructured plain text and rely on the capabilities of large models themselves to answer table-related questions. This approach has a high error rate and is difficult to meet the requirements for data accuracy in real-world scenarios.
[0005] Existing question-answering systems mostly rely on keyword retrieval or directly call large models to answer common questions. In practical applications, this has the following limitations: (1) Limited understanding of user needs: The existing system lacks a deep understanding of user needs, making it difficult to meet the diverse and personalized inquiries of users, resulting in insufficient relevance of the responses or inaccurate responses.
[0006] (2) Limitations in table-related question and answer: Actual knowledge data often contains a large amount of structured or semi-structured table content, such as statistical data, rule lists, parameter comparisons, and business reports. However, existing systems often struggle to accurately locate fields, understand cross-row and cross-column relationships, and perform numerical comparisons and comprehensive reasoning when processing table-related questions and answers. Therefore, the accuracy and stability of answers in table-related question and answer scenarios still need to be improved. Summary of the Invention
[0007] To address the problems existing in the prior art, this invention provides a retrieval-enhanced intelligent question-answering method and system that integrates complex table understanding. It aims to achieve a deep understanding of user questions by integrating multiple rewriting strategies in the query rewriting method, thereby improving the accuracy of retrieval and answering, and to achieve accurate answers to table-related questions through table processing methods.
[0008] To achieve the above objectives, the present invention provides the following solution: A retrieval-enhanced intelligent question-answering method incorporating complex table understanding, the method comprising: Convert the raw data into a vector library; By integrating multiple rewriting strategies, user queries can be rewritten to obtain user query information; The user query information is embedded into a vector, and candidate documents are retrieved from the vector library. After rearrangement, the Top-K documents are output. The retrieved table-type documents are converted into SQL tables, and the user query information is converted into SQL query statements using Text2SQL technology. After querying the SQL tables, table reference documents are obtained. The answer content is generated based on the top-K documents output after rearrangement, the table reference document, and the user's original query.
[0009] Preferred rewriting strategies include: entity-based question decomposition strategy, context-based question disambiguation strategy, and keyword-based intent recognition strategy; Entity-based problem decomposition strategy: Extract key information of entities from the original query, and rewrite the original problem by calling the large language model based on the entity extraction results and their combination relationships. The original problem is decomposed into multiple semantically clear and well-constrained subqueries, and the retrieval and result aggregation are performed separately. Context-based question disambiguation strategy: Input historical queries and current queries into the large language model, and the large language model rewrites the current query based on the historical queries; Keyword-based intent recognition strategy: Based on preset keyword matching rules, queries are classified, and different rewriting modes are used according to the classification results: In the concept query category, the concept entity is expanded or explained; in the resource search category, the core resource needs of the user are extracted, redundant expressions are deleted, and the query is simplified; in the intent correction category, the current query is rewritten with reference to historical queries.
[0010] Preferably, the method for embedding the user query information into a vector, retrieving candidate documents from the vector library, and outputting the Top-K documents after rearrangement includes: ; in, It is a distance metric between vectors. For query vector, This is a document vector.
[0011] Preferably, the method of converting the retrieved table-type documents into SQL tables, and using Text2SQL technology to convert the user query information into SQL query statements, and then querying the SQL tables to obtain the table reference documents includes: S1. Concatenate the user query and the rewritten query, and set it as... The corresponding list of candidate documents for the table type is as follows: ; Traversal And execute S2-S5; S2. Let the table document currently being traversed be... ,Will Convert to a copy of an SQL table in a relational database ; S3, will Column names and queries Input a large model, and prompt the large model to perform the query. Converted to Query statement on If the large model judges the query and If irrelevant, then Set to NULL; S4, in Execution Obtain the execution result ,Will , , Input a large model, and receive a prompt indicating that the large model will... Turn to related and Factual statements ; where, if the execution result If empty, then For related Negative statements; S5. Factual statements replace Use this as a reference document for the table.
[0012] The present invention also provides a retrieval-enhanced intelligent question-answering system that integrates complex table understanding. The system is used to implement the aforementioned method and includes: a question-answering knowledge base module, a query rewriting module, a retrieval and reordering module, a table processing module, and a content generation module. The question-and-answer knowledge base module is used to convert the raw data into a vector library; The query rewriting module is used to integrate multiple rewriting strategies to rewrite the user's query and obtain the user's query information; The retrieval and reordering module is used to embed the user query information into a vector and retrieve candidate documents from the vector library, and output the Top-K documents after reordering. The table processing module is used to convert the retrieved table-type documents into SQL tables, and use Text2SQL technology to convert the user query information into SQL query statements, and obtain table reference documents after querying the SQL tables; The content generation module is used to generate answer content based on the top-K documents output after rearrangement, the table reference document, and the user's original query.
[0013] Preferred rewriting strategies include: entity-based question decomposition strategy, context-based question disambiguation strategy, and keyword-based intent recognition strategy; Entity-based problem decomposition strategy: Extract key information of entities from the original query, and rewrite the original problem by calling the large language model based on the entity extraction results and their combination relationships. The original problem is decomposed into multiple semantically clear and well-constrained subqueries, and the retrieval and result aggregation are performed separately. Context-based question disambiguation strategy: Input historical queries and current queries into the large language model, and the large language model rewrites the current query based on the historical queries; Keyword-based intent recognition strategy: Based on preset keyword matching rules, queries are classified, and different rewriting modes are used according to the classification results: In the concept query category, the concept entity is expanded or explained; in the resource search category, the core resource needs of the user are extracted, redundant expressions are deleted, and the query is simplified; in the intent correction category, the current query is rewritten with reference to historical queries.
[0014] Preferably, the process by which the retrieval and reordering module embeds the user query information into a vector, retrieves candidate documents from the vector library, and outputs the Top-K documents after reordering includes: ; in, It is a distance metric between vectors. For query vector, This is a document vector.
[0015] Preferably, the table processing module converts the retrieved table-type document into an SQL table, and uses Text2SQL technology to convert the user query information into an SQL query statement. The process of obtaining the table reference document after querying the SQL table includes: S1. Concatenate the user query and the rewritten query, and set it as... The corresponding list of candidate documents for the table type is as follows: ; Traversal And execute S2-S5; S2. Let the table document currently being traversed be... ,Will Convert to a copy of an SQL table in a relational database ; S3, will Column names and queries Input a large model, and prompt the large model to perform the query. Converted to Query statement on If the large model judges the query and If irrelevant, then Set to NULL; S4, in Execution Obtain the execution result ,Will , , Input a large model, and receive a prompt indicating that the large model will... Turn to related and Factual statements ; where, if the execution result If empty, then For related Negative statements; S5. Factual statements replace Use this as a reference document for the table.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention proposes a retrieval-enhanced intelligent question-answering method and system that integrates complex table understanding, encompassing data preprocessing, knowledge base construction, user query rewriting, retrieval, and answer generation. This method achieves a deep understanding of user needs through a query rewriting approach that integrates multiple rewriting strategies, rewriting the user's query into a clear and specific form, facilitating the retrieval of documents that meet the user's requirements. Furthermore, it introduces a table processing method, combined with Text2SQL technology, to achieve precise processing of table-related questions, avoiding errors introduced by directly processing tables in a large model. In summary, the question-answering method proposed in this invention can achieve a deep understanding of user queries, accurate retrieval of relevant documents, and precise processing of table-related questions, ultimately generating reliable answers for users, helping them quickly obtain and efficiently utilize effective information. Attached Figure Description
[0017] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of a retrieval enhancement intelligent question answering method that integrates complex table understanding, according to an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] Example 1 like Figure 1 As shown, this invention provides a retrieval-enhanced intelligent question-answering method that integrates complex table understanding, including: Convert the raw data into a vector library; By integrating multiple rewriting strategies, user queries can be rewritten to obtain user query information; The user query information is embedded into a vector, and candidate documents are retrieved from the vector library. After rearrangement, the Top-K documents are output. The retrieved table-type documents are converted into SQL tables, and the user query information is converted into SQL query statements using Text2SQL technology. After querying the SQL tables, table reference documents are obtained. The answer content is generated based on the top-K documents output after rearrangement, the table reference document, and the user's original query.
[0022] The specific implementation process of this invention is as follows: First, the raw data to be added to the question-and-answer system is converted into a vector library. The raw data is divided into two categories: tabular data and non-tabular data.
[0023] For tabular data, in order to avoid formatting issues caused by directly extracting table objects, the table file is converted to a PDF file and OCR technology is used to extract the core content of the table. Then, a large model is used to repair the extracted content and output it as a Markdown file for saving, thus avoiding errors when extracting complex tables. Non-tabular data comes in two forms: PDF files and HTML web page files. For PDF files, OCR technology is used to extract the text content. For HTML files, rule-based data cleaning and annotation are performed, including: file-level deduplication, word-level n-gram deduplication, HTML element filtering, web page source annotation, and web page title extraction.
[0024] After the above processing, the initial text-formatted data was obtained. Next, the non-table data was divided into blocks using a 512-character window size and a 128-character stride. The block-formed non-table data and Markdown-formatted table data were then input into Qwen3-Embedding-8B (a multilingual text embedding model), outputting embedded vectors. Metadata for each vector was simultaneously saved, including the original file source, whether it is table data, and the original filename / path. Finally, the FAISS library was used to save these vectors into a vector library for subsequent retrieval.
[0025] Furthermore, in practical applications, user queries may be varied in form, brief, or ambiguous, and may require understanding in conjunction with historical queries within the current session. Therefore, query rewriting is necessary to deeply understand user needs and rewrite the user's query into a clear and specific form, facilitating subsequent retrieval and generation. However, existing query rewriting methods often employ only a single rewriting strategy and do not fully adapt to real-world question-answering scenarios. For example, simply providing a general model to concretize the user query is insufficient for handling highly abstract and diverse user queries. To address this issue, this invention proposes a query rewriting method that integrates multiple rewriting strategies, including an entity-based question decomposition strategy, a context-based question disambiguation strategy, and a keyword-based intent recognition strategy.
[0026] Entity-Based Question Decomposition Strategy: In question-answering scenarios, complex questions involving multiple entity constraints such as time, location, object, category, and attribute are common, especially in tasks like data querying, condition filtering, indicator comparison, and fact retrieval. For such questions, key information is usually composed of multiple entities. When a question contains many entities or has multiple entity combinations, directly using the original query for retrieval often fails to effectively recall target documents that simultaneously meet all constraints, thus affecting the accuracy and completeness of subsequent question-answering results. Therefore, it is necessary to design a specialized query rewriting and decomposition strategy for such questions. Specifically, first, key information such as time, location, topic, category, or attribute entities is extracted from the original question. This process is completed by writing entity extraction prompts to suggest large language models. Then, based on the entity extraction results and their combinations, the large language model is invoked to rewrite the original question, decomposing it into multiple semantically clear and well-constrained subqueries, and performing retrieval and result aggregation for each subquery. For example, for the question "GDP and CPI data for a certain city in 2023 and 2024", we can extract the time entities 2023 and 2024, the location entity "a certain city", and the theme or category entities GDP and CPI. This allows us to rewrite the query into multiple sub-questions such as "2023 GDP of a certain city", "2024 GDP of a certain city", "2023 CPI of a certain city", and "2024 CPI of a certain city". This approach reduces the difficulty of complex queries and improves information recall and question-answering accuracy in scenarios with multiple conditions.
[0027] Context-based question disambiguation strategy: In a single question-and-answer session, a user may input multiple questions, which may be consecutive and could lead to ambiguity if considered individually. Furthermore, some relevant information is hidden in previous queries; retrieving only the current query makes it difficult to recall relevant documents. Therefore, it's necessary to consider the context of the current query (historical queries) for rewriting. For example, given the historical query "Well-known companies in a certain city?" and the current query "Changes in the number of SMEs in the local area in the past two years?", retrieving only the current query will retrieve information on SMEs in various regions, making it difficult to recall data specific to the user's interest in a particular city. Moreover, during the answer generation stage, relying solely on the current query cannot accurately reveal the user's intent. This rewriting strategy inputs both historical and current queries into a large model and prompts the model to rewrite the current query based on the historical queries, thus accurately capturing the user's query intent.
[0028] Keyword-based Intent Recognition and Rewriting Strategy: In question-and-answer scenarios, user intents are complex and diverse, often requiring different rewriting modes. This invention categorizes user intents into three main types: concept queries, resource searches, and intent correction. Concept queries refer to users seeking explanations of concepts, such as "What is Gross Regional Product?". Resource searches refer to users seeking information related to actual resources (including documents and data), such as "What are the important education-related documents in my country this year?". Intent correction refers to users expressing dissatisfaction with past answers or search results, indicating a need for a re-search or re-answer in the current query, such as "I'm asking about the 2024 college entrance examination policy, not this year's!". Intent recognition is achieved through preset keyword matching rules. For example, queries containing keywords such as "what is," "explain," or "describe" belong to the concept query category; queries containing keywords such as "search," "relevant," or "source" belong to the resource search category. In this rewriting strategy, queries are first categorized based on the keyword matching rules mentioned above, and then different rewriting modes are used according to different categories: in the concept query category, it is necessary to expand or explain the concept entity; in the resource search category, it is necessary to extract the user's core resource needs through regular expression matching, delete redundant expressions, and simplify the query; the intent correction category is similar to "context-based question disambiguation", which refers to historical queries to rewrite the current query.
[0029] Furthermore, based on the user's query and the rewritten query, documents are retrieved from the vector library, and after processing by the re-ranking model, the Top-K documents are returned for reference in subsequent content generation. Specifically, the original query and the rewritten query are first input into Qwen3-Embedding-8B, and the model outputs multiple embedded query vectors, with the number of query vectors set to M. Then, the M query vectors are used to search for the closest matching documents in the vector library. For each document vector, the search algorithm uses the Nearest Neighbor (ANN) algorithm, and the distance between vectors is measured using cosine similarity, i.e.: in, For query vector, The document vector is used; the search process is implemented using the FAISS library, and finally returns MN documents; then the search results of the M queries are re-sorted using Qwen3-Reranker-8B, and the top-K documents of each query are taken, and finally MK documents are returned as the final reference documents.
[0030] Furthermore, in real-world question-answering scenarios, vector libraries often contain a large amount of tabular data. This type of data typically carries key information that users are concerned with, such as statistical indicators, parameter information, business lists, rule constraints, and comparison results. Question answering for tabular data often involves field location, conditional filtering, numerical comparison, and aggregation operations such as summation, averaging, and counting. However, large language models are mainly trained on one-dimensional unstructured text, and their ability to model the two-dimensional structure and row-column relationships of tables is relatively limited. Therefore, it is difficult to accurately locate cell content relevant to the user's query, and it is also difficult to reliably complete multi-condition association understanding and various structured calculation operations. Based on this, it is necessary to introduce specialized table processing methods to independently parse, structure, and perform targeted question-answering for tabular documents, thereby improving the accuracy and reliability of the system in tabular question-answering scenarios.
[0031] In the previous steps, the original tabular data was converted into Markdown plain text format, and whether a document is a tabular document was recorded in the metadata of each document. Before submitting the reference documents to the large model to generate answers, this step first checks whether there are tabular documents among the candidate documents corresponding to each query. If there are tabular documents, each query is processed according to the following process: S1. Concatenate the user query and the rewritten query, and set it as... The corresponding list of candidate documents for the table type is as follows: ; Traversal And execute S2-S5; S2. Let the table document currently being traversed be... Using SQLite Convert to a copy of an SQL table in a relational database ; S3, will Column names and queries Input a large model, and prompt the large model to perform the query. Converted to Query statement on If the large model judges the query and If irrelevant, then Set to NULL; S4, in Execution Obtain the execution result ,Will , , Input a large model, and receive a prompt indicating that the large model will... Turn to related and Factual statements ; where, if the execution result If empty, then For related Negative statements; S5. Factual statements replace Use this as a reference document for the table.
[0032] After this step, the originally lengthy and complex table document is transformed into a query-related statement. This statement retains only the query-related information in the table and completes the aggregation operation with the help of the SQL query engine, avoiding the direct processing of the table by the large model.
[0033] In S2, relational database is a specific term for a database format; it is an abstract concept, not a concrete entity, and refers to... Convert to a relational database table format and store as .
[0034] Furthermore, answers are generated based on reference documents and the user's original question. Specifically, the list of reference documents obtained through retrieval, reordering, and table processing, along with the user's original question, is fed into a large model to generate the answer content.
[0035] In summary, this invention proposes a retrieval-enhanced intelligent question-answering method that integrates complex table understanding, encompassing data preprocessing, knowledge base construction, user query rewriting, retrieval, and answer generation. This method achieves a deep understanding of user needs through a query rewriting approach that integrates multiple rewriting strategies, rewriting user questions into a clear and specific form to facilitate the retrieval of documents that meet user requirements. Furthermore, it introduces a table processing method combined with Text2SQL technology to achieve precise processing of table-related questions, avoiding errors introduced by direct table processing in large models. In conclusion, the question-answering method proposed in this invention can achieve a deep understanding of user queries, accurate retrieval of relevant documents, and precise processing of table-related questions, ultimately generating reliable answers for users and helping them quickly obtain and efficiently utilize effective information.
[0036] Example 2 Based on the same inventive concept, the present invention also provides a retrieval-enhanced intelligent question-answering system that integrates complex table understanding, for implementing the methods described in the foregoing embodiments. The system includes: a question-answering knowledge base module, a query rewriting module, a retrieval and reordering module, a table processing module, and a content generation module. The question-and-answer knowledge base module is used to convert the raw data into a vector library; The query rewriting module is used to integrate multiple rewriting strategies to rewrite the user's query and obtain the user's query information; The retrieval and reordering module is used to embed the user query information into a vector and retrieve candidate documents from the vector library, and output the Top-K documents after reordering. The table processing module is used to convert the retrieved table-type documents into SQL tables, and use Text2SQL technology to convert the user query information into SQL query statements, and obtain table reference documents after querying the SQL tables; The content generation module is used to generate answer content based on the top-K documents output after rearrangement, the table reference document, and the user's original query.
[0037] Furthermore, in this embodiment, the various rewriting strategies include: entity-based question decomposition strategy, context-based question disambiguation strategy, and keyword-based intent recognition strategy; Entity-based problem decomposition strategy: Extract key information of entities from the original query, and rewrite the original problem by calling the large language model based on the entity extraction results and their combination relationships. The original problem is decomposed into multiple semantically clear and well-constrained subqueries, and the retrieval and result aggregation are performed separately. Context-based question disambiguation strategy: Input historical queries and current queries into the large language model, and the large language model rewrites the current query based on the historical queries; Keyword-based intent recognition strategy: Based on preset keyword matching rules, queries are classified, and different rewriting modes are used according to the classification results: In the concept query category, the concept entity is expanded or explained; in the resource search category, the core resource needs of the user are extracted, redundant expressions are deleted, and the query is simplified; in the intent correction category, the current query is rewritten with reference to historical queries.
[0038] Furthermore, in this embodiment, the process by which the retrieval and reordering module embeds the user query information into a vector and retrieves candidate documents from the vector library, and outputs the Top-K documents after reordering includes: ; in, It is a distance metric between vectors. For query vector, This is a document vector.
[0039] Furthermore, in this embodiment, the table processing module converts the retrieved table-type document into an SQL table, and uses Text2SQL technology to convert the user query information into an SQL query statement. The process of obtaining the table reference document after querying the SQL table includes: S1. Concatenate the user query and the rewritten query, and set it as... The corresponding list of candidate documents for the table type is as follows: ; Traversal And execute S2-S5; S2. Let the table document currently being traversed be... ,Will Convert to a copy of an SQL table in a relational database ; S3, will Column names and queries Input a large model, and prompt the large model to perform the query. Converted to Query statement on If the large model judges the query and If irrelevant, then Set to NULL; S4, in Execution Obtain the execution result ,Will , , Input a large model, and receive a prompt indicating that the large model will... Turn to related and Factual statements ; where, if the execution result If empty, then For related Negative statements; S5. Factual statements replace Use this as a reference document for the table.
[0040] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A retrieval-enhanced intelligent question-answering method integrating complex table understanding, characterized in that, The method includes: Convert the raw data into a vector library; By integrating multiple rewriting strategies, user queries can be rewritten to obtain user query information; The user query information is embedded into a vector, and candidate documents are retrieved from the vector library. After rearrangement, the Top-K documents are output. The retrieved table-type documents are converted into SQL tables, and the user query information is converted into SQL query statements using Text2SQL technology. After querying the SQL tables, table reference documents are obtained. The answer content is generated based on the top-K documents output after rearrangement, the table reference document, and the user's original query.
2. The method according to claim 1, characterized in that, Multiple rewriting strategies include: entity-based question decomposition strategy, context-based question disambiguation strategy, and keyword-based intent recognition strategy; Entity-based problem decomposition strategy: Extract key information of entities from the original query, and rewrite the original problem by calling the large language model based on the entity extraction results and their combination relationships. The original problem is decomposed into multiple semantically clear and well-constrained subqueries, and the retrieval and result aggregation are performed separately. Context-based question disambiguation strategy: Input historical queries and current queries into the large language model, and the large language model rewrites the current query based on the historical queries; Keyword-based intent recognition strategy: Based on preset keyword matching rules, queries are classified, and different rewriting modes are used according to the classification results: In the concept query category, the concept entity is expanded or explained; in the resource search category, the core resource needs of the user are extracted, redundant expressions are deleted, and the query is simplified; in the intent correction category, the current query is rewritten with reference to historical queries.
3. The method according to claim 1, characterized in that, The method for embedding the user query information into a vector, retrieving candidate documents from the vector library, and outputting the Top-K documents after rearrangement includes: ; in, A distance metric between vectors. For query vector, This is a document vector.
4. The method according to claim 1, characterized in that, The method of converting the retrieved table-type documents into SQL tables, using Text2SQL technology to convert the user query information into SQL query statements, and then querying the SQL tables to obtain table reference documents includes: S1. Concatenate the user query and the rewritten query, and set it as... The corresponding list of candidate documents for the table type is as follows: ; Traversal And execute S2-S5; S2. Let the table document currently being traversed be... ,Will Convert to a copy of an SQL table in a relational database ; S3, will Column names and queries Input a large model, and prompt the large model to perform the query. Converted to Query statement on If the large model judges the query and If irrelevant, then Set to NULL; S4, in Execution Obtain the execution result ,Will , , Input a large model, and receive a prompt indicating that the large model will... Turn to related and Factual statements ; where, if the execution result If empty, then For related Negative statements; S5. Factual statements replace Use this as a reference document for the table.
5. A retrieval-enhanced intelligent question-answering system integrating complex table understanding, the system being used to implement the method described in any one of claims 1-4, characterized in that, The system includes: a question-and-answer knowledge base module, a query rewriting module, a retrieval and reordering module, a table processing module, and a content generation module; The question-and-answer knowledge base module is used to convert the raw data into a vector library; The query rewriting module is used to integrate multiple rewriting strategies to rewrite the user's query and obtain the user's query information; The retrieval and reordering module is used to embed the user query information into a vector and retrieve candidate documents from the vector library, and output the Top-K documents after reordering. The table processing module is used to convert the retrieved table-type documents into SQL tables, and use Text2SQL technology to convert the user query information into SQL query statements, and obtain table reference documents after querying the SQL tables; The content generation module is used to generate answer content based on the top-K documents output after rearrangement, the table reference document, and the user's original query.
6. The system according to claim 5, characterized in that, Multiple rewriting strategies include: entity-based question decomposition strategy, context-based question disambiguation strategy, and keyword-based intent recognition strategy; Entity-based problem decomposition strategy: Extract key information of entities from the original query, and rewrite the original problem by calling the large language model based on the entity extraction results and their combination relationships. The original problem is decomposed into multiple semantically clear and well-constrained subqueries, and the retrieval and result aggregation are performed separately. Context-based question disambiguation strategy: Input historical queries and current queries into the large language model, and the large language model rewrites the current query based on the historical queries; Keyword-based intent recognition strategy: Based on preset keyword matching rules, queries are classified, and different rewriting modes are used according to the classification results: In the concept query category, the concept entity is expanded or explained; in the resource search category, the core resource needs of the user are extracted, redundant expressions are deleted, and the query is simplified; in the intent correction category, the current query is rewritten with reference to historical queries.
7. The system according to claim 5, characterized in that, The process by which the retrieval and reordering module embeds the user query information into a vector, retrieves candidate documents from the vector library, and outputs the Top-K documents after reordering includes: ; in, It is a distance metric between vectors. For query vector, This is a document vector.
8. The system according to claim 5, characterized in that, The table processing module converts the retrieved table-type documents into SQL tables, and uses Text2SQL technology to convert the user query information into SQL query statements. The process of obtaining the table reference document after querying the SQL table includes: S1. Concatenate the user query and the rewritten query, and set it as... The corresponding list of candidate documents for the table type is as follows: ; Traversal And execute S2-S5; S2. Let the table document currently being traversed be... ,Will Convert to a copy of an SQL table in a relational database ; S3, will Column names and queries Input a large model, and prompt the large model to perform the query. Converted to Query statement on If the large model judges the query and If irrelevant, then Set to NULL; S4, in Execution Obtain the execution result ,Will , , Input a large model, and receive a prompt indicating that the large model will... Turn to related and Factual statements ; where, if the execution result If empty, then For related Negative statements; S5. Factual statements replace Use this as a reference document for the table.