Optimization Method, Device and Readable Storage Medium of Knowledge Base Question Answering System Based on Hybrid Fine Tuning and Multidimensional Evaluation
Through the mixed fine-tuning and multi-dimensional evaluation method, the knowledge base question and answer system in the vertical field is solved, and the problem of low domain knowledge transfer efficiency, single evaluation system and high resource consumption in the knowledge base question-and-answer system in the vertical field is achieved, and efficient and reliable knowledge services are achieved, suitable for professional scenarios such as law, medical and finance.
Patent Information
- Application Number
- CN202510639243.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-05-19
AI Technical Summary
The existing knowledge base question and answer system has problems in the vertical field with low domain knowledge transfer efficiency, single evaluation system dimensions, and high training and deployment resource consumption, which is difficult to meet the needs of professionalism, compliance and lightweight.
A hybrid fine-tuning and multi-dimensional evaluation method is adopted, and a hybrid progressive framework that combines low-rank adaptation (LoRA) and direct preference optimization (DPO), combined with hierarchical dynamic parameter configuration and multi-dimensional quantitative evaluation system, can achieve efficient migration of domain knowledge and compliant and controllable content generation.
It significantly improves the efficiency of domain knowledge migration, compliant and security of generated content, reduces computing resource consumption, supports edge device deployment, and improves system reliability and generalization performance.
Smart Images

Figure CN120163254B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the cross - field of artificial intelligence and natural language processing, in particular to an optimization method, device and readable storage medium for a knowledge - base question - answering system based on hybrid fine - tuning and multi - dimensional evaluation. Background Art
[0002] In recent years, knowledge - base question - answering systems driven by large - language models have faced significant challenges in applications in vertical fields such as law, medicine, and finance:
[0003] (1) Insufficient efficiency of domain - knowledge transfer
[0004] Although traditional full - parameter fine - tuning strategies perform stably in the open domain, it is difficult to balance general - language capabilities and professional - field characteristics. For example, in the legal scenario, it is necessary to accurately identify the mutually exclusive relationship of articles; in the medical scenario, it is necessary to follow a strict logical chain of "symptom - examination - diagnosis". However, existing models adopt a global parameter - update mechanism and lack hierarchical dynamic adaptation of the middle and top layers of the Transformer (for example, the middle layer requires high - rank parameters to capture fine - granularity semantics, and the top layer requires low - rank parameters to enhance logical stability), resulting in low efficiency of injecting domain - semantic constraints and inference rules, often causing conflicts in clause citation or medical common - sense errors. The static rank - allocation strategy further restricts the generalization ability in small - sample scenarios.
[0005] (2) Simplification of the evaluation - system dimension
[0006] Existing evaluations overly rely on surface indicators such as accuracy and F1 - score, ignoring core requirements such as logical consistency and knowledge coverage. Taking financial risk control as an example, the system needs to consider semantic relevance, regulatory compliance, and risk - warning completeness. However, the traditional BM25 algorithm only achieves literal - text matching and cannot detect rule conflicts (such as contradictory transaction - verification logics) or quantify entity coverage. More critically, multi - dimensional indicators lack a dynamic fusion mechanism - in the legal scenario, the weight of logical consistency needs to be strengthened, and in the medical scenario, knowledge coverage needs to be prioritized. The static - weight strategy leads to the optimization direction deviating from the real business objectives and reduces the reliability of the system.
[0007] (3) Imbalance between training resources and deployment requirements
[0008] Full - parameter fine - tuning requires updating billions of parameters, resulting in a sharp increase in video - memory occupancy and climbing computational costs, restricting deployment on edge devices. Although low - rank adaptation (LoRA) reduces the number of parameters through matrix decomposition, existing solutions do not design dynamic configurations for model - level functional differences (such as high - rank parsing of semantics in the middle layer and low - rank suppression of over - fitting in the top layer). The unified - rank strategy is prone to long - range - inference semantic drift. In addition, compliance control relies on traditional reinforcement learning, which has problems of sparse rewards and training fluctuations and lacks a dual - track optimization goal based on contrastive learning (such as distinguishing compliant / non - compliant answers), resulting in generated content being difficult to align with the latest industry standards.
[0009] In summary, the core contradictions of the vertical domain Q&A system are concentrated in: the adaptation conflict between the general model architecture and the domain semantic rules, the matching gap between the single-dimensional evaluation index and the complex business requirements, and the balance dilemma between the improvement of algorithm performance and the constraints of computing resources. Summary of the Invention
[0010] The embodiments of the present invention provide an optimization method, device and readable storage medium for a knowledge base Q&A system based on hybrid fine-tuning and multi-dimensional evaluation. Aiming at the defects of the current technology, such as low efficiency of domain knowledge transfer, single-dimensional evaluation system, high consumption of training and deployment resources and insufficient adaptation ability, it is difficult to meet the professional, compliant and lightweight requirements of the vertical domain for the Q&A system.
[0011] The core technology of the present invention mainly realizes efficient transfer of domain knowledge, compliance and controllability of generated content, and optimization of resource consumption through a hybrid progressive framework that integrates hierarchical dynamic LoRA fine-tuning and DPO preference optimization, combined with a three-dimensional evaluation system of "logic-semantics-knowledge" and a lightweight deployment mechanism.
[0012] In a first aspect, the present invention provides an optimization method for a knowledge base Q&A system based on hybrid fine-tuning and multi-dimensional evaluation, and the method includes the following steps:
[0013] Hybrid progressive fine-tuning framework: Integrate a two-stage fine-tuning mechanism of low-rank adaptation and direct preference optimization, achieve domain knowledge transfer through hierarchical dynamic parameter configuration, and complete strategy alignment based on human preference data;
[0014] Multi-dimensional quantitative evaluation system: Construct a three-dimensional evaluation framework including logical consistency, semantic relevance, and knowledge coverage, and generate a comprehensive evaluation result through dynamic weight fusion;
[0015] Dynamic adaptation and lightweight mechanism: Adopt hierarchical parameter freezing, sparse constraints, and an attention-driven multi-domain prompt template library to achieve model lightweight and cross-domain logical constraints.
[0016] Furthermore, the hybrid progressive fine-tuning framework includes:
[0017] Perform low-rank decomposition on the pre-trained model parameter matrix to update the parameters through the adaptation matrix and :
[0018] , where , d and k are rank values; is the domain semantic encoder, which is a low-rank matrix with a dimension of d × r; is the logical reasoning decoder with a dimension of r × k, and Constitute a low-rank decomposition pair;
[0019] Implementing hierarchical rank configuration in the Transformer architecture: the middle layer uses higher rank values to capture domain semantic features, and the top layer uses lower rank values to enhance logical reasoning capabilities;
[0020] Introducing a contrastive learning mechanism to distinguish high-quality answers from illegal answers based on human preference data, and constructing an optimization target L DPO Drive models aligned with industry standards.
[0021] Furthermore, the hierarchical rank configuration is specifically as follows:
[0022] The middle layer uses a rank value of r=8, the top layer uses a rank value of r=4, and the total parameter update amount is the sum of the adaptation matrices of each layer.
[0023] Furthermore, the multi-dimensional quantitative evaluation system includes:
[0024] Logical consistency assessment: Verify the compliance of answers through first-order logic expressions and production rules, and use the Z3 solver and Drools engine to perform automatic verification;
[0025] Semantic relevance evaluation: Combining the BM25 algorithm with the Sentence-BERT model, the dynamic weight λ is used to fuse keyword coverage and vector similarity.
[0026] Knowledge coverage evaluation: Use the Bi-LSTM-CRF model to identify domain entities and calculate coverage indicators through the intersection of entity sets:
[0027]
[0028] in, The collection of entities generated for the model, is the set of labeled real entities, molecules Indicates the number of domain entities correctly identified.
[0029] Furthermore, logical consistency assessment also includes adversarial perturbation detection:
[0030] The DeBERTa-v3 model is used to perturb the generated answer, including entity replacement and logic reversal, and the conflict rate formula is used To verify the logical consistency;
[0031] Among them, ConsistScore is the logical consistency score, which ranges from [0,1]. The higher the score, the stronger the logical consistency. To judge the samples Whether it is consistent with the reference standard conflict; (⋅) is an indicator function, which is 1 when there is a conflict and 0 otherwise; n is the total number of generated perturbation samples; s i is the i-th perturbation sample; R is the original answer.
[0032] Furthermore, the dynamic adaptation and lightweight mechanism includes:
[0033] Freeze the basic parameters of the pre-trained model , only update the parameters of the adaptation matrix, and combine sparse constraints to suppress parameter redundancy;
[0034] Construct a multi-domain prompt template library, dynamically match templates through the attention mechanism, and generate answers that conform to professional logic. The templates include legal clause templates, medical diagnosis path templates, and financial risk control rule templates.
[0035] Furthermore, the formula for generating templates driven by attention is:
[0036]
[0037] where is the hidden state at the current time step; are the query generation function, key generation function, and value generation function respectively; is the dimension; P is the prompt template library.
[0038] Furthermore, the formula for the comprehensive score of the three-dimensional evaluation framework is:
[0039]
[0040] where is the logical consistency evaluation function; is the semantic relevance evaluation function; is the knowledge coverage evaluation function; the dynamic weights satisfy ; Q is the input question, R is the system answer, K is the set of knowledge base entities, and it is automatically adjusted according to the domain characteristics.
[0041] In the second aspect, the present invention provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned optimization method for a knowledge base question-answering system based on hybrid fine-tuning and multi-dimensional evaluation.
[0042] In the third aspect, the present invention provides a readable storage medium, in which a computer program is stored. The computer program includes program codes for controlling a process to execute the process, and the process includes the above-mentioned optimization method for a knowledge base question-answering system based on hybrid fine-tuning and multi-dimensional evaluation.
[0043] The main contributions and innovations of the present invention are as follows:
[0044] 1. Significantly improved efficiency of domain knowledge transfer
[0045] The hybrid fine-tuning framework uses LoRA hierarchical dynamic rank configuration (r = 8 for the middle layer and r = 4 for the top layer) to achieve differential adaptation of fine-grained domain semantics and logical reasoning while retaining general capabilities. Compared with full-parameter fine-tuning, the number of trainable parameters is significantly reduced, the video memory occupancy is decreased, and the training efficiency is significantly improved in small-sample scenarios. In the DPO stage, human preference data and contrastive learning are introduced to drive the model to strictly align with industry specifications (such as legal compliance and medical diagnosis logic), and the compliance and security of the generated content are significantly enhanced.
[0046] 2. The evaluation system better meets professional needs
[0047] The three-dimensional quantization evaluation framework integrates a logic rule engine (Z3 / Drools), semantic vector encoding (Sentence-BERT), and knowledge graph alignment (Bi-LSTM-CRF) to achieve hard constraint verification, deep semantic matching, and entity coverage quantification, solving the limitations of traditional single-dimensional metrics. The dynamic weight mechanism ( ) and the three-dimensional radar chart visualization system support adaptive adjustment of evaluation priorities according to domain characteristics, quickly locating logical vulnerabilities, semantic deviations, or knowledge gaps, forming an "evaluation-intervention-iteration" closed loop, and shortening the system optimization cycle.
[0048] 3. Breakthroughs in lightweight and cross-domain adaptation capabilities
[0049] The hierarchical parameter freezing and sparse constraint strategy ( = 0.01) locks the parameters of the base model and only injects domain knowledge through a lightweight adaptation matrix to compress the model volume and support edge device deployment. The multi-domain prompt template library and attention-driven mechanism (such as legal clause citation templates and medical diagnosis path templates) significantly enhance cross-domain adaptation capabilities, ensuring that the generated content in scenarios such as finance and healthcare strictly follows industry specifications and improving generalization performance.
[0050] 4. Systematically solve the core contradictions in vertical domains
[0051] The three major innovation points are organically coordinated to break through the bottlenecks of "difficulty in adapting general model architectures to domain characteristics, mismatch between single-dimensional evaluation and complex requirements, and imbalance between resource constraints and performance improvement", providing an efficient, reliable, and interpretable knowledge service foundation for professional scenarios.
[0052] Details of one or more embodiments of the present invention are set forth in the following drawings and description to make other features, objects, and advantages of the present invention more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings described herein are used to provide a further understanding of the present invention and form a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0054] Figure 1 is a flowchart of an optimization method for a knowledge base question - answering system based on hybrid fine - tuning and multi - dimensional evaluation according to an embodiment of the present invention;
[0055] Figure 2 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed implementation manners
[0056] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with one or more embodiments of this specification. On the contrary, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0057] It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily executed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step for description in other embodiments.
[0058] Existing vertical - domain question - answering systems have low efficiency in full - parameter fine - tuning, single evaluation metrics, and high resource consumption, resulting in insufficient domain - knowledge migration, poor compliance of generated content, and difficulty in lightweight deployment.
[0059] Based on this, the present invention is based on a hybrid progressive framework that integrates hierarchical dynamic LoRA fine - tuning and DPO preference optimization, combined with a "logic - semantics - knowledge" three - dimensional evaluation system and a lightweight deployment mechanism to solve the problems existing in the prior art.
[0060] Embodiment 1
[0061] The present invention aims to propose an optimization method for a knowledge base question - answering system based on hybrid fine - tuning and multi - dimensional evaluation. Specifically, referring to Figure 1 , the method includes the following steps:
[0062] Step 1: To address the challenges of vertical domain knowledge transfer, this step innovatively integrates Low-Rank Adaptation (LoRA) and Preference Optimization (DPO) techniques to construct a two-stage progressive fine-tuning framework. The system first achieves efficient parameter updates through low-rank decomposition, then introduces human preference data to complete policy alignment, and finally forms a domain knowledge-enhanced Q&A model. The specific process is as follows:
[0063] Step 1.1 Perform basic semantic adaptation through the LoRA fine-tuning mechanism. For the parameter matrix of the pre-trained language model , design a low-rank decomposition structure: introduce adaptation matrices and (where ), and form the parameter update expression, the formula of which is as follows:
[0064]
[0065] where , d and k are rank values; is the domain semantic encoder, which is a low-rank matrix with dimensions d × r; is the logical reasoning decoder with dimensions r × k, and together with forms a low-rank decomposition pair.
[0066] In this way, the low-rank decomposition structure systematically solves the problem of balancing the efficiency and generality of vertical domain knowledge transfer through mathematical rank constraints, functional hierarchical decoupling, and dynamic adaptation during training, and has significant technological progressiveness and patent protection value.
[0067] Step 1.2 Implement the hierarchical adaptation strategy. Implement differential rank configuration in the Transformer architecture (further breaking through the static rank allocation defect of existing LoRA and proposing hierarchical dynamic low-rank configuration):
[0068] For the middle layers (layers 6 - 9), use a high rank r = 8: The middle layers are responsible for semantic feature extraction, and the high rank configuration allows the model to capture richer domain semantic details (such as differences in modal words like "shall / shall not" in legal provisions, and context ambiguity resolution of medical terms);
[0069] For the top layers (layers 10 - 12), use a low rank r = 4: The top layers dominate logical reasoning, and the low rank configuration suppresses overfitting through parameter regularization to ensure the logical stability of the generated answers (such as the sequential constraint of "examination first, diagnosis later" in medical diagnosis, and the rule chain of "transaction amount exceeding limit requires verification" in financial risk control).
[0070] The total parameter update amount is calculated by the following formula:
[0071]
[0072] where, Denotes the total parameter update amount, which is the sum of all adaptation matrix update amounts from layer 6 to layer 12, reflecting the overall parameter adjustment amplitude of the model under the hierarchical adaptation strategy; the subscript of the summation symbol Σ Is the summation index, with a value range from 6 to 12, indicating the layer-by-layer accumulation of the parameter update amounts from layer 6 to layer 12; Is the Adaptation matrix of the layer, with a dimension of (r is 8 for the middle layers 6 - 9 and 4 for the top layers 10 - 12), responsible for mapping the input features to a low-dimensional space to capture domain semantic features; Another adaptation matrix of the layer, with a dimension of , after multiplying with , maps the low-dimensional features back to the original parameter space to inject domain logic rules.
[0073] The total parameter update amount is the layer-by-layer accumulation of the adaptation matrices of the middle layers (6 - 9) and the top layers (10 - 12), only performing differential adaptation on some levels of the Transformer, further reducing the computational cost and avoiding the destruction of general capabilities caused by global updates.
[0074] Step 1.3 Parameter dynamic update. The formula for parameter dynamic update is as follows:
[0075]
[0076] Where Is the model parameter updated by the low-rank adaptation (LoRA) method, which is the final parameter after integrating the basic general capabilities and domain adaptation adjustments, and is used for inference or further training of the model on specific tasks;
[0077] Is the frozen pre-trained model parameter (to ensure that general capabilities are not lost), and these parameters carry the general language capabilities (such as grammar understanding, common sense reasoning, etc.) learned by the model in the pre-training stage, and remain unchanged during the current training process to ensure that general capabilities are not lost;
[0078] Is the dynamic learning rate, used to control the amplitude of parameter update. It can be dynamically adjusted according to the actual situation during training to balance the training speed and stability;
[0079] Is the cross-entropy loss function Regarding The gradient, and the gradient reflects the change sensitivity of the loss function to , guiding To update in the direction of reducing the loss; is the cross entropy loss function, which is used to measure the model under input x and true label y, and the parameters are The smaller the difference, the more accurate the model prediction.
[0080] Implementing basic parameters through gradient decomposition This mechanism improves the training convergence speed, reduces the memory usage, and achieves stable basic parameters and efficient training of adaptive parameters.
[0081] Step 1.4: Align industry standards through the DPO fine-tuning mechanism. After completing basic semantic adaptation, this solution introduces the Deep Policy Optimization (DPO) mechanism to strengthen the compliance of generated content through human preference data. Based on contrastive learning theory, the optimization goal is constructed to drive the model to distinguish high-quality answers. Answer with violation , the formula is as follows:
[0082]
[0083] in Indicates a direct preference for optimizing the loss function to measure the current model With reference model Differences in preferences for generating responses. is the model to be optimized, with parameter θ. It represents the probability that the model will generate answer y when given input x. A reference model with frozen parameters, used as a comparison benchmark to prevent catastrophic forgetting caused by over-optimization. is the probability of generating answer y when input x; is a sample from the data distribution D Find the expectation. is the input (e.g. question text), is the high-quality answer (the "winner"), It is an inferior answer ("loser"). is the temperature coefficient (hyperparameter), which controls the exploration intensity of the strategy (the larger the value, the more sensitive it is to preference differences), is the Sigmoid function, which maps the probability difference to the [0,1] interval.
[0084] Step 1.5: Achieve precise preference alignment. Decompose the policy gradient into two components: positive reinforcement and negative suppression. The formula is as follows:
[0085]
[0086] in represents the Direct Preference Optimization (DPO) loss function The gradient of the model parameter θ is used to guide the update direction of the parameter θ to optimize the model generation behavior. is the positive gradient (enhancing compliance answers), It is a negative gradient (suppressing illegal answers) and has the characteristics of clear direction and training stability. It is a hyperparameter used to control the scaling strength of the gradient and adjust the model's adjustment strength for the preferred alignment.
[0087] This formula decomposes the policy gradient into two components with clear directions: positive reinforcement (encouraging compliant answers) and negative inhibition (discriminating against illegal answers). This allows the model to more stably align with human preferences during training: strengthening expected generation behaviors while suppressing bad outputs, thereby improving the quality and compliance of the model output.
[0088] Step 1.6: Establish a prompt word project. Based on the above hybrid fine-tuning, establish a multi-domain prompt template library, including: legal clause templates (e.g., "According to Article X of the XX Law..."), medical diagnosis templates (e.g., "If [X symptoms] occur, it is recommended to check [Y items]"), and financial risk control templates (e.g., "Transaction amount exceeds [X], verification [Y] is required").
[0089] Step 1.7 Calculate the attention weight. Select the attention-driven template and dynamically generate adaptation hints based on the current hidden state. The formula is as follows:
[0090]
[0091] in is the hidden state of the current time step; They are query generation function, key generation function and value generation function respectively; is the dimension; P is the prompt template library.
[0092] Step 1.8 integrates semantic adaptation and policy alignment goals. Add coefficient constraints, and the formula is as follows:
[0093]
[0094] in, is the total loss function; is the weight coefficient, which adjusts the contribution of cross entropy loss to the total loss and controls the model's focus on the accuracy of the basic task. The cross-entropy loss measures the difference between the model prediction results and the true labels, driving the model to learn the basic input-output mapping relationship (such as text classification and question-answer matching). is the weight coefficient that determines the importance of preference alignment in training and balances the model's "task accuracy" and "human preference conformity". is the direct preference optimization loss, which prompts the model to generate outputs that better align with human preferences (such as differentiating between high-quality and low-quality answers), aligning human values with logical rules. is the regularization coefficient, which constrains the magnitude of model parameter updates by penalizing overly large , preventing overfitting, enhancing generalization ability, and ensuring the stability of the model on new data. is the square of the Frobenius norm of the matrix , representing the magnitude of parameter updates.
[0095] Its dynamic weight strategy formula is as follows:
[0096]
[0097] where (1) represents the first 5 rounds of training, and (2) represents after 5 rounds;
[0098] Constraint conditions: (Suppressing parameter redundancy).
[0099] Step 2: Based on the hybrid fine-tuning framework, construct a multi-modal evaluation framework consisting of logical consistency, semantic relevance, and knowledge coverage, forming an end-to-end evaluation pipeline. The specific process is as follows:
[0100] Step 2.1 Design the hierarchical structure. Input processing layer: Perform dependency syntactic analysis and semantic role annotation on the question-answer pair (Q, R). Feature extraction layer: Adopt a multi-channel feature parallel extraction mechanism, including logical rule matching, semantic vector encoding, and knowledge entity linking. Comprehensive calculation layer: Generate the final evaluation score through dynamic weighted fusion, and its formula is as follows:
[0101]
[0102] where is the logical consistency evaluation function; is the semantic relevance evaluation function; is the knowledge coverage evaluation function; the dynamic weights satisfy ; Q is the input question, R is the system answer, and K is the set of knowledge base entities, which are automatically adjusted according to the domain characteristics.
[0103] Step 2.2 The logical consistency evaluation module systematically verifies whether the generated content complies with professional domain rules such as the exclusivity of legal provisions and medical diagnosis paths through a dual-track constraint engine and an adversarial detection mechanism, ensuring the compliance and logical self-consistency of the answers. The specific process is as follows:
[0104] Step 2.2.1 Define two types of constraint rules. Hard constraints (exclusivity of legal provisions): Describe the exclusivity of clauses using first-order logic expressions and achieve automatic verification through the Z3 solver. Soft constraints (medical diagnosis probability chain): Describe the diagnosis probability chain using production rules and execute it through the Drools rule engine.
[0105] Among them, Represents universal quantification over all inputs x (such as the request content in legal questions). Is a legal compliance judgment function that returns true if x conforms to a certain legal clause (such as "The transaction amount ≤ 5000 yuan conforms to the Measures for Payment and Settlement"); Is the logical implication symbol, that is, "if... then..."; Is a risk assessment function, and Is the negation of the risk assessment function, which returns true if x has no risk (such as "This behavior does not trigger financial risks"); Is the clinical manifestation of symptom A; Is the clinical diagnosis conclusion B (such as "Diagnosed with angina"); Is a production rule with probability, indicating that "when symptom A appears, there is an 80% probability of diagnosing disease B";
[0106] For example, when the input content x conforms to a certain legal clause ( is true), its corresponding behavior or conclusion must have no risk ( is false), reflecting the exclusivity of legal clauses (such as the same behavior cannot be legal and illegal at the same time).
[0107] The hard constraint uses the Microsoft Z3 automated theorem prover to transform the first-order logic expression into a satisfiability problem (SMT) and automatically verify whether there are logical conflicts in the generated answer. For example:
[0108] Input: "According to Article 143 of the Civil Code, this contract is valid" ( is true); Verification: If the answer simultaneously contains "There is a risk of culpa in contrahendo in this contract" ( is true), then the Z3 solver determines a conflict and triggers a logical error prompt.
[0109] The soft constraint establishes a probabilistic dependence relationship between symptoms and diagnoses, allowing for uncertainty in medical reasoning (such as the same symptom may correspond to multiple diseases, but with different probabilities), which conforms to the actual scenario of medical diagnosis.
[0110] The soft constraint uses Drools to execute production rules and supports dynamic matching of the probability chain between symptoms and diagnoses. For example:
[0111] Input: "The patient's main complaints are chest pain and palpitations" (trigger ); Rule matching: Based on the probability chains of "chest pain → angina pectoris (80%) and chest pain → myocardial infarction (15%)" in the knowledge base, generate a list of candidate diagnoses and probability values; Output: "It is recommended to prioritize the screening of angina pectoris (probability 80%), and at the same time, myocardial infarction needs to be excluded (probability 15%)".
[0112] Through the precise definition and technical implementation of two types of constraint rules, this step constructs the underlying support for logical consistency evaluation, which is the core component of the "logic-semantics-knowledge" three-dimensional evaluation system, reflecting the innovation and practicality of this invention in rule modeling in the professional field.
[0113] Step 2.2.2 improves its accuracy. Contradiction detection verifies the logical self-consistency through adversarial perturbation detection based on the answers generated by the hybrid fine-tuning model. The architecture selection uses DeBERTa-v3 (an advanced pre-trained language model, improved based on the bidirectional encoding representation (BERT) architecture), and implements directional perturbations in ways such as entity replacement, logical inversion, and context shift. The formula is as follows:
[0114]
[0115] Among them, ConsistScore is the logical consistency score, with a value range of [0,1]. The higher the score, the stronger the logical self-consistency; To determine the th sample whether it conflicts with the reference standard ; (⋅) is the Indicator Function. It is 1 when there is a conflict and 0 otherwise; n is the total number of generated perturbation samples (e.g., 100 perturbation samples are generated through DeBERTa-v3); s i is the i-th perturbation sample (such as the question or answer after entity replacement); R is the original answer (i.e., the model output without perturbation).
[0116] This formula fills the gaps in deep semantics and automation in traditional logical verification through pre-trained model-driven directional perturbation and quantitative evaluation. It is the key technical support for the "logic-semantics-knowledge" three-dimensional evaluation system, significantly improving the reliability and interpretability of the vertical domain question-answering system.
[0117] Step 2.3 Semantic Relevance Evaluation Module. As the core link of the evaluation system, this module adopts a hierarchical progressive design strategy, organically combining traditional retrieval algorithms and deep learning models. The overall operation process of the module can be divided into three levels: the basic retrieval layer (BM25 algorithm), the semantic parsing layer (Sentence-BERT encoding), and the decision fusion layer (dynamic weight adjustment). The three form a closed-loop feedback in the data processing flow. The specific process of the evaluation module is as follows:
[0118] Step 2.3.1 Surface semantic matching. Use the enhanced BM25 algorithm to calculate the keyword coverage. Introduce a domain adaptation mechanism based on the traditional formula. The formula is as follows:
[0119]
[0120] where w is the keyword in the query statement Q or an independent word in the query; is the inverse document frequency, measuring the importance of keyword w; is the term frequency of keyword w in document R; is the term frequency saturation adjustment factor (usually taken as 1.2 - 2.0) to prevent the excessive weight of high-frequency words; is the document length normalization factor (usually taken as 0.75 - 1.0) to suppress the natural advantage of long documents over term frequency; is the document length; is the average document length.
[0121] The domain adaptation BM25 algorithm solves the problems of "keyword mis - matching, long document bias, and insufficient term weight" of traditional retrieval algorithms in vertical domains through improvements such as parameter dynamicization, weight domain - specialization, and corpus specialization. It is one of the core technologies of the "semantic relevance evaluation module" of this invention, significantly improving the retrieval accuracy and answer accuracy of the knowledge - base question - answering system in professional fields. This mechanism can be written into the patent claim as an independent technical point to protect the "adaptive optimization of retrieval algorithms based on domain characteristics" solution.
[0122] Step 2.3.2 Deep semantic matching. Use a domain - specific pre - trained model to improve the representation accuracy and generate vector similarity through Sentence - BERT. The formula is as follows:
[0123]
[0124] where, is the vector representation of the query statement Q (such as the semantic vector of "how to apply for medical compensation"); is the vector representation of the retrieved document D (such as the semantic vector of "medical damage compensation process" in the knowledge base); is the vector dot product, measuring and the degree of projection overlap of in the semantic space. The larger the value, the more similar the semantics; is its vector norm; is the cosine similarity.
[0125] This step constructs a technical link for deep semantic matching through the combination of a domain-specific pre-trained model, multi-modal vector representation, and cosine similarity measurement, solves the core defect of traditional retrieval algorithms that "emphasize word frequency and neglect semantics", and is a key innovation point of the "semantic relevance evaluation" module of this invention.
[0126] Step 2.3.3 On this basis, establish an intelligent mapping between the weight coefficient and the business scenario, and adaptively adjust the strategy. Dynamically correct the λ value according to the real-time accuracy feedback, and trigger manual review when the deviation between the semantic score and the logical score > 15%. The formula is as follows:
[0127]
[0128] Among them, SemScore is the comprehensive score of semantic relevance, with a value range of [0,1]. The higher the score, the stronger the semantic relevance between Q and R. As one of the core indicators of the three-dimensional evaluation system (logic-semantics-knowledge), it provides a quantitative basis for the semantic dimension of the answer quality of the question-and-answer system. is the dynamic weight coefficient, used to adjust and 's contribution ratio to meet the different needs of different fields for "keyword matching" and "semantic understanding". is the traditional retrieval score based on keyword matching, measuring the literal matching degree between the query Q and the answer R (such as keyword coverage, word frequency weight). is the cosine similarity based on Sentence-BERT, measuring the deep semantic association between Q and R (such as the direction consistency of sentence-level semantic vectors).
[0129] This formula solves the core contradiction of traditional semantic evaluation that "either overfits keywords or deviates from the text basis" through dynamic weight fusion of surface and deep semantic indicators, and is one of the key innovation points of the "three-dimensional quantitative evaluation system" of this invention.
[0130] Step 2.4. Knowledge coverage evaluation module. Its main function is to ensure the knowledge integrity of the generated content through knowledge graph alignment technology. The specific process includes two key stages: entity linking and coverage calculation, forming a three-layer technical linkage with upstream and downstream modules. The specific steps are as follows:
[0131] Step 2.4.1 Perform entity linking, and use the Bi-LSTM-CRF model for domain entity recognition. The formula is as follows:
[0132]
[0133] Among them, x is the input text sequence, and x i is the i-th token (such as the word "chest pain"); y is the predicted label sequence, and yi is the entity label for the i-th token (e.g., "B-Disease" indicates the start of a disease entity); is the bidirectional hidden state of the i-th token generated by the Bi-LSTM, capturing the context semantics (such as the clinical meaning of "chest pain" in a medical record); W yi is the label corresponding weight vector, mapping the hidden state to the label space; is from the label to score, reflecting the dependency relationship between labels (e.g., after "B-Person", only "I-Person" or the end label can follow); is all possible label sequences, and the denominator ensures the sum of probabilities is 1 through normalization. This formula fully reflects the core logic of the Bi-LSTM-CRF model for entity recognition through bidirectional semantics and label transition constraints.
[0134] This formula is the core of the probability calculation of the Bi-LSTM-CRF model, reflecting the three-layer processing logic of the entity linking task:
[0135] Bidirectional semantic modeling: The hidden state is generated by the Bi-LSTM, capturing the context information of words (such as the specific meaning of "myocardial infarction" in a medical record). Label transition constraint: The parameter comes from the CRF layer, reflecting the domain knowledge rules (such as after "defendant" in a legal text, a person name entity must follow). Normalization processing: The denominator term normalizes the probabilities of all possible label sequences to ensure output stability.
[0136] In this embodiment, the entity linking task is given an input text x = {x1, x2,..., x n} (such as a legal provision or a medical record), and predicting its corresponding entity label sequence y = {y1, y2,..., y n} (such as "defendant", "myocardial infarction", etc.).
[0137] Step 2.4.2 Calculate the coverage. Define the coverage metric , which measures the degree of agreement between the system output and the standard knowledge base, and its formula is as follows:
[0138]
[0139] Among them, is the entity set generated by the model, is the annotated true entity set, and the numerator represents the number of correctly recognized domain entities.
[0140] Step 2.5 Visualization of Evaluation Results: As the comprehensive presentation terminal of the evaluation system, this module forms a closed-loop feedback system with the three major evaluation modules in Steps 2.1 to 2.4. Through the three-dimensional radar chart dynamic mapping technology, abstract evaluation indicators are transformed into a visual decision support interface, and the formula is as follows:
[0141]
[0142] This formula defines the three coordinate axes of the three-dimensional radar chart, corresponding to the three core dimensions of the evaluation system respectively:
[0143] 1) H (LogicConsist, logical consistency)
[0144] Meaning: The logical consistency score, whose value range is usually [0, 1], verifies the logical self-consistency of the generated content (such as the mutual exclusivity of legal clauses and the correctness of medical diagnosis paths) through hard constraints (Z3 solver) and soft constraints (Drools engine).
[0145] Numerical conversion: After multiplying by 120, the value range is extended to [0, 120], corresponding to the scale range of the "logic axis" in the radar chart (such as the radius of the radar chart is 120 units), making the logical indicator more prominent in visualization (as logical errors may have a more serious impact on the system).
[0146] 2) S (SemanticRel, semantic relevance)
[0147] Meaning: The semantic relevance score, calculated through the dynamic fusion of BM25 and Sentence-BERT ( ), measures the semantic matching degree between the query and the answer (such as keyword coverage and deep semantic association).
[0148] Value range: Directly mapped to [0, 1] or normalized to the radar chart scale (such as 0 - 100), without magnification, maintaining the original ratio.
[0149] 3) V (KnowledgeCover, knowledge coverage)
[0150] Meaning: The knowledge coverage score, calculated through entity linking (Bi-LSTM-CRF) and alignment with the knowledge graph ( ), quantifies the degree of coincidence between the generated content and the knowledge base entities (such as whether key inspection items are omitted in medical diagnosis).
[0151] Value range: Directly mapped to [0, 1] or normalized to the radar chart scale, reflecting the knowledge integrity.
[0152] In this embodiment, the technical implementation of the visual decision support interface is as follows:
[0153] 1. Dynamic Mapping of 3D Radar Chart
[0154] Coordinate System Construction: Taking the center of the radar chart as the origin, the H-axis (Logic), S-axis (Semantics), and V-axis (Knowledge) are radiated and distributed at an angle of 120° respectively, forming an equilateral triangle coordinate system. The values of each dimension correspond to the points on the radar chart. Connecting the three points forms a polygon, and the larger the area, the better the comprehensive performance.
[0155] Dynamic Update Mechanism: Receive the scores of the three major evaluation modules in real time (e.g., refresh every 10 seconds), and automatically re-render the radar chart; support comparison of historical data (such as the score fluctuation curves in the past 1 hour and 24 hours), which is convenient for tracking the performance changes of the system.
[0156] 2. Linkage Logic of Closed-loop Feedback System
[0157] Problem Location: If the area of a certain dimension of the radar chart is significantly smaller than other dimensions (such as the V-axis is concave), it indicates that there are defects in the corresponding module (such as insufficient knowledge coverage), and automatic diagnosis is triggered:
[0158] Low Logical Consistency: Jump to the rule engine log, check the verification results of Z3 / Drools, and locate the conflicting rules;
[0159] Low Semantic Relevance: Analyze the BM25 keyword matching and Sentence-BERT vector similarity, adjust the dynamic weight λ or trigger fine-tuning of the domain model;
[0160] Low Knowledge Coverage: Scan the entity linking results, identify the knowledge base entities that are not covered, and automatically supplement the training data or optimize the Bi-LSTM-CRF model.
[0161] Intervention-Iteration Link: Visual warning → Defect location → Parameter adjustment / Data enhancement → Re-evaluation → System iteration.
[0162] For example, when the knowledge coverage is low in the medical scenario, the system automatically extracts the missing entities (such as "coronary angiography") from the electronic medical record library, supplements them to the training set and triggers incremental training of the model.
[0163] Through the 3D radar chart visualization technology, the complex multi-dimensional evaluation results are transformed into intuitive graphical expressions, which not only improves the operation and maintenance efficiency, but also drives the continuous optimization of the system through the closed-loop feedback mechanism. This module forms a technical closed-loop with the hybrid fine-tuning framework and multi-dimensional evaluation algorithms, and jointly constructs a professional and interpretable knowledge base question-answering system, providing a complete technical solution for intelligent interaction in vertical fields.
[0164] Step 3.1 System Initialization and Domain Adaptation, Pretrained Model Loading: Deploy a basic language model (such as GLM4-9B), load the mixed fine-tuning parameter matrix, and initialize the domain knowledge graph. At the same time, according to the prompt template library P automatically constructed for the target domain, complete domain feature injection through an attention-driven mechanism.
[0165] In this embodiment, the specific steps are as follows:
[0166] Step 3.1.1 Pretrained Model Loading
[0167] Base Model Deployment: Select an open-source large language model (such as GLM4-9B) as the base to provide general language understanding and generation capabilities.
[0168] Loading of Mixed Fine-tuning Parameters: Load the total parameter update matrix obtained through LoRA+DPO mixed fine-tuning , to achieve the integration of the base model and domain knowledge.
[0169] Initialization of Domain Knowledge Graph: Construct a knowledge graph K to store domain entities and relationships (such as the mutual exclusion relationship between legal provisions, medical symptom-disease mapping), which is used for knowledge coverage evaluation (Step 2.4) and logical rule verification (Step 2.2).
[0170] Step 3.1.2 Automatic Construction of Prompt Template Library
[0171] According to the target domain (such as law, medical), automatically generate a structured prompt template library P. For example: Legal template: "According to Article {clause number} of the 《{law name}》, the legal consequence of {scene description} is {answer}"; Medical template: "When the symptoms of [{symptom list}] appear, it is recommended to perform [{examination item}] examinations first, and the possible diagnoses include [{disease list}]". Attention-driven Injection: Dynamically select templates through the attention mechanism (formula: ), and fuse the template features with the current input hidden state h t to guide the model to generate answers that conform to domain logic.
[0172] Step 3.2 Real-time Q&A Processing: For the user's question Q, after the large model answers, obtain the answer A and perform multi-dimensional evaluation. Re-answer the questions with lower scores.
[0173] In this embodiment, the user inputs the question Q, which is tokenized and vectorized, and then the large model loaded with domain parameters generates an initial answer A. Technical Dependence: The model parameters after mixed fine-tuning (see Step 1.3) and the prompt template P jointly constrain the generation logic. For example, legal questions are forced to reference the clause structure in the template.
[0174] Step 3.3 finally obtains the correct answer. Output a reliable answer verified through multiple rounds of evaluation to form a closed-loop Q&A.
[0175] Through the closed-loop design of "initialization - Q&A - evaluation - optimization", this process systematically solves the problems of efficiency, accuracy, and scalability in vertical domain Q&A, and is the core execution link for the implementation of the technical solution of this invention.
[0176] Embodiment 2
[0177] This embodiment also provides an electronic device. Refer to Figure 2 , including a memory 404 and a processor 402. A computer program is stored in the memory 404, and the processor 402 is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0178] Specifically, the above-mentioned processor 402 may include a central processing unit (CPU), or a specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more integrated circuits configured to implement the embodiments of this invention.
[0179] Among them, the memory 404 may include a mass memory 404 for data or instructions. By way of example and not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 404 may include removable or non-removable (or fixed) media. In appropriate cases, the memory 404 may be internal or external to the data processing device. In a particular embodiment, the memory 404 is a non-volatile memory. In a particular embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory (FLASH), or a combination of two or more of these. In appropriate cases, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), where the DRAM may be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0180] The memory 404 can be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402.
[0181] By reading and executing the computer program instructions stored in the memory 404, the processor 402 implements any of the knowledge base question-answering system optimization methods based on hybrid fine-tuning and multi-dimensional evaluation in the above embodiments.
[0182] Optionally, the above electronic device may further include a transmission device 406 and an input / output device 408. Among them, the transmission device 406 is connected to the above processor 402, and the input / output device 408 is connected to the above processor 402.
[0183] The transmission device 406 can be used to receive or send data via a network. Specific examples of the above network may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (abbreviated as RF) module, which is used to communicate with the Internet wirelessly.
[0184] The input / output device 408 is used to input or output information.
[0185] Embodiment III
[0186] This embodiment also provides a readable storage medium. The readable storage medium stores a computer program, and the computer program includes program codes for controlling a process to execute the process. The process includes the knowledge base question-answering system optimization method based on hybrid fine-tuning and multi-dimensional evaluation according to Embodiment I.
[0187] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.
[0188] Generally, various embodiments can be implemented in hardware or special circuits, software, logic, or any combination thereof. Some aspects of the present invention can be implemented in hardware, while other aspects can be implemented by firmware or software executed by a controller, a microprocessor, or other computing devices, but the present invention is not limited thereto. Although various aspects of the present invention can be shown and described as block diagrams, flowcharts, or using some other graphical representations, it should be understood that, as a non-limiting example, the blocks, devices, systems, technologies, or methods described herein can be implemented in hardware, software, firmware, special circuits or logic, general hardware or controllers, or other computing devices, or some combination thereof.
[0189] Embodiments of the present invention can be implemented by computer software, which is executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. A computer software or program (also referred to as a program product), including software routines, applets, and / or macros, can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product can include one or more computer-executable components configured to perform the embodiments when the program runs. One or more computer-executable components can be at least one software code or a part thereof. Additionally, in this regard, it should be noted that any box in the logical flow as Figure 1 shown can represent a program step, or interconnected logic circuits, boxes, and functions, or a combination of program steps and logic circuits, boxes, and functions. The software can be stored on physical media such as memory chips or storage blocks implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs. The physical media are non-transitory media.
[0190] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity in description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as falling within the scope described in this specification.
[0191] The above embodiments merely represent several implementation manners of the present invention. Their descriptions are relatively specific and detailed, but should not be construed as limiting the scope of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.
Claims
1. A knowledge-based question answering system optimization method based on hybrid fine-tuning and multi-dimensional evaluation, characterized by: The following steps are involved: Hybrid Progressive Fine-tuning Framework: A two-stage fine-tuning mechanism that combines low-rank adaptation and direct preference optimization, enables domain knowledge transfer through hierarchical dynamic parameter configuration, and achieves policy alignment based on human preference data. Multi-dimensional quantitative evaluation system: Build a three-dimensional evaluation framework that includes logical consistency, semantic relevance, and knowledge coverage, and generate comprehensive evaluation results through dynamic weight fusion; Dynamic adaptation and lightweight mechanism: Adopting hierarchical parameter freezing, sparse constraints, and an attention-driven multi-domain prompt template library to achieve model lightweighting and cross-domain logical constraints; The multi-dimensional quantitative evaluation system includes: Logical consistency assessment: Verify the compliance of answers through first-order logic expressions and production rules, and use the Z3 solver and Drools engine to perform automatic verification; Semantic relevance evaluation: Combining the BM25 algorithm with the Sentence-BERT model, the dynamic weight λ is used to fuse keyword coverage and vector similarity. Knowledge coverage evaluation: Use the Bi-LSTM-CRF model to identify domain entities and calculate coverage indicators through the intersection of entity sets: in, The collection of entities generated for the model, is the set of labeled real entities, molecules Indicates the number of correctly identified domain entities; The dynamic adaptation and lightweight mechanism includes: Freeze the basic parameters of the pre-trained model , only update the adaptation matrix parameters, combined with the sparse constraint Suppress parameter redundancy; Build a multi-domain prompt template library, dynamically match templates through the attention mechanism, and generate answers that conform to professional logic. The templates include legal clause templates, medical diagnosis path templates, and financial risk control rule templates; The attention-driven template generation formula is: in is the hidden state of the current time step; They are query generation function, key generation function and value generation function respectively; is the dimension; P is the prompt template library.
2. The knowledge base question answering system optimization method based on hybrid fine-tuning and multi-dimensional evaluation according to claim 1, characterized in that: The hybrid progressive fine-tuning framework includes: Pre-trained model parameter matrix Perform low-rank decomposition by adapting the matrix and Implement parameter update: ,in , d and k are rank values; is the domain semantic encoder, which is a low-rank matrix with a dimension of d× r; is a logical reasoning decoder with a dimension of r × k, and Constitute a low-rank decomposition pair; Implementing hierarchical rank configuration in the Transformer architecture: the middle layer uses higher rank values to capture domain semantic features, and the top layer uses lower rank values to enhance logical reasoning capabilities; Introducing a contrastive learning mechanism to distinguish high-quality answers from illegal answers based on human preference data, and constructing an optimization target L DPO Drive models aligned with industry standards.
3. The knowledge base question answering system optimization method based on hybrid fine-tuning and multi-dimensional evaluation according to claim 2, characterized in that: The hierarchical rank configuration is specifically as follows: The middle layer uses a rank value of r=8, the top layer uses a rank value of r=4, and the total parameter update amount is the sum of the adaptation matrices of each layer.
4. The knowledge base question answering system optimization method based on hybrid fine-tuning and multi-dimensional evaluation according to claim 1, characterized in that: The logic consistency assessment also includes adversarial perturbation detection: The DeBERTa-v3 model is used to perturb the generated answer, including entity replacement and logic reversal, and the conflict rate formula is used To verify the logical consistency; Among them, ConsistScore is the logical consistency score, which ranges from [0,1]. The higher the score, the stronger the logical consistency. To judge the samples Whether it is consistent with the reference standard conflict; (⋅) is the indicator function, which is 1 when there is a conflict and 0 otherwise; n is the total number of perturbation samples generated; s i is the i-th perturbation sample; R is the original answer.
5. The method for optimizing a knowledge-based question-answering system based on hybrid fine-tuning and multi-dimensional evaluation according to any one of claims 1 to 4, characterized in that: The comprehensive scoring formula of the three-dimensional evaluation framework is: in, Evaluate functions for logical consistency; Evaluate functions for semantic relevance; is the knowledge coverage evaluation function; the dynamic weight satisfies ; Q is the input question, R is the system answer, K is the knowledge base entity set, and it is automatically adjusted according to the characteristics of the domain.
6. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the knowledge base question answering system optimization method based on hybrid fine-tuning and multi-dimensional evaluation according to any one of claims 1 to 5.
7. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which includes a program code for controlling a process to execute a process, and the process includes the knowledge base question answering system optimization method based on hybrid fine-tuning and multi-dimensional evaluation according to any one of claims 1 to 5.
Citation Information
Patent Citations
Stylized legal consultation question and answer method and system, storage medium and equipment
CN116821297A
Federal pre-training learning method based on Q-former converter
CN116912626A