Knowledge question and answer library agent construction method and system

By constructing a multimodal information extraction agent and an adaptive knowledge graph agent, the problems of insufficient understanding and lack of multimodal processing in enterprise knowledge bases are solved, realizing dynamic knowledge management and interpretability of answers, and improving the accuracy and reliability of question answering systems.

CN121543679APending Publication Date: 2026-02-17BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202511584776.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing technologies for enterprise knowledge bases suffer from limitations such as limited comprehension capabilities, knowledge silos, slow updates to static knowledge bases, lack of multimodal processing, and uninterpretable answers, resulting in low accuracy, poor traceability, and weak interpretability of answers.

Method used

A multimodal information extraction agent, an adaptive knowledge graph construction agent, and a query analysis agent are constructed. Through preset document parsers, optical character recognition, table recognition, named entity recognition, graph neural networks, and large language models, the knowledge graph is dynamically constructed and optimized to generate interpretable answers.

Benefits of technology

It achieves dynamic knowledge management, precise semantic parsing, and multimodal information utilization, enhancing the question-answering system's deep understanding capabilities and the interpretability of answers, making it suitable for highly reliable question answering in professional fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543679A_ABST
    Figure CN121543679A_ABST
Patent Text Reader

Abstract

The invention provides a knowledge question and answer library agent construction method and system. Efficient knowledge management and question and answer are achieved through cooperation of multiple agents. According to the system, firstly, a multi-modal information extraction agent is constructed, and heterogeneous data such as texts, images and tables are converted into structured vectors and stored; meanwhile, the knowledge graph is dynamically constructed and continuously optimized by the self-adaptive knowledge graph construction agent, and a new relationship is derived through combination of symbolic logic and a graph neural network, so that an evolvable knowledge network is formed. In the question and answer stage, a query analysis agent deeply analyzes the intention of a user and generates sub-queries; retrieving the vector library and the knowledge graph in parallel by the retrieval enhancement generation agent; and the reasoning and synthesizing agent integrates multi-source information and generates an accurate answer with a complete source label through a large language model. Dynamic knowledge management, precise semantic analysis and system self-evolution are achieved, and the method is particularly suitable for professional field scenes needing high-reliability questions and answers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data retrieval technology, and in particular to a method and system for constructing a knowledge question-answering database intelligent agent. Background Technology

[0002] Currently, enterprise knowledge bases are experiencing explosive growth, encompassing multimodal data such as product manuals, technical documents, and customer service minutes. Retrieval solutions primarily rely on keyword searches or direct responses from single large language models. Traditional keyword searches and simple question-and-answer systems suffer from several bottlenecks: 1) Limited comprehension capabilities: Traditional natural language processing systems struggle to deeply understand the complex intent and context of user queries. 2) Knowledge silos: Knowledge is often scattered across documents in different formats and systems, lacking effective integration and association. 3) Static knowledge bases: Most systems rely on pre-built, static knowledge graphs or databases, making it difficult to handle scenarios with rapid knowledge updates and resulting in high maintenance costs. 4) Unexplainable answers: Systems often provide answers directly without offering reasoning or sources, leading to low user trust, especially in specialized fields. 5) Lack of multimodal processing: Existing technologies are mostly limited to text, lacking effective extraction and utilization capabilities for common information in knowledge bases such as tables, images, and charts.

[0003] In summary, existing technologies suffer from five major defects: shallow understanding, weak integration, slow updates, lack of interpretability, and lack of multimodal capabilities. There is an urgent need for a new solution that can automatically extract multimodal information, dynamically evolve the graph, and collaborate with large models to perform interpretable reasoning, so as to achieve accurate, reliable, and traceable intelligent question answering for enterprise-level knowledge bases. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method and system for constructing a knowledge question-answering base agent, in order to eliminate or improve one or more defects existing in the prior art, and solve the problems of low answer accuracy, poor traceability and weak interpretability caused by insufficient multimodal knowledge fusion, lagging graph updates and large model illusion in existing question-answering systems.

[0005] One aspect of the present invention provides a method for constructing a knowledge question-answering base intelligent agent, the method comprising the following steps: A multimodal information extraction agent is constructed to acquire multi-source heterogeneous data including text data, image data, and table data; the text data is processed based on a preset document parser, the image data is processed based on optical character recognition, and the table data is processed based on a table recognizer to extract text and process it into structured text fragments; a high-dimensional vector representation is extracted from the text fragments based on a preset language model, and a vector storage subsystem is used to store the high-dimensional vector representation and build an index to support fast similarity retrieval; An adaptive knowledge graph is constructed to build an intelligent agent, which is used to extract key entities from the text fragments based on named entity recognition and extract attributes and relationships, and initialize the knowledge graph based on the key entities, attributes and relationships; new relationships are derived from the knowledge graph based on preset inference rules based on symbolic logic and preset graph neural networks based on representation learning and the knowledge graph is expanded; the strength and structure of the relationships in the knowledge graph are adjusted based on user feedback; A query analysis intelligent agent is constructed to receive user query questions and extract the original query in text form. Based on a first preset large language model, the original query is parsed to obtain the key entities, query attributes and implicit conditions, and one or more sub-queries are constructed. A retrieval enhancement generation agent is constructed to perform parallel retrieval of the vector storage subsystem and the knowledge graph based on the subquery, so as to obtain retrieval results containing candidate text fragments and knowledge subgraphs most relevant to the subquery, and to re-extract key information from the retrieval results to form enhanced retrieval results; A reasoning and synthesis agent is constructed to input the enhanced retrieval results from the multimodal model into a second preset large language model for comparison, reasoning, and synthesis to generate answers, and to annotate the source of each information fragment in the answer.

[0006] In some embodiments, the adaptive knowledge graph construction agent is further configured to perform structural consistency checks, logical consistency checks, and factual consistency checks on the knowledge graph; the structural consistency check includes type constraint checks and attribute uniqueness checks for the attributes, as well as relation integrity checks for the relations to which the relations point. The logical consistency check includes contradiction detection, transitive relation verification, and conflict detection between negation relations; The factual consistency check includes comparison with the source documents and performing cross-validation of multi-source data; The adaptive knowledge graph construction agent is also used to perform quality control on the knowledge graph. The quality control includes correction operations based on automated detection results or manual review feedback results. The automated detection results and the manual review feedback results include entity recognition accuracy, relation extraction accuracy, and graph coverage for the key entities and the relations.

[0007] In some embodiments, the method further includes: constructing a verification and reflection agent for performing consistency checks between the answer and the candidate text fragments and the knowledge subgraph, and performing illusion filtering on errors and false content.

[0008] In some embodiments, the method further includes: A continuous learning and feedback optimization agent is constructed to collect user feedback on the answers, including explicit feedback that directly expresses the evaluation results and implicit feedback obtained by monitoring subsequent behaviors; it is also used to generate quality evaluation results for the answers based on BLEU or ROUGE metrics; based on the feedback and the quality evaluation results, it labels the results of unanswered or poor-quality answers and adds the corresponding question queries to a self-learning queue; it labels the question queries with type, domain, complexity, and priority, and manually labels the correct answers; The correct answer or the answer obtained by the retrieval-enhanced intelligent agent for the question query in the self-learning queue according to the priority is used as training samples to fine-tune the second preset large language model and update the knowledge graph.

[0009] In some embodiments, the preset document parser includes a PyMuPDF parser for PDF format text data, a python-docx parser for Word format text data, a BeautifulSoup parser for HTML format text data, and a python-pptx parser for PPT text format; the table recognizer uses the TabNet table recognizer; and the vector storage subsystem uses the FAISS system.

[0010] In some embodiments, the adaptive knowledge graph construction agent uses the BERT model to perform named entity recognition and uses dependency parsing to extract the relations; the first large language model uses ChatGLM or Qwen series large language models, and the second large language model also uses ChatGLM or Qwen series large language models.

[0011] In some embodiments, a preset inference rule based on symbolic logic and a preset graph neural network based on representation learning derive new relations from the knowledge graph and expand the knowledge graph, including: The association rule mining engine AMIE is used to perform symbolic rule reasoning, and the GraIL graph neural network is used to find new relationships for the knowledge graph and expand the knowledge graph.

[0012] On the other hand, the present invention also provides a knowledge question answering base intelligent agent construction system, including a processor, a memory, and a computer program or instructions stored in the memory. The processor is used to execute the computer program / instructions, and when the computer program or instructions are executed, the system implements the steps of the above method.

[0013] On the other hand, the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0014] On the other hand, the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0015] The knowledge question-answering database intelligent agent construction method and system described in this invention constructs a multimodal information extraction intelligent agent capable of parsing heterogeneous data such as text, images, and tables, transforming them into structured text fragments, and generating vectorized representations stored in a retrieval database. Simultaneously, an adaptive knowledge graph construction intelligent agent dynamically constructs and continuously optimizes the knowledge graph using entity recognition and relation extraction technologies, deriving new relationships through a combination of symbolic logic and graph neural networks to form an evolvable knowledge network. In the question-answering stage, the query analysis intelligent agent deeply analyzes user intent and generates subqueries; the retrieval enhancement generation intelligent agent searches the vector database and knowledge graph in parallel to obtain the most relevant information; finally, the reasoning and synthesis intelligent agent integrates multi-source information and generates accurate answers with complete source annotations through a large language model. This solution effectively solves the bottlenecks of traditional question-answering systems in deep understanding, multimodal fusion, knowledge updating, and answer interpretability, achieving dynamic knowledge management, accurate semantic parsing, multimodal information utilization, and system self-evolution. It is particularly suitable for professional domain scenarios requiring highly reliable question answering.

[0016] Furthermore, by constructing a verification and reflection agent, the generated answers can be optimized, thereby improving the quality of search results.

[0017] Furthermore, by constructing a continuously learning and feedback-optimized agent, it can adaptively absorb new knowledge and strengthen the connections between frequently used knowledge. Through feedback loops, the system can continuously optimize its performance, forming a positive feedback loop where it becomes smarter with use.

[0018] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the text, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.

[0019] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings: Figure 1This is a flowchart illustrating the knowledge question-answering base intelligent agent construction method according to an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the knowledge question-answering base intelligent agent construction system according to another embodiment of the present invention.

[0022] Figure 3 This is a schematic diagram of the query process of the knowledge question-answering base intelligent agent construction system according to another embodiment of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0024] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0025] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0026] Knowledge-based question-answering systems based on traditional natural language processing technologies generally suffer from the following limitations: First, these systems rely heavily on keyword matching and static knowledge graphs, exhibiting weak semantic understanding and contextual reasoning capabilities for user queries, making it difficult to interpret complex intents. Second, knowledge is often isolated, with multi-source data scattered across different formats and systems lacking effective fusion mechanisms, particularly in the extraction and utilization of non-textual information such as tables and charts. Third, knowledge base updates and maintenance depend on manual intervention, making it difficult to adapt to rapidly iterating real-world application scenarios, resulting in poor timeliness and high maintenance costs. Fourth, answers generated by existing methods often lack interpretability, failing to provide reasoning basis and source citations, severely impacting user trust in professional fields. Although large language models excel in text generation, their inherent "illusion" problem and insufficient coverage of new knowledge make them difficult to directly and reliably apply to enterprise-level knowledge services. Therefore, breakthroughs are urgently needed to overcome the technical bottlenecks of combining multimodal information integration, dynamic knowledge evolution, and interpretable reasoning.

[0027] In view of this, the present invention provides a method for constructing a knowledge question-answering base intelligent agent, such as... Figure 1 As shown, the method includes the following steps S101~S105: Step S101: Construct a multimodal information extraction agent to acquire multi-source heterogeneous data including text data, image data, and table data; process text data based on a preset document parser, process image data based on optical character recognition, and process table data based on a table recognizer to extract text and process it into structured text fragments; extract high-dimensional vector representations of text fragments based on a preset language model, and use a vector storage subsystem to store the high-dimensional vector representations and build an index to support fast similarity retrieval.

[0028] Step S102: Construct an adaptive knowledge graph intelligent agent to extract key entities from text fragments based on named entity recognition and extract attributes and relationships, and initialize the knowledge graph based on key entities, attributes and relationships; derive new relationships from the knowledge graph and expand the knowledge graph based on preset inference rules based on symbolic logic and preset graph neural networks based on representation learning; adjust the relationship strength and structure in the knowledge graph based on user feedback.

[0029] Step S103: Construct a query analysis agent to receive user queries and extract the original query in text form. Based on the first preset large language model, parse the original query to obtain the key entities, query attributes and implicit conditions, and construct one or more sub-queries.

[0030] Step S104: Construct a retrieval enhancement generation agent to retrieve the vector storage subsystem and knowledge graph in parallel based on the subquery, so as to obtain retrieval results containing the candidate text fragments most relevant to the subquery and the knowledge subgraph, and re-extract key information from the retrieval results to form enhanced retrieval results.

[0031] Step S105: Construct a reasoning and synthesis agent to input the enhanced multimodal retrieval results into the second preset large language model for comparison, reasoning and synthesis to generate answers, and to annotate the source of each information fragment in the answer.

[0032] Step S101 aims to transform multi-source, heterogeneous raw data into structured, searchable knowledge fragments. Multi-source data refers to datasets from different channels, formats, and scenarios. Its core value lies in improving the comprehensiveness of analysis or application by integrating multi-dimensional information. Specifically, it can be divided into four categories: First, business operation data, which is directly generated from the daily business processes of enterprises, including e-commerce orders, APP user behavior, internal inventory management, and other data; second, public and third-party data, which is released by external institutions or platforms, covering government data from the National Bureau of Statistics, industry reports from iResearch Consulting, and POIs from map platforms; third, data collected by sensing devices, which captures the state of the physical world in real time through hardware devices, such as temperature and humidity data from IoT devices, audio and video data from surveillance cameras, and heart rate data from wearable devices; and fourth, user-generated data (UGC), which is created and published voluntarily by users and is mostly unstructured information, including social media comments, original content from short video platforms, and player guides in games.

[0033] In this application, text data may include formats such as PDF, HTML, or Word; image data may include formats such as JPEG or PNG; and tabular data may include formats such as Excel or CSV. The PyMuPDF library is used to parse PDF files, the python-docx library to parse Word documents, or BeautifulSoup to parse HTML pages. Image data can be processed using optical character recognition technology, employing advanced OCR models such as DeepOCR. Tabular data uses specialized models like TabNet to recognize the row and column structure of the table.

[0034] The extracted text information is still raw and needs further integration and formatting. All extracted text is cleaned, denoised, and segmented into standardized text fragments, such as sentences or paragraphs, completing the structured processing. To support semantic-level similarity retrieval, a pre-trained language model is needed to transform each text fragment into a high-dimensional vector representation; specifically, the BERT model can be used.

[0035] All generated high-dimensional vectors are stored in the FAISS vector storage subsystem, forming a vector database. This subsystem indexes these vectors, for example, using inverted indexes or HNSW graph indexes, to support nearest neighbor searches of large-scale vectors within milliseconds, thus supporting subsequent fast semantic retrieval.

[0036] The purpose of step S102 is to construct a self-evolving and dynamically growing knowledge graph from structured text. Named entity recognition technology, using sequence labeling models such as BERT, is employed to process structured text fragments or their vector representations. This identifies key entity sets in the text, such as people, locations, and product models. Based on the identified entities, relation extraction algorithms are used to identify relationships between entities, such as rules based on dependency parsing. The identified entities are then used as nodes, and the relationships as edges to initialize the knowledge graph.

[0037] Furthermore, the reasoning and expansion of the knowledge graph can be performed in two ways. First, symbolic logic-based reasoning can be employed, using pre-defined symbolic logic reasoning principles to mine new relationships between entities from existing knowledge. Specifically, algorithms like AMIE+ can be used. Second, representation learning-based reasoning can be used, employing pre-defined graph neural network models. For example, RGCN or CompGCN can be used to learn vector representations of entities and relationships, and then operations on these vector representations can be used to predict potential new relationships between entities. Alternatively, models like GraIL can be used to infer relationships by extracting and analyzing the local subgraph structure between two entities. After completing the relationship reasoning, the newly mined relationships are injected into the current knowledge graph, achieving automated graph expansion.

[0038] Among them, the AMIE+ algorithm is a high-efficiency rule mining algorithm for large-scale knowledge graphs. Its core function is to automatically mine high-confidence logical rules from entity-relation triples in the knowledge graph to supplement missing information, detect data errors, and support reasoning tasks. Its principles revolve around efficient mining and quality control. On the one hand, it adopts a bottom-up rule generation strategy, starting with short rules and gradually expanding their length. It also uses pruning strategies to filter out redundant or low-potential candidate rules, such as removing rules with confidence levels below a threshold in advance, significantly reducing computational costs. On the other hand, it introduces a confidence evaluation mechanism, combining the number of supporting instances and conflicting instances of a rule in the knowledge graph to quantify the reliability of the rule, ensuring that the finally mined rules effectively reflect the implicit relationships in the knowledge graph.

[0039] Furthermore, this application dynamically adjusts the relationship strength or node connection structure in the knowledge graph based on users' historical queries and direct feedback, making the graph more aligned with users' actual needs and usage patterns.

[0040] Furthermore, the adaptive knowledge graph construction agent also performs verification and quality control, regularly executing consistency check algorithms and quality control processes to ensure the accuracy and consistency of the graph information, ultimately outputting a verified, high-quality knowledge graph.

[0041] Specifically, the adaptive knowledge graph construction agent is also used to perform structural consistency checks, logical consistency checks, and factual consistency checks on the knowledge graph; the structural consistency check includes type constraint checks and attribute uniqueness checks for attributes, as well as relation integrity checks for relation pointers.

[0042] Logical consistency checks include contradiction detection, transitive relation verification, and conflict detection between negation relations.

[0043] Fact consistency checks include comparing the data with the source documents and performing cross-validation of multi-source data.

[0044] The adaptive knowledge graph construction agent's quality control process for the knowledge graph includes correction operations based on automated detection results or manual review feedback results. The automated detection results and manual review feedback results include entity recognition accuracy, relation extraction accuracy, and graph coverage for key entities and relations.

[0045] Step S103 is responsible for accurately understanding the deep intent of the user's query, preparing for subsequent retrieval and reasoning. The agent receives the user's original natural language query. Subsequently, it uses a first preset large language model to perform deep semantic parsing on the query. The first preset large language model can be a BERT-based model. Specifically, it uses models such as ChatGLM3-6B, Qwen-7B-Chat, Baichuan2-7B-Chat, or Llama-2-13B-chat, combined with specific guiding words, to generate subqueries from the original query. The model will identify key entities, query attributes, query types (such as factual or comparative), and implicit conditions (such as time range or quantity restrictions) in the query.

[0046] Based on the results of deep parsing, the agent decomposes or reconstructs complex original queries into one or more more precise and specific subqueries. For example, the query "What is the maximum memory and power consumption of server A?" may be decomposed into two subqueries: "Maximum memory of server A" and "Fully configured power consumption of server A", in order to perform targeted retrieval.

[0047] Step S104 aims to efficiently collect and provide the most relevant and richest contextual information for answer generation. For each subquery generated by the query analysis agent, searches are performed in parallel across two major knowledge sources. In the vector storage subsystem, a semantic similarity algorithm (such as cosine similarity) is used to search for candidate text fragments that are most semantically relevant to the subquery. In the dynamic knowledge graph, neighboring nodes, attributes, and relationships directly related to entities in the subquery are extracted to form a local knowledge subgraph.

[0048] The original search results may contain redundant information. Therefore, the system performs secondary processing to extract and condense key information, forming enhanced search results with higher information density and more focused context, providing optimal contextual material for the synthesis of the final answer.

[0049] Step S105 is responsible for integrating all information to generate an accurate, coherent, and traceable final answer. Enhanced search results, including relevant text fragments and knowledge subgraphs, are combined into a complete, multimodal contextual hint. This context, along with the user's original query or subquery, is then input into a second pre-defined large language model, such as a powerful generative model like GPT-4, ChatGLM, or Qwen. Through specific hint word engineering, the instruction model performs comparison, induction, and logical reasoning based on the provided context, ultimately synthesizing a coherent, accurate, and complete answer. Simultaneously, the system mandates that the large language model explicitly annotate the source of each key information fragment in the answer. Source information (e.g., which page of which document it originates from, or which relation path in the knowledge graph) is appended as metadata to the answer. This mechanism greatly enhances the interpretability of the answer and user credibility.

[0050] In some embodiments, the method further includes step S106: constructing a verification and reflection agent for performing consistency checks between the answer and candidate text fragments and knowledge subgraphs, and for performing illusion filtering on errors and false content.

[0051] The verification and reflection agent first performs an answer consistency check. Using a pre-set consistency check algorithm (such as semantic similarity calculation or logical rule matching), it rigorously compares the final answer generated by the reasoning and synthesis agent with the candidate text fragments and knowledge subgraphs initially obtained by the retrieval enhancement generation agent to identify whether there is any content in the answer that contradicts the original source or cannot be supported. Next, the agent performs illusion filtering. By analyzing the confidence level of the content generated by the large language model and its consistency with the knowledge base, it actively identifies and filters out errors or false information fabricated by the model itself. If the overall confidence level of the answer is found to be lower than a preset threshold, a feedback loop mechanism is triggered. This mechanism can command the upstream retrieval or reasoning agent to re-execute the task to obtain more reliable information or to revise the current answer, ensuring that the answer finally delivered to the user is not only logically consistent but also strictly rooted in the objective facts of the system's knowledge base, thereby greatly improving the reliability and credibility of the output.

[0052] In some embodiments, the method further includes steps S107 and S108: Step S107: Construct a continuous learning and feedback optimization agent to collect user feedback on answers. The feedback includes explicit feedback that directly expresses the evaluation result and implicit feedback obtained by monitoring subsequent behaviors. It is also used to generate quality evaluation results for answers based on the BLEU or ROUGE index. Based on the feedback and quality evaluation results, it labels the results of unanswered or poor-quality answers and adds the corresponding question queries to the self-learning queue. It labels the question queries with type, domain, complexity and priority, and manually labels the correct answers.

[0053] Step S108: Use the correct answers or the answers generated by the search-enhanced intelligent agent to the question queries in the self-learning queue according to priority as training samples to fine-tune the second preset large language model and update the knowledge graph.

[0054] Explicit feedback refers to user-initiated and clearly provided evaluation information that directly expresses the user's judgment on the quality of the answer. For example, providing "Yes / No" or "Helpful / Useless" buttons allows users to give the most direct qualitative assessment of the answer. Using a five-star rating system or a 1-5 point slider allows users to provide more granular evaluations. Alternatively, providing a set of more specific feedback options, such as "Answer Accurate," "Answer Irrelevant," "Answer Incomplete," or "Answer Difficult to Understand," can provide the system with more precise optimization directions. Text feedback boxes can also be used, allowing users to directly input text, freely pointing out specific errors in the answer or offering suggestions for improvement.

[0055] Implicit feedback is feedback indirectly inferred by the system through monitoring and analyzing the user's subsequent behavior after interacting with an answer. It doesn't require active user action but rather infers user satisfaction through behavioral data. For example, the presence of subsequent query behavior—if a user immediately or quickly initiates a new query highly similar to the original question after seeing the answer—strongly suggests that the initial answer failed to meet their needs. The presence of result-clicking behavior—when the system provides multiple sources or candidate answers, if the user completely ignores the system's preferred answer and instead clicks to view other alternative information fragments—is also a strong indication. A user might spend very little time after seeing an answer and immediately close the conversation, possibly indicating that the answer is irrelevant or of poor quality; conversely, a longer dwell time might mean that the user carefully reads the answer and finds it valuable. Furthermore, if a user copies the answer content or directly quotes the information provided by the answer in subsequent conversations, this is a strong signal of high satisfaction.

[0056] BLEU (Bilingual Evaluation Understudy) and ROUGE (Recall-Oriented Understudy for Gisting Evaluation) are classic metrics used in the field of natural language processing, especially in text generation tasks, to automatically evaluate the quality of generated text.

[0057] On the other hand, the present invention also provides a knowledge question answering base intelligent agent construction system, including a processor, a memory, and a computer program or instructions stored in the memory. The processor is used to execute the computer program / instructions, and when the computer program or instructions are executed, the system implements the steps of the above method.

[0058] On the other hand, the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0059] On the other hand, the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0060] The present invention will now be described with reference to a specific embodiment: This embodiment provides a novel method and system for constructing a knowledge question-answering database intelligent agent. This method can automatically extract, clean, and correlate information from multi-source, multi-modal knowledge bases to form a dynamically evolving knowledge network. Through a multi-agent collaborative reasoning framework, it achieves accurate, in-depth question answering of user queries with traceable source information.

[0061] In this embodiment, as Figure 2 As shown, the constructed system comprises three main modules: a dynamic knowledge fusion and construction module, a multi-agent collaborative question answering and reasoning module, and a continuous learning and feedback optimization module.

[0062] Module 1: Dynamic Knowledge Fusion and Construction Module The core function of this module is to extract, parse, and fuse information from multi-source heterogeneous data (such as text, tables, and images) into structured knowledge to form a dynamically updated knowledge graph. This module comprises two main sub-modules: a multimodal information extraction agent and an adaptive knowledge graph construction agent. The following are the detailed implementation steps for each sub-module.

[0063] Submodule 1: Multimodal Information Extraction Intelligent Agent Step 1: Multimodal data source access and preprocessing The goal of this step is to access data sources in different formats, perform format preprocessing, and convert them into a unified format that can be further analyzed and processed.

[0064] Input data source: Raw data from various sources (such as PDFs, Word documents, HTML pages, images, etc.). Specifically, it can be divided into text data. (PDF, Word, PPT, HTML, etc.), image data (JPEG, PNG, etc.) and tabular data Three types of data: CSV, Excel, etc.

[0065] Text data extraction: Use parsing libraries to extract plain text from documents, such as PyMuPDF for PDF, python-docx for Word, BeautifulSoup for HTML, and python-pptx for PPT. The extraction process is shown in formula (1).

[0066] (1) in, For the extracted text data, For input documents, This refers to the document parser.

[0067] Image data extraction: The image data is based on OCR technology. DeepOCR is used to extract the text in the image. The extraction process is shown in formula (2).

[0068] (2) in, Extracting text from an image The input image.

[0069] Table data extraction: Use TabNet table recognition technology to extract the row and column data in the table and convert it into structured text. The extraction process is shown in formula (3).

[0070] (3) in, For the extracted table data, The input form file.

[0071] Step 2: Convert multimodal data into structured text fragments The goal of this step is to extract the data ( , and This is converted into a unified structured text fragment for subsequent processing.

[0072] Data structuring: The extracted text content is cleaned and denoised, and then converted into a standardized structured format (such as sentences, paragraphs, table rows, etc.), irrelevant information is removed, and tokenization and part-of-speech tagging are performed.

[0073] Unified text fragments: Each data source (text, image, table) is transformed into a structured text fragment. Each fragment will contain key information (such as entities, attributes, relationships, etc.) and the logical connections between them. All data will be described in a unified format to facilitate subsequent processing and analysis. The process is shown in formula (4).

[0074] (4) in, For unified structured text fragments, For the extracted text content, For image description content, The data is in a table format.

[0075] Step 3: Generate a high-dimensional vector representation for each text segment The goal of this step is to use a deep learning model to transform already structured text fragments. Transforming it into a high-dimensional vector representation facilitates subsequent information retrieval and reasoning.

[0076] Text fragment vectorization: Using the pre-trained language model BERT to vectorize structured text fragments It is transformed into a high-dimensional vector representation. Each structured text fragment generates a fixed-dimensional vector representation based on its content.

[0077] (5) in, A high-dimensional vector representation of a text segment. This is a structured text fragment.

[0078] Step 4: Generate a high-dimensional vector representation for each text segment The goal of this step is to store the generated high-dimensional vectors in a vector database for easy retrieval and reasoning in the future.

[0079] Vector storage: The high-dimensional vector of each multimodal fragment is stored using the efficient vector storage system FAISS, and an index is built for fast retrieval.

[0080] Query optimization: An index is built in the vector database to support fast similarity retrieval and ensure the efficiency of query response. The process is shown in formula (6).

[0081] (6) in, It is a vector database containing high-dimensional vector representations of all multimodal fragments.

[0082] Submodule 2: Adaptive Knowledge Graph Construction of Intelligent Agents The goal of this submodule is to build an adaptive, dynamically updated knowledge graph based on extracted and structured multimodal data (such as text, image descriptions, tabular data, etc.), and to optimize the entities and relationships in the graph as users query and provide feedback.

[0083] Step 1: Entity Recognition and Relation Extraction The goal of this step is to identify entities and their relationships from structured text fragments and to construct a preliminary knowledge graph.

[0084] Entity Recognition: Named Entity Recognition (NER) is used to identify entities in text. BERT is employed for NER to identify key entities in the text. This involves high-dimensional vector representations of text fragments. The NER task is executed to extract entities, and the process is shown in formula (7).

[0085] (7) in, From The set of entities identified in the process This is a vector representation of a structured text fragment.

[0086] Relation extraction: After identifying entities, relation extraction techniques are used to identify relationships between entities. For example, a relation could be "has the largest memory capacity" or "belongs to". Dependency parsing is used to identify relations, and the process is shown in formula (8).

[0087] (8) in, For the set of relationships to be identified, From The entity set extracted from This is a relation extraction algorithm.

[0088] Knowledge graph initialization: Initialize the knowledge graph using the identified entities and relations, with each entity as a node in the graph and each relation as an edge in the graph, as shown in formula (9).

[0089] , (9) in, An initialized knowledge graph containing a set of entities. and relation set .

[0090] Step 2: Incremental Update and Graph Construction The goal of this step is to enable the system to build the graph based on new structured text fragments ( Incremental updates are performed on the knowledge graph to ensure its timeliness and accuracy.

[0091] Incremental update: Each time a new update is received... At that time, the intelligent agent through The system performs similarity retrieval to find relevant entities and relationships, and incrementally adds new entities and relationships to the existing knowledge graph. This is done through queries. The system can determine the similarity between a new entity and an existing entity in the graph and automatically infer potential relationships. The process is shown in formula (10).

[0092] (10) in, For the updated knowledge graph, and To pass Identify and from The new entities and relationships matched in the process This is the existing knowledge graph.

[0093] Similarity retrieval: The system utilizes The vector information stored in the database is used to find the most relevant entities and relationships through similarity retrieval, and the graph is updated based on the matching results. The most relevant entities to the new text are retrieved from the vector database using cosine similarity, as shown in formula (11).

[0094] (11) in, For new input vector, For existing vectors stored in the vector database, and For the matched entities and relationships.

[0095] Step 3: Reasoning and Relationship Enhancement The goal of this step is to leverage existing information in the knowledge graph to perform deep reasoning, deduce new relationships and entities, and enhance existing relationships in the graph.

[0096] Relational reasoning: Reasoning is performed using entities and relationships in the graph, and new relationships are derived through graph reasoning algorithms (such as graph neural networks, reasoning rules, etc.). For example, based on the existing relationship between "server A" and "maximum memory capacity", the maximum memory supported by the server can be inferred, and the process is shown in formula (12).

[0097] (12) in, For the reasoned relationship, For the current knowledge graph, This results in the final structured text fragment vector. This refers to relevant data in a vector database.

[0098] Relationship enhancement: The system derives new relationships through reasoning and enhances them into the knowledge graph to further enrich the graph structure and enhance the graph's reasoning and query capabilities. The process is described by formula (13).

[0099] (13) in, For the enhanced knowledge graph, The relationship is deduced.

[0100] Step 4: Adaptive Learning and Graph Evolution The goal of this step is to automatically adjust and evolve the knowledge graph based on user feedback and queries, adapting it to new data and query needs.

[0101] Knowledge graph evolution: Each user query or feedback can trigger the evolution of the knowledge graph. According to... and Based on the query history and feedback information, the graph structure will be dynamically adjusted. By adaptively optimizing the graph, the system can enhance the entities and relationships related to high-frequency queries in the graph, and the process is shown in formula (14).

[0102] (14) in, For the evolved knowledge graph, Based on user feedback, For structured text fragment vectors, This refers to relevant data in a vector database.

[0103] Adaptive optimization: The system adjusts the strength or structure of relationships in the knowledge graph based on high-frequency queries and user needs to improve query efficiency and accuracy. The process is shown in formula (15).

[0104] (15) in, For the enhanced knowledge graph, The relationship is deduced.

[0105] Step 5: Knowledge Graph Validation and Quality Control The goal of this step is to periodically validate the knowledge graph to ensure the accuracy, consistency, and quality of the information within it.

[0106] Consistency check: The system uses a consistency check algorithm to periodically check whether the entities and relationships in the knowledge graph are consistent, avoiding errors or redundant information. The process is shown in formula (16).

[0107] (16) in, For the consistency check results, This is a consistency check algorithm.

[0108] Quality control: The quality of information in the map is ensured by a combination of automated detection and manual review. The process is shown in formula (17).

[0109] (17) in, This is a knowledge graph that has undergone quality control verification. This is a quality control algorithm.

[0110] Module 2: Multi-Agent Collaborative Question Answering and Reasoning Module This module is the core innovation of the system, responsible for transforming user queries into structured information, performing efficient retrieval and reasoning, and ultimately providing accurate answers. Each sub-agent plays a key role in the collaborative work, ensuring the efficiency, accuracy, and interpretability of the question-and-answer process.

[0111] Submodule 1: Query and Analysis Intelligent Agent like Figure 3 As shown, the system receives the user's original query, identifies the user's true intent, query type, and potential implicit conditions through deep semantic parsing, and decomposes or reconstructs it into one or more more precise subqueries for subsequent processing.

[0112] Step 1: Receive user queries The user inputs a raw query, and the system forwards the query content to the query analysis agent. The query can be in natural language and may also contain multiple modalities of information (such as text, tables, images, etc.).

[0113] Step 2: Deep semantic parsing Deep semantic parsing is performed using the first pre-defined large language model to understand the context, intent, query type (fact query, recommendation query, reasoning query, etc.), and implicit conditions (such as time, space, quantity, etc.). For example, if a user inputs "What is the maximum memory of server A?", the query analysis agent needs to identify "server A" and "maximum memory" as key entities and attributes, and the process is shown in formula (18).

[0114] (18) in, For the parsed query, The query is the original input from the user.

[0115] Step 3: Subquery generation and reconstruction Based on the deep analysis results, the query analysis agent decomposes the original query into one or more more specific subqueries. Subqueries may include: Subquery 1: Identify specific information about the entity.

[0116] Subquery 2: Identify the attributes or relationships related to the entity, the process of which is formula (19).

[0117] (19) in, For the generated subquery, This is the parsed query.

[0118] Submodule 2: Retrieval Enhancement Generative Agent Based on the subqueries parsed by the query analysis agent, parallel retrieval is performed to find the most relevant text fragments and knowledge subgraphs, thereby enhancing the semantic context of the query.

[0119] Step 1: Parallel Search For each subquery, the retrieval-enhanced generative intelligence simultaneously feeds data into the vector database ( ) and dynamic knowledge graph ( The goal of the search is to find the text fragments, entities, relationships, and knowledge subgraphs that are most relevant to the subquery.

[0120] Text retrieval: Using semantic-based retrieval methods (such as FAISS, ELMo, etc.) to retrieve document fragments related to subqueries from vector databases.

[0121] Knowledge graph retrieval: Extracting subgraphs related to the query from a dynamic knowledge graph, especially those involving entities and their attributes or relationships, is the process described in formula (20).

[0122] (20) in, For the retrieved relevant text fragments and knowledge subgraphs, For subqueries, and For vector databases and dynamic knowledge graphs.

[0123] Step 2: Enhance search results The system will extract key information from the retrieved results to enhance the contextual information. This information will provide a richer context for subsequent reasoning and synthesis, as shown in formula (21).

[0124] (twenty one) in, To enhance the search results, This is the original retrieved fragment.

[0125] Sub-module 3: Reasoning and Synthetic Agents It is responsible for inputting the retrieved fragmented information from multiple sources (which may come from different documents and different modalities) as context into the second preset large language model, and instructing the model to compare, summarize, reason, and trace the source, and finally synthesize a coherent, accurate and complete answer, and label the source of each part of the information.

[0126] Step 1: Context Composition and Input The retrieved multi-source information (such as text fragments, entities, relations, knowledge subgraphs, etc.) is used as context input into the second pre-defined large language model. Context information includes: from... Retrieved document fragments and from Extracted knowledge subgraph.

[0127] Step 2: Reasoning and Synthesis The second pre-defined large language model is used for comparison, reasoning, and synthesis. The model will generate answers based on contextual information and ensure the coherence, accuracy, and completeness of the answers. In this process, the system will ensure that each part of the reasoning process is traced back to its source and its information source is marked, as shown in formula (22).

[0128] (twenty two) in, For the final generated answer, For enhanced search results, context is a synthesized context from multi-source information (text, knowledge graph, etc.).

[0129] Step 3: Source Tracing and Labeling When generating the answer, the system will mark each information fragment and clearly indicate the source of each part of the answer (Source Attribution), and the process is shown in formula (23).

[0130] (twenty three) Among them, Source_Attribution contains metadata that includes the source of the answer.

[0131] Submodule 4: Verifying and Reflecting on Intelligent Agents The generated answer undergoes self-censorship, checking its consistency with retrieved factual information and identifying and filtering out potential "illusions" generated by the large language model. If the confidence level is low, the agent will trigger a new round of retrieval or reasoning.

[0132] Step 1: Answer Consistency Check Verify the generated answer and from and The system checks whether the information retrieved is consistent with the facts. If the generated answer is inconsistent with the facts, the system will mark the answer as unreliable and issue a warning, as shown in formula (24).

[0133] (twenty four) in, For the consistency check results, For the final generated answer, The relevant information retrieved.

[0134] Step 2: Hallucination Filtering Identify and filter "illusionary" information (i.e., incorrect or untrue content) that the language model may generate. If the confidence level of the answer is low, the system will initiate a new retrieval or inference to further verify the accuracy of the information, as shown in Formula (25).

[0135] (25) in, For the final generated answer, This is a feedback loop mechanism used to trigger new retrievals or inferences.

[0136] Module 3: Continuous Learning and Feedback Optimization Module The goal of this module is to enable the system to continuously learn and optimize its answer quality, reasoning process, and knowledge graph by collecting and analyzing user feedback and automatically evaluating results. This module will promote the system's self-iteration and evolution, improving its accuracy and robustness.

[0137] Step 1: Record whether each question-and-answer interaction is successful or not. The system records feedback from every user interaction, analyzes user satisfaction with the answers, and determines whether the system was successful in answering questions.

[0138] User feedback collection After each Q&A interaction, the system collects user feedback in the following ways: (1) Explicit feedback: Users can provide feedback through buttons or rating systems, such as "Was the answer helpful?" or "How accurate was the answer?"

[0139] (2) Implicit feedback: Inferring satisfaction with the answer by monitoring the user’s subsequent behavior (such as whether they continue to ask similar questions or query more information).

[0140] Automatic evaluation: The system will evaluate the generated answers based on automated evaluation metrics (such as BLEU, ROUGE, etc.), especially when there is no user feedback, the system can still evaluate the quality of the output answers itself.

[0141] Recording Interaction Results: The system records the success or failure of each Q&A interaction based on user feedback (whether explicit or implicit) and automatic evaluation results. Each interaction will be marked as successful or unsuccessful, and the results will be stored in the system's interaction log, as shown in formula (26).

[0142] (26) in, For interactive logs, For user queries, The answer generated by the system. For user feedback.

[0143] Step 2: Analyze questions that were not answered or were answered poorly. The system analyzes user feedback to identify questions that fail to provide accurate or satisfactory answers, adds them to a "self-learning queue," and provides data for subsequent optimization.

[0144] The system identifies which issues were not addressed based on user feedback: (1) those explicitly marked as unhelpful or incorrect by the user; and (2) those automatically evaluated as having low-quality generated answers (e.g., low BLEU scores, inconsistent generated content).

[0145] Problems are added to the self-learning queue: Problems identified as failures are automatically added to the self-learning queue and marked as problems to be optimized. The system will periodically check the queue and select problems for relearning and optimization, as shown in formula (27).

[0146] (27) in, This is the set of questions that were not answered successfully. Based on user feedback, The answer generated by the system.

[0147] The system categorizes and prioritizes problems based on their type, domain, and complexity, assigning a priority to each problem. Problems in the self-learning queue are then processed according to their priority. High-frequency, critical problems are prioritized for manual annotation and optimization.

[0148] Step 3: Find the answer through manual annotation or reasoning process The system incorporates failed question-and-answer interactions into a self-learning queue, using manual annotation or more complex reasoning processes to find answers, and then uses these as new samples to fine-tune the model or optimize the knowledge graph.

[0149] Performing manual annotation: For certain questions, especially those with high complexity or requiring domain expert knowledge, the system can push these questions to human reviewers for annotation. The human reviewers provide the correct answers and return those answers to the system as annotation samples.

[0150] Execution of the reasoning process: For problems that can be solved through reasoning, the system uses existing knowledge graphs and reasoning algorithms (such as neural networks, reasoning rules, etc.) to perform deep reasoning and generate more accurate answers. The reasoning process can utilize entities and relationships in the knowledge graph to fill in the gaps in the answers that the current system has failed to reason out, and the process is shown in formula (28).

[0151] (28) in, The final answer obtained through manual annotation or reasoning process. For failure issues in the self-learning queue, For user feedback.

[0152] Generating new samples: The system uses new answers obtained through manual annotation or reasoning processes as new training samples. These new samples are used to fine-tune the retrieval model and knowledge graph, continuously improving the system's answer quality.

[0153] Step 4: Fine-tune the retrieval model and optimize the knowledge graph By learning how to solve failed questions, the retrieval model and knowledge graph can be fine-tuned to improve the overall performance of the system, especially when dealing with poor-quality or unanswered questions.

[0154] Fine-tuning the retrieval model: For low-quality answers found in the self-learning queue, the system will fine-tune the retrieval model based on new labeled samples. By continuously updating and optimizing the retrieval algorithm, the system can improve its performance from the vector database (…). The accuracy and relevance of the relevant answers retrieved in the database are determined by formula (29).

[0155] (29) in, This is the fine-tuned retrieval model. For failed queries, For the final answer, It is a vector database.

[0156] Optimize the relationships in the knowledge graph: For questions that cannot be answered or have poor answers, the system analyzes these questions and optimizes the relationship structure and entity connections in the knowledge graph. For example, adding new entities or relationships strengthens the connections between existing entities and improves the reasoning ability of the knowledge graph. The process is shown in formula (30).

[0157] (30) in, For the optimized knowledge graph, For the current knowledge graph, For problems in the self-learning queue, The final answer is obtained through reasoning or manual annotation.

[0158] Step 5: System Self-Iteration and Evolution Through continuous learning and optimization, the system achieves self-iteration and evolution, ensuring that the question-answering system can continuously improve over time and meet the needs of answering more complex questions.

[0159] Self-iteration: Based on accumulated user feedback, automatic evaluation results, and optimized retrieval models and knowledge graphs, the system continuously optimizes its models and algorithms, thereby gradually improving the quality of the system's answers, the depth of reasoning, and the speed of knowledge updates. The process is described by formula (31).

[0160] (31) in, This is the fine-tuned retrieval model. For failed queries, For the final answer, It is a vector database.

[0161] Evolution and Adaptation: Based on the increasing number of training samples and the optimized model, the system gradually adapts to the needs of different domains, improving the flexibility and accuracy of the question-answering system. For example, through targeted training for specific domains, the system can handle more specialized queries, as shown in formula (32).

[0162] (32) in, For the evolved system, This is the fine-tuned retrieval model. For the optimized knowledge graph, For user feedback.

[0163] For example, consider an internal IT knowledge question and answer repository for an enterprise.

[0164] 1. Knowledge Integration Phase: The "Multimodal Information Extraction Agent" automatically crawls and parses the company's Confluencewiki, JIRA fault tickets, PDF technical manuals, PPT training materials, etc. It extracts the text "Server A's maximum memory capacity is 512GB" from a PDF manual and the information "Server A's power consumption is 300W when memory is fully configured" from a performance comparison chart. The "Adaptive Knowledge Graph Construction Agent" uses a large language model to identify "Server A" as an entity, and "maximum memory capacity" and "full power consumption" as attributes, and establishes a relationship between them.

[0165] 2. Q&A Phase: A user queries, "What will the power consumption be if server A's memory is fully utilized?" The query analysis agent understands that "fully utilized memory" is equivalent to "reaching maximum memory capacity," and refines the query to "server A's maximum memory capacity and its corresponding power consumption." The retrieval agent retrieves the two text fragments mentioned above from the vector library and finds the "server A" node and its attributes in the knowledge graph. The reasoning and synthesis agent provides the two retrieved fragments (possibly from different documents) to the large language model with the prompt: "Please infer the answer to the question based on the following context. And indicate the source of the answer. Context 1: [Server A's maximum memory capacity is 512GB]. Context 2: [Server A's power consumption is 300W when memory is fully utilized]." The answer generated states that "Server A consumes 300W when its memory is fully populated (maximum memory capacity 512GB). This information comes from the text description on page 5 of the product manual and the performance comparison chart on page 8." The verification agent checks that the numerical value in the answer is completely consistent with the search result, and returns the result to the user after confirming that there is no error.

[0166] Through the above methods, the present invention effectively realizes an accurate, reliable, and traceable knowledge question and answer base.

[0167] This embodiment achieves deep semantic parsing and multi-step reasoning of user queries through multi-agent collaborative work, resulting in answer accuracy far exceeding traditional keyword matching and single-model generation methods. The dynamic subgraph construction strategy reduces the maintenance cost of the knowledge base, enabling the system to adaptively absorb new knowledge and strengthen frequently used knowledge connections. Answers include source citations, allowing users to trace back to the original document fragments, greatly enhancing credibility and making it highly suitable for high-risk fields such as finance, law, and medicine. Multimodal information utilization effectively integrates information from text, tables, and images, unlocking the value of unstructured data. Through feedback loops, the system can continuously optimize its performance, forming a positive feedback loop that becomes smarter with use.

[0168] Corresponding to the above method, the present invention also provides an apparatus / system including a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor executing the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system performs the steps of the method as described above.

[0169] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0170] In summary, the knowledge question-answering database intelligent agent construction method and system of this invention constructs a multimodal information extraction intelligent agent capable of parsing heterogeneous data such as text, images, and tables, transforming them into structured text fragments, and generating vectorized representations stored in the retrieval database. Simultaneously, an adaptive knowledge graph construction intelligent agent dynamically constructs and continuously optimizes the knowledge graph using entity recognition and relation extraction technologies, deriving new relationships through a combination of symbolic logic and graph neural networks, forming an evolvable knowledge network. During the question-answering phase, the query analysis intelligent agent deeply analyzes user intent and generates subqueries; the retrieval enhancement generation intelligent agent searches the vector database and knowledge graph in parallel to obtain the most relevant information; finally, the reasoning and synthesis intelligent agent integrates multi-source information and generates accurate answers with complete source annotations through a large language model. This solution effectively solves the bottlenecks of traditional question-answering systems in deep understanding, multimodal fusion, knowledge updating, and answer interpretability, achieving dynamic knowledge management, accurate semantic parsing, multimodal information utilization, and system self-evolution. It is particularly suitable for professional domain scenarios requiring highly reliable question answering.

[0171] Furthermore, by constructing a verification and reflection agent, the generated answers can be optimized, thereby improving the quality of search results.

[0172] Furthermore, by constructing a continuously learning and feedback-optimized agent, it can adaptively absorb new knowledge and strengthen the connections between frequently used knowledge. Through feedback loops, the system can continuously optimize its performance, forming a positive feedback loop where it becomes smarter with use.

[0173] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.

[0174] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0175] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0176] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for constructing a knowledge Q&A library agent, characterized in that, The method comprises the following steps: constructing a multi-modal information extraction agent for obtaining multi-source heterogeneous data containing text data, image data and table data; processing the text data based on a preset document parser, processing the image data based on optical character recognition, and processing the table data based on a table recognizer to extract text and process it into structured text segments; extracting high-dimensional vector representations of the text segments based on a preset language model, storing the high-dimensional vector representations using a vector storage subsystem and establishing an index to support fast similarity retrieval; constructing an adaptive knowledge graph construction agent for extracting key entities in the text segments based on named entity recognition and extracting attributes and relationships, initializing a knowledge graph according to the key entities, the attributes and the relationships; deriving new relationships from the knowledge graph based on a preset inference rule of symbolic logic and a preset graph neural network based on representation learning, and expanding the knowledge graph; adjusting the relationship strength and structure in the knowledge graph based on user feedback; constructing a query analysis agent for receiving a user question query and extracting an original query in text form, parsing the original query based on a first preset large language model to obtain query key entities, query attributes and implicit conditions, and constructing one or more subqueries; constructing a retrieval enhancement generation agent for parallel retrieval of the vector storage subsystem and the knowledge graph according to the subqueries to obtain retrieval results containing candidate text segments and knowledge subgraphs most relevant to the subqueries, and re-extracting key information from the retrieval results to form enhanced retrieval results; constructing an inference and synthesis agent for inputting the multi-modal enhanced retrieval results into a second preset large language model to generate answers through comparison, inference and synthesis, and labeling the source of each information segment in the answers.

2. The method of claim 1, wherein, The adaptive knowledge graph construction agent is also used for structure consistency checking, logic consistency checking and fact consistency checking of the knowledge graph; the structure consistency checking includes type constraint checking and attribute uniqueness checking for the attributes, and relationship integrity checking for relationship directions; the logic consistency checking includes contradiction relationship detection, transitive relationship verification and conflict detection between negative relationships; the fact consistency checking includes comparison checking with source documents and performing multi-source data cross verification; The adaptive knowledge graph construction agent is also used for quality control of the knowledge graph, and the quality control includes correction work based on automatic detection results or manual review feedback results, and the automatic detection results and the manual review feedback results include entity recognition accuracy, relationship extraction accuracy and graph coverage rate for the key entities and the relationships.

3. The method of claim 1, wherein, The method further comprises: constructing a verification and reflection agent for consistency checking of the answers with the candidate text segments and the knowledge subgraphs, and performing hallucination filtering on errors and false content.

4. The method of claim 1, wherein, The method further comprises: An intelligent agent for continuous learning and feedback optimization is constructed to collect user feedback on the answers, including explicit feedback directly expressing evaluation results and implicit feedback obtained by monitoring subsequent behavior, and to generate quality evaluation results of the answers based on BLEU or ROUGE indicators. Based on the feedback and the quality evaluation results, the results that fail to answer or have poor answer quality are labeled, and the corresponding problem queries are added to a self-learning queue. The problem queries are labeled for type, domain, complexity, and priority, and the correct answers are labeled by artificial annotation. The correct answers or the enhanced intelligent agent generated by retrieval are used as training samples for the problem queries in the self-learning queue according to the priority, and the second pre-set large language model is fine-tuned and the knowledge graph is updated.

5. The method of claim 1, wherein, The pre-set document parser includes a PyMuPDF parser for PDF format text data, a python-docx parser for Word format text data, and a BeautifulSoup parser for HTML format text data, and a python-pptx parser for PPT text format; the table identifier uses a TabNet table identifier; and the vector storage subsystem uses a FAISS system.

6. The method of claim 1, wherein, The adaptive knowledge graph construction intelligent agent uses a BERT model to perform named entity recognition and uses dependency syntax analysis to extract relationships. The first large language model uses a ChatGLM or Qwen series large language model, and the second large language model also uses a ChatGLM or Qwen series large language model.

7. The method of claim 1, wherein, Based on the pre-set inference rules of symbolic logic and the pre-set graph neural network of representation learning, new relationships are derived from the knowledge graph and the knowledge graph is expanded, including: A correlation rule mining engine AMIE is used to perform symbolic rule reasoning and a GraIL graph neural network is used to find new relationships for the knowledge graph and expand the knowledge graph.

8. A knowledge Q&A library agent construction system comprising a processor, a memory, and a computer program or instructions stored on the memory, wherein, The processor is configured to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of the method of any one of claims 1 to 7.

9. A computer readable storage medium having stored thereon a computer program or instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps of the method of any one of claims 1 to 7.

10. A computer program product comprising computer programs or instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps of the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Large language model knowledge question-answering method and system fused with multi-modal knowledge graph

    CN118627628A

  • Intelligent question and answer method based on knowledge graph

    CN120297415A

  • Agricultural disease and insect pest question-answering method based on knowledge graph adaptive mixed retrieval enhancement

    CN120448502A

  • Multi-agent collaborative question and answer enhancement method and system based on heterogeneous data knowledge

    CN120705277A

  • Multi-modal fusion and reinforcement learning collaborative retrieval enhancement generation method and system

    CN120804271A

Cited By

  • Medical and health policy knowledge question and answer method and system, electronic equipment and product

    CN121920543A

  • Traffic infrastructure database query system based on generative reasoning

    CN122045229A

  • Multi-agent-based knowledge graph automatic construction and query method and system

    CN122064806A

  • Field large model construction and question and answer service method oriented to whole course of grass production

    CN122065880A

  • A multi-agent cooperative data accurate query method and system and medium

    CN122388022A