A multimodal metadata retrieval enhanced generation method and system

By extracting and fusing multi-modal features, and combining the Faiss library and large language models to optimize answer generation, the problem of insufficient integration and reasoning of the traditional RAG system in multi-modal multi-hop queries is solved, and the accuracy and credibility of the answers are improved. .

CN118626662BActive Publication Date: 2024-10-29SHANDONG INSPUR SCI RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411080245.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-10-29
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

Traditional retrieval-augmented generation (RAG) systems are difficult to effectively integrate different modal information when processing complex multi-modal and multi-hop queries, resulting in poor cross-modal reasoning performance and difficulty in capturing and utilizing intermediate reasoning results, affecting the quality of answers. , and there are deficiencies in factuality and interpretability.

Method used

By determining the data mode of the query content, extracting and fusing the features of each mode, generating a multi-modal feature fusion vector, using the Faiss library for parallel retrieval, and combining the large language model to generate initial answers for factual optimization, improving the accuracy of the generated content. sex and credibility.

Benefits of technology

It improves knowledge coverage and information utilization efficiency, provides more comprehensive and accurate answers, improves the accuracy, relevance and credibility of generated content, and can effectively handle complex multi-hop queries and cross-modal reasoning scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626662B_ABST
    Figure CN118626662B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and in particular to a multimodal metadata retrieval enhancement generation method and system. The present invention determines the data modality of query content, extracts features of data of each modality based on the determined data modality, converts the extracted features into feature vectors, fuses the feature vectors of each modality to generate a multimodal feature vector, extracts key metadata of each modality data from each modality data of the query content, converts the key metadata into a key metadata vector and connects it with the multimodal feature vector to construct an enhancement vector, and performs retrieval through the enhancement vector, which helps to improve knowledge coverage and information utilization efficiency, and improve the accuracy, relevance and credibility of generated content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a multimodal metadata retrieval enhancement generation method and system. Background Art

[0002] In today's artificial intelligence and natural language processing (NLP) fields, retrieval-augmented generation (RAG) systems have become a key technology to improve the performance of large language models (LLMs). RAG systems can provide more accurate and reliable answers by combining the retrieval capabilities of external knowledge bases with the generation capabilities of LLMs. This approach not only improves the knowledge coverage of the system, but also effectively alleviates the hallucination problem inherent in LLMs.

[0003] However, traditional RAG systems still face many challenges when dealing with complex multimodal, multi-hop queries. First, existing RAG systems often find it difficult to effectively integrate information from different modalities (such as text, images, audio, etc.), resulting in poor performance when dealing with queries that require cross-modal reasoning. Second, for complex queries that require multi-step reasoning, traditional RAG systems often find it difficult to accurately capture and utilize intermediate reasoning results, thus affecting the quality of the final answer. In addition, in terms of factuality and explainability, existing RAG systems also have obvious deficiencies, making it difficult to ensure the accuracy of generated content, and lack a clear explanation of the reasoning process. Summary of the invention

[0004] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a multimodal metadata retrieval enhanced generation method and system, which helps to solve the limitations in processing complex multi-hop queries and cross-modal reasoning scenarios, and improve the accuracy, relevance and credibility of generated content.

[0005] In order to implement the above technical solution, in a first aspect, the present invention provides a multimodal metadata retrieval enhancement generation method, comprising:

[0006] Step 1: Enter the query content;

[0007] Step 2: determining the data modality of the query content, and performing processing based on the determined data modality of the query content to generate a multimodal feature fusion vector;

[0008] Step 3: Use the large language model to extract key metadata of each modality data in the query content, expand the key metadata, and convert the expanded key metadata into a metadata vector;

[0009] Step 4: Connect the metadata vector with the multimodal feature fusion vector to generate an enhanced vector;

[0010] Step 5: Based on the enhanced vector, use the Faiss library to perform parallel retrieval on the GPU and output the final retrieval results;

[0011] Step 6: Based on the final retrieval results output, use the large language model to generate an initial answer, and perform factual optimization on the generated initial answer to generate the final answer.

[0012] Furthermore, the step 2 comprises:

[0013] Analyze the query content to determine the data modality of the query content, wherein the data modality of the query content includes: text, image, audio and video;

[0014] Preprocessing each modal data of the determined query content, and extracting each modal data feature of the query content from the preprocessed modal data;

[0015] Converting the extracted query data features of each modality of the query content into query data feature vectors of fixed dimensions respectively;

[0016] Through the cross-modal attention mechanism and the dynamic weighting mechanism of modal importance, the query data feature vectors are fused to obtain a multimodal feature fusion vector.

[0017] Further, the five include:

[0018] Based on the enhanced vector, the Faiss library is used to perform parallel retrieval on the GPU to obtain the first retrieval result;

[0019] Performing relevance assessment, quality assessment and novelty calculation on the first search results;

[0020] According to the relevance evaluation results, quality evaluation results and novelty calculation results, the maximum marginal relevance (MMR) algorithm is used to perform comprehensive ranking analysis and calculation on the first search results;

[0021] Sorting the first search result according to the comprehensive ranking analysis calculation result;

[0022] Analyzing the first search result to determine the complexity of the first search result, and screening out a first final search result based on the complexity of the first search result and the ranking result;

[0023] The query content is analyzed to determine whether it is a multi-hop query. If not, the first final search result screened out is output as the final search result; if so, the key information of the first-hop search result is extracted, and the enhancement vector is updated according to the extracted key information to guide the next-hop search, and so on, until the multi-hop query is completed and the final search result is output.

[0024] Furthermore, the step six comprises:

[0025] Use the GPT-3.5 large language model or a fine-tuned GPT-3.5 large language model to generate preliminary answers based on the final search results and the input query content;

[0026] Use the NLI model to evaluate the consistency between the initial answer and the search results, as well as the coverage of key information, to generate an evaluation result;

[0027] Use the evaluation results to guide the fine-tuning of the GPT-3.5 large language model to generate the final answer;

[0028] The final answers are processed using a rule-based approach and a small BERT model to check for possible errors and standardize terminology.

[0029] In another aspect, the present invention provides a multimodal metadata retrieval enhancement generation system, comprising:

[0030] A human-computer interface for entering queries and displaying answers;

[0031] The multimodal retrieval and fusion module is used to process and fuse data of different modalities in the input content to generate a multimodal feature fusion vector;

[0032] The metadata enhancement and filtering module is used to extract key metadata of each modality data from the query content, expand the key metadata, and convert the expanded metadata into a metadata vector;

[0033] A fusion module, for fusing the metadata vector with the multimodal feature vector to generate an enhanced vector;

[0034] Hierarchical retrieval and re-ranking module, which is used to perform parallel retrieval on GPU based on enhanced vectors using Faiss library and output the final retrieval results;

[0035] The factual optimization generation module is used to generate an initial answer based on the output final retrieval results using a large language model, and to perform factual optimization on the generated initial answer to generate a final answer.

[0036] On the other hand, the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute the multimodal metadata retrieval enhancement generation method described above.

[0037] The beneficial effects of the present invention are:

[0038] The present invention determines the data modality of the query content, extracts features from the data of each modality based on the determined data modality, converts the extracted features into feature vectors, fuses the feature vectors of each modality, and generates a multimodal feature vector, which helps to improve the knowledge coverage and information utilization efficiency. For example, when answering questions involving visual concepts, the system can simultaneously use text descriptions and related image information to provide more comprehensive and accurate answers, and extract key metadata of each modality data from each modality data of the query content, convert the key metadata into a key metadata vector and connect it with the multimodal feature vector to construct an enhanced vector. Retrieval is performed through the enhanced vector, which helps to improve the accuracy, relevance and credibility of the generated content. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0040] Figure 1 The present invention is a flowchart of a multimodal metadata retrieval enhancement generation method.

[0041] Figure 2 The present invention is a flowchart of generating a multimodal feature fusion vector.

[0042] Figure 3 A flowchart of generating a metadata vector according to the present invention.

[0043] Figure 4 The flowchart of the present invention is based on enhanced vector retrieval and output of final retrieval results. DETAILED DESCRIPTION

[0044] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0045] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present invention. Unless otherwise specified, each technical and scientific term used in this embodiment has the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0046] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0047] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention and should not be understood as limitations on the present invention.

[0048] In the present invention, terms such as "fixed connection", "connected", "connection", etc. should be understood in a broad sense, indicating that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. Relevant scientific research or technical personnel in this field can determine the specific meanings of the above terms in the present invention according to specific circumstances, and they should not be understood as limiting the present invention.

[0049] Multimodal data refers to data composed of two or more modalities, which can be different forms of information sources or different formats of the same form.

[0050] Embodiment 1:

[0051] like Figure 1 As shown, this embodiment provides a multimodal metadata retrieval enhancement generation method, comprising the following steps:

[0052] S1: Enter the query content.

[0053] The query content is input through the human-computer interaction module, wherein the query content includes multimodal data.

[0054] For example, a doctor inputs text data and image data through the human-computer exchange module. For example:

[0055] Text description: Analyze this chest X-ray, combine it with the patient's symptom description and recent blood test results, assess the possibility that the patient has a cold, and provide suggestions for further examination.

[0056] Image data: Data tables of chest X-ray images, symptom description text, and blood test reports for patients.

[0057] S2: Determine the data modality of the query content, and perform processing based on the determined data modality of the query content to generate a multimodal feature fusion vector.

[0058] Specifically, if Figure 2 As shown:

[0059] S21: Analyze the query content to determine the data modality of the query content, where the data modality of the query content includes: text, image, audio and video.

[0060] S22: Preprocessing each modal data of the determined query content, and extracting each modal data feature of the query content from the preprocessed modal data.

[0061] After processing the text data by word segmentation and stop word removal, the RoBERTa model is used to extract text features from the preprocessed text data.

[0062] After normalization and enhancement of the image data, the image features are extracted from the preprocessed image data through the Vision Transformer (ViT) model.

[0063] After converting the audio data into a spectrogram, the audio features are extracted from the spectrogram through the Wav2Vec2.0 model.

[0064] S23: Convert the extracted query data features of each modality of the query content into query data feature vectors of fixed dimensions respectively.

[0065] Specifically, the extracted text features, image features, and audio features are projected into a unified dimensional space for normalization to be converted into text feature vectors, image feature vectors, and audio feature vectors with the same dimensions (e.g., 512 dimensions) as the vectors in the vector library.

[0066] S24: Through the cross-modal attention mechanism and the modal importance dynamic weighting mechanism, the query data feature vectors are fused to obtain a multimodal feature fusion vector.

[0067] The Transformer structure is used to fuse the feature vectors of modal data of fixed dimensions using a cross-modal attention mechanism. During the fusion process, the importance weight of each modal query data feature is dynamically calculated. Based on the calculated importance weight result, the weight of each modal query data feature vector is dynamically adjusted to obtain a query feature fusion vector.

[0068] The Transformer structure includes a self-attention layer and a cross-modal attention layer. The self-attention layer is used to capture the feature dependency of unimodal data, and the cross-modal attention layer is used to realize information interaction between different modal data.

[0069] S3: Use a large language model to extract key metadata of each modality from the query content, expand the key metadata, and convert the expanded key metadata into a metadata vector.

[0070] Specifically, if Figure 3 As shown:

[0071] S31: Extract key metadata of each modality from the query content.

[0072] The fine-tuned T5 model is used to perform entity recognition, relationship extraction, and attribute classification on the query data of each modality of the query content to extract key metadata from the query data of each modality of the query content. Among them, key metadata includes but is not limited to time range, information source, subject classification, and geographic location.

[0073] S32: Infer factors related to key metadata based on the knowledge graph to expand the key metadata.

[0074] S33: Convert the expanded key metadata into a metadata vector.

[0075] S4: Concatenate the metadata vector with the multimodal feature fusion vector to generate an enhanced vector.

[0076] S5: Based on the enhanced vector, use the Faiss library to perform parallel retrieval on the GPU and output the final retrieval results.

[0077] The Faiss library is stored on disk in the form of a file and loaded into the CPU or GPU for use when in use.

[0078] Specifically, Figure 4 As shown:

[0079] S51: Based on the enhanced vector, use the Faiss library to perform parallel retrieval on the GPU to obtain a first retrieval result.

[0080] For example, 100 relevant documents are retrieved based on the enhanced vector.

[0081] S52: Perform relevance evaluation, quality evaluation and novelty calculation on the first search result.

[0082] Specifically, for example, 100 documents are retrieved, the quality of the contents of the 100 retrieved related documents is evaluated, and the novelty of the contents of the 100 retrieved related documents and the relevance to the query content are calculated based on the query content. The specific steps are as follows:

[0083] A) Quality Assessment:

[0084] The content of each document is scored using the pre-trained BERT model to obtain a language quality score, coherence score, and information richness score for each document.

[0085] Based on the language quality score, coherence score and information richness score of each document, the quality assessment score of each document is calculated. The specific calculation formula is as follows:

[0086] Quality_Score = w1*Coherence + w2*Informativeness + w3*LanguageQuality, where w1, w2 and w3 are weight coefficients; Coherence is the coherence score; Informativeness is the information richness score; LanguageQuality is the quality language score; Quality_Score is the quality assessment score.

[0087] B) Correlation calculation:

[0088] The BM25 algorithm is used to calculate the relevance score between the query content and each document content. The specific calculation formula is: Relevance_Score = IDF(qi) * ((k + 1) * tf(qi)) / (K + tf(qi)) ; where qi is the i-th term in the query term; IDF is the inverse document frequency; tf is the term frequency; k is the term frequency saturation parameter; K is the document length normalization factor; and Relevance_Score is the relevance score.

[0089] C) Novelty calculation:

[0090] Use Jaccard similarity to calculate the difference between documents to obtain the novelty score, where the difference calculation formula is: Novelty_Score = 1 - (|A ∩ B| / |A ∪ B|); where A and B are the keyword sets in the two documents.

[0091] Finally, the quality assessment score, relevance score, and novelty score are weighted averaged to calculate the comprehensive score of each document. The specific calculation formula is as follows:

[0092] Final_Score = α * Quality_Score + β * Relevance_Score + γ * Novelty_Score; where α, β and γ are adjustable weight parameters.

[0093] S53: Based on the relevance evaluation results, quality evaluation results and novelty calculation results, a maximum marginal relevance (MMR) algorithm is used to perform a comprehensive ranking analysis and calculation on the first search result.

[0094] S54: Sort the first search result according to the comprehensive ranking analysis calculation result.

[0095] S55: Analyze the first search result, determine the complexity of the first search result, and screen out the first final search result based on the complexity of the query content and the ranking result.

[0096] The complexity of the search results is determined based on the length and type of the first final search results. For example, if the search results contain mostly video data and audio data, which consume more system resources, the number of final search results selected based on the sorting results should be smaller. For example, the first 10 search results can be selected as the final search results based on the sorting results. If the search results contain mostly text data, the number of final search results selected can be appropriately expanded. For example, 20 first search results can be selected as the final search results.

[0097] S56: Analyze the query content to determine whether it is a multi-hop query. If not, output the first final search result screened out as the final search result; if so, extract the key information of the first-hop search result, and update the enhancement vector based on the extracted key information to guide the next-hop search, and so on, until the multi-hop query is completed and the final search result is output.

[0098] Among them, updating the enhanced vector according to the extracted key information to guide the retrieval of the next hop includes:

[0099] Based on the updated enhanced vector, the Faiss library is used to perform parallel retrieval on the GPU to obtain a second retrieval result;

[0100] Performing relevance assessment, quality assessment and novelty calculation on the second search results;

[0101] According to the relevance evaluation results, quality evaluation results and novelty calculation results, the maximum marginal relevance (MMR) algorithm is used to perform comprehensive ranking analysis and calculation on the second search results;

[0102] Sorting the second search results according to the comprehensive ranking analysis calculation results;

[0103] The second search result is analyzed to determine the complexity of the query content, and based on the complexity of the query content and the ranking result, the second final search result is screened out.

[0104] And so on, until multiple jumps are completed.

[0105] S6: Based on the final retrieval results outputted, an initial answer is generated using a large language model, and the generated initial answer is factually optimized to generate a final answer.

[0106] S61: Use the GPT-3.5 large language model or the fine-tuned GPT-3.5 large language model to generate a preliminary answer based on the final search results and the input query content.

[0107] S62: Use the NLI model to evaluate the consistency between the initial answer and the retrieval results, as well as the coverage of key information, to generate an evaluation result.

[0108] S63: Use the evaluation results to guide the fine-tuning of the GPT-3.5 large language model to generate the final answer.

[0109] Specifically, if the fine-tuning amplitude of the GPT-3.5 large language model is less than the preset threshold, the currently generated preliminary answer is the final answer. If the fine-tuning amplitude of the GPT-3.5 large language model is not less than the preset threshold, return to step S61 until the fine-tuning amplitude of the GPT-3.5 large language model is less than the preset threshold.

[0110] S64: The final answer is processed using a rule-based method and a small BERT model to check for possible errors and standardize terminology.

[0111] Embodiment 2:

[0112] This embodiment provides a multimodal metadata retrieval enhancement generation system, including:

[0113] (I) Human-computer interaction interface, used to input query content and display answers.

[0114] (II) Multimodal retrieval and fusion module, responsible for processing and integrating data of different modalities in the query content, including:

[0115] A modality data determination unit, used to determine the data modality of the query content;

[0116] The modal data processing unit is used to process the data modality of the determined query content. For example, for text data, the RoBERTa model is used for encoding. The RoBERTa model is pre-trained on a large-scale text corpus and fine-tuned on data in a specific field to extract text features of the text data and convert the text features into text vectors. For image data, the pre-trained Vision Transformer (ViT) model is used to effectively capture the local and global features of the image to extract image features and convert the image features into image vectors. For audio data, the Wav2Vec2.0 model is used to extract image features and convert image features into image vectors; the Wav2Vec2.0 model is trained on self-supervised learning tasks and can effectively process various audio inputs.

[0117] The feature vector projection unit is used to map the text vector, image vector and audio vector to a fixed vector space, such as 512 dimensions, through a projection layer.

[0118] The fusion unit uses the Transformer structure to fuse the vectors of each modality, that is, to fuse the text vector, audio vector, and image vector to obtain a multi-feature fusion vector. The Transformer structure includes a modality-specific self-attention layer and a cross-modal attention layer. The self-attention layer captures the feature dependency within a single modality, while the cross-modal attention layer realizes information interaction between different modalities.

[0119] The modality importance weighting unit is used to adaptively adjust the weight of the modality according to the query content during the fusion process of each modality vector, that is, to adaptively adjust the weight of the text vector, audio vector and image vector.

[0120] (ii) Metadata enhancement and filtering module, which uses the fine-tuned T5 model to extract key metadata from the query content, including:

[0121] The key metadata extraction unit is used to use the fine-tuned T5 model to train through multi-task learning, and simultaneously handle tasks such as entity recognition, relationship extraction and attribute classification to extract key metadata from the query content, including but not limited to time range, information source, subject classification and geographic location.

[0122] The metadata extension component is used to use the knowledge graph for reasoning, expand the extracted key metadata, improve the retrieval recall rate, and encode the expanded key metadata into a vector form to obtain a metadata vector.

[0123] (iv) An enhanced vector construction module, used to connect the metadata vector with the multimodal feature fusion vector to generate an enhanced vector.

[0124] (V) Hierarchical retrieval and re-ranking module, which implements an efficient multi-level retrieval strategy, including:

[0125] The retrieval unit is used to perform parallel retrieval on the GPU using the Faiss library to obtain a first retrieval result.

[0126] The ranking unit is used to perform comprehensive ranking analysis and counting on the first search result using a BERT-based ranking model that is pre-trained on a large-scale ranking dataset and fine-tuned on a specific task. In the ranking process, the BERT-based ranking model considers multiple factors such as the relevance of the query content and the search results, the quality of the search results, and the novelty of the search results.

[0127] Dynamic depth controller, the dynamic depth controller analyzes the first search result, determines the complexity of the first search result, dynamically adjusts the search depth according to the complexity of the search result, balances efficiency and recall rate, and screens out the final search result based on the complexity of the search result and the ranking result.

[0128] Multiple judgment units are used to analyze the query content to determine whether it is a multi-hop query. If not, the first final search result screened out is output as the final search result; if so, the key information of the first-hop search result is extracted, and the enhancement vector is updated according to the extracted key information to guide the next-hop search, and so on, until the final search result is output after multiple queries are completed.

[0129] (VI) The factual optimization generation module adopts the PPO (Proximal Policy Optimization) algorithm framework, including:

[0130] A preliminary answer generation unit is used to generate initial answers based on the final retrieval results using a pre-trained large language model (such as GPT-3.5).

[0131] The multi-round iteration unit is used to perform multiple rounds of quality assessment on the generated initial answer to improve the factuality of the answer. In each round of iteration, the NLI (natural language inference) model is used to evaluate the consistency between the initial answer and the final retrieval result, and to calculate the coverage of the initial answer to the final retrieval result. At the same time, these two indicators are combined into a comprehensive reward signal to guide the update of the NLI model parameters.

[0132] The post-processing component uses a rule-based approach and a small proofreading large language model to fine-tune the model to correct obvious factual errors and logical contradictions before outputting the final answer.

[0133] Embodiment 3:

[0134] This embodiment provides a computer-readable storage medium, which includes a stored program. When the program is executed, the device where the computer-readable storage medium is located is controlled to execute the multimodal metadata retrieval enhancement generation method described in Embodiment 1.

[0135] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0136] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0137] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] In addition, it should be noted that the flowchart in the accompanying drawings shows the method of the embodiment of the present disclosure. In the corresponding description in the flowchart or block diagram in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be performed substantially in parallel, and they can sometimes be performed in the opposite order, which can depend on the functions involved. Each block in the block diagram and / or flow chart, and the combination of blocks in the block diagram and / or flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0139] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A multimodal metadata retrieval enhancement generation method, characterized in that: include: Step 1: Enter the query content; Step 2: determining the data modality of the query content, and performing processing based on the determined data modality of the query content to generate a multimodal feature fusion vector; Step 3: Use the large language model to extract key metadata of each modality data in the query content, expand the key metadata, and convert the expanded key metadata into a metadata vector; Step 4: Connect the metadata vector with the multimodal feature fusion vector to generate an enhanced vector; Step 5: Based on the enhanced vector, use the Faiss library to perform parallel retrieval on the GPU and output the final retrieval results; Step 6: Based on the final retrieval results output, use the large language model to generate an initial answer, and perform factual optimization on the generated initial answer to generate a final answer; The step five comprises: Based on the enhanced vector, the Faiss library is used to perform parallel retrieval on the GPU to obtain the first retrieval result; Performing relevance assessment, quality assessment and novelty calculation on the first search results; According to the relevance evaluation results, quality evaluation results and novelty calculation results, the maximum marginal relevance (MMR) algorithm is used to perform comprehensive ranking analysis and calculation on the first search results; Sorting the first search result according to the comprehensive ranking analysis calculation result; Analyzing the first search result to determine the complexity of the first search result, and screening out a first final search result based on the complexity of the first search result and the ranking result; The query content is analyzed to determine whether it is a multi-hop query. If not, the first final search result screened out is output as the final search result; if so, the key information of the first-hop search result is extracted, and the enhancement vector is updated according to the extracted key information to guide the next-hop search, and so on, until the multi-hop query is completed and the final search result is output.

2. The multimodal metadata retrieval enhancement generation method according to claim 1, characterized in that: The second step comprises: Analyze the query content to determine the data modality of the query content, wherein the data modality of the query content includes: text, image, audio and video; Preprocessing each modal data of the determined query content, and extracting each modal data feature of the query content from the preprocessed modal data; Converting the extracted query data features of each modality of the query content into query data feature vectors of fixed dimensions respectively; Through the cross-modal attention mechanism and the dynamic weighting mechanism of modal importance, the query data feature vectors are fused to obtain a multimodal feature fusion vector.

3. The multimodal metadata retrieval enhancement generation method according to claim 1, characterized in that: The step six comprises: Use the GPT-3.5 large language model or a fine-tuned GPT-3.5 large language model to generate preliminary answers based on the final search results and the input query content; Use the NLI model to evaluate the consistency between the initial answer and the search results, as well as the coverage of key information, to generate an evaluation result; Use the evaluation results to guide the fine-tuning of the GPT-3.5 large language model to generate the final answer; The final answers are processed using a rule-based approach and a small BERT model to check for possible errors and standardize terminology.

4. A multimodal metadata retrieval enhancement generation system, characterized in that: include: A human-computer interface for entering queries and displaying answers; The multimodal retrieval and fusion module is used to process and fuse data of different modalities in the input content to generate a multimodal feature fusion vector; The metadata enhancement and filtering module is used to extract key metadata of each modality data from the query content, expand the key metadata, and convert the expanded metadata into a metadata vector; A fusion module, for fusing the metadata vector with the multimodal feature vector to generate an enhanced vector; Hierarchical retrieval and re-ranking module, which is used to perform parallel retrieval on GPU based on enhanced vectors using Faiss library and output the final retrieval results; A factual optimization generation module is used to generate an initial answer based on the output final search result using a large language model, and to perform factual optimization on the generated initial answer to generate a final answer; Based on the enhanced vector, the Faiss library is used to perform parallel retrieval on the GPU, and the final retrieval results are outputted, including: Based on the enhanced vector, the Faiss library is used to perform parallel retrieval on the GPU to obtain the first retrieval result; Performing relevance assessment, quality assessment and novelty calculation on the first search results; According to the relevance evaluation results, quality evaluation results and novelty calculation results, the maximum marginal relevance (MMR) algorithm is used to perform comprehensive ranking analysis and calculation on the first search results; Sorting the first search result according to the comprehensive ranking analysis calculation result; Analyzing the first search result to determine the complexity of the first search result, and screening out a first final search result based on the complexity of the first search result and the ranking result; The query content is analyzed to determine whether it is a multi-hop query. If not, the first final search result screened out is output as the final search result; if so, the key information of the first-hop search result is extracted, and the enhancement vector is updated according to the extracted key information to guide the next-hop search, and so on, until the multi-hop query is completed and the final search result is output.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the multimodal metadata retrieval enhancement generation method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Question and answer method and device based on multi-modal input and knowledge graph

    CN117521814A

  • Multi-modal information retrieval method and system based on large language model

    CN117688220A