Question and answer data pair processing method, electronic device, medium and product
By performing structured parsing and overwrite table correction on the seed question-and-answer data, and combining automatic classification with manual overwrite, the problems of inconsistent terminology and label drift in the question-and-answer dataset were solved, achieving high-quality generation of the dataset and stable application of the large language model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI COOPERS TECHNOLOGY CO LTD
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies suffer from inconsistent terminology naming, label drift, and unstable automatic classification when generating question-and-answer datasets, resulting in inconsistent dataset quality and severely impacting the application of large language models in complex industry scenarios.
By acquiring seed question-and-answer data and performing structured parsing, and using a rewrite table to correct the initial classification results, a closed-loop control method is formed by combining automatic classification and manual rewrite logic. This method includes structured seed parsing, automatic classification, manual rewrite, evidence pattern diversion, and reverse answerability verification to ensure data consistency and traceability.
It significantly improves the consistency, answerability, and verifiability of question-answering datasets, reduces the number of manual reworks, ensures the convergence of training data quality, and enhances the stability of large language models in complex industry scenarios.
Smart Images

Figure CN122491250A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a method, electronic device, medium and product for processing question-and-answer data pairs. Background Technology
[0002] With the rapid development of generative artificial intelligence, automatically generating question-answer pairs using large language models has become the mainstream approach for constructing high-quality instruction fine-tuning datasets.
[0003] However, in existing technical solutions, automated generation processes often face significant challenges in stability and accuracy. Specifically, these include inconsistent terminology, label drift, role ambiguity, and unstable automatic classification. This makes it difficult for downstream models to establish accurate boundary awareness during training, resulting in inconsistent quality of the generated datasets and severe distortion in the downstream process.
[0004] Therefore, existing technologies struggle to guarantee terminology consistency, label robustness, and accurate role definitions at the architectural level when processing massive amounts of question-and-answer data. These issues not only lead to inconsistent dataset quality but also cause significant distortion in downstream fine-tuning and application processes, severely limiting the application of large language models in complex industry scenarios. Therefore, providing a method, electronic device, medium, and product for processing question-and-answer data pairs to address the obvious shortcomings of existing technologies has become a pressing technical problem for those skilled in the art. Summary of the Invention
[0005] One objective of this application is to provide a method, electronic device, medium, and product for processing question-and-answer data pairs, at least to address the technical problem mentioned above where the inconsistent quality of datasets causes significant distortion in downstream fine-tuning and application processes, severely restricting the application of large language models in complex industry scenarios.
[0006] To achieve the above objectives, some embodiments of this application provide the following aspects:
[0007] In a first aspect, some embodiments of this application provide a method for processing question-and-answer data pairs. The method includes: acquiring seed question-and-answer data pairs from at least one domain and performing structured parsing to obtain a unified seed object; classifying the unified seed object to obtain an initial classification result; correcting the initial classification result using an overwrite table, and replacing the initial classification result that does not meet the overwrite conditions with a pre-stored classification result to determine the registry mapping result; wherein the overwrite table is a structured rule table used to correct the initial classification result.
[0008] Optionally, classifying the unified seed object to obtain initial classification results includes:
[0009] Using semantic features, keyword extraction, feature extraction, and / or rule priority extraction are performed on the unified seed object; the extracted keywords, fields, and rule priorities are matched with each tag rule in the pre-stored registry to generate the initial classification result.
[0010] Optionally, before determining the registry mapping result, the processing method further includes: extracting key fields of the unified seed object, forming a sampling prompt template from the key fields; and performing controlled transformation on the dimension attribute parameters of the sampling prompt template according to a preset sampling direction to obtain key data for generating candidate questions.
[0011] Optionally, after generating the candidate question generation model, the processing method further includes: calling the pre-stored candidate question generation model and inputting the key data into the pre-stored candidate question generation model to generate candidate questions; and performing multi-dimensional detection on the candidate questions.
[0012] Optionally, the candidate problem can be subjected to multi-dimensional detection, including structural integrity detection, consistency detection, and identification of high-risk samples.
[0013] Optionally, after performing multi-dimensional detection on the candidate questions, the processing method further includes inputting the candidate questions that have passed the multi-dimensional detection into a preset answer generation model to obtain candidate answers for the candidate questions, and performing a reverse answerability verification operation on the candidate answers to obtain candidate answers that have passed the reverse answerability verification operation; wherein, the reverse answerability verification operation includes claim coverage detection, evidence dependence detection, and generation of compliance markers.
[0014] Optionally, after performing a reverse answerability verification operation on the candidate answers, the method for processing the question-answer data pair further includes recording the candidate questions, the candidate questions that pass the multi-dimensional detection, the candidate answers, and the verification results of the reverse answerability verification operation as audit records, and updating the overwrite table, the multi-dimensional detection rules, or the prompt template based on the audit records.
[0015] Secondly, some embodiments of this application also provide an electronic device, the electronic device comprising: one or more processors; and a memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the question-and-answer data pair processing method described above.
[0016] Thirdly, some embodiments of this application also provide a computer-readable medium having computer program instructions stored thereon, which can be executed by a processor to implement the question-and-answer data pair processing method as described above.
[0017] Fourthly, some embodiments of this application also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the question-and-answer data pair processing method described above.
[0018] Compared with related technologies, the solution provided in this application has the following advantages:
[0019] First, the solution provided in this application can further trigger manual overwriting and priority processing logic when candidate label confidence levels are close, label combination conflicts occur, or historical audits point to high-risk classifications. This solves the problems of inconsistent terminology naming, label drift, role ambiguity, and unstable automatic classification that lead to distortion of downstream processes in the prior art.
[0020] Second, the solution provided in this application is not simply to generate question-answer pairs using a large language model, but rather to provide a closed-loop control method for producing training data in highly constrained domains, which can significantly improve the consistency, answerability, verifiability and traceability of samples while ensuring expansion efficiency.
[0021] Third, the solution provided in this application forms a combined closed loop of "structured seed parsing - automatic classification and manual overwriting linkage and conflict priority handling - evidence pattern diversion - question field-level gating - answer reverse answerability verification - audit feedback update". This closed loop can reduce the number of manual reworks in the data production pre-stage, reduce the number of unanswerable samples entering the downstream process before question candidates enter the answer generation, and improve the answer verifiability through evidence dependency checks and manual numerical verification marking after answer generation, thereby enabling the training data construction process to have a stable quality convergence effect. Attached Figure Description
[0022] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0023] Figure 1 An exemplary flowchart of a question-and-answer data pair processing method provided for some embodiments;
[0024] Figure 2 An exemplary flowchart of another method for processing question-and-answer data pairs provided in some embodiments;
[0025] Figure 3 An exemplary structural diagram of an electronic device is provided for some embodiments. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] In this embodiment of the disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good morals.
[0028] First Embodiment
[0029] The first embodiment relates to a method for processing question-and-answer data pairs. For example... Figure 1 As shown, the method may include the following steps:
[0030] S11. Obtain seed question-answer data pairs from at least one domain and perform structured parsing to obtain a unified seed object.
[0031] S12, classify the unified seed object to obtain the initial classification result.
[0032] S13, the initial classification result is corrected using an overwrite table, and the initial classification result that does not meet the overwrite condition is replaced with a pre-stored classification result to determine the registry mapping result; wherein, the overwrite table is a structured rule table used to correct the initial classification result.
[0033] The core of this embodiment lies in acquiring seed question-and-answer data pairs from at least one domain and performing structured parsing to obtain a unified seed object; classifying the unified seed object to obtain an initial classification result; correcting the initial classification result using an overwrite table, and replacing initial classification results that do not meet the overwrite conditions with pre-stored classification results to determine the registry mapping result; wherein, the overwrite table is a structured rule table used to correct the initial classification result. The question-and-answer data pair processing method provided in this embodiment parses the seed question-and-answer data pairs into a unified structured object, and stably generates registry mapping results by linking automatic classification with a pre-stored overwrite table; when an initial classification result that does not meet the preset overwrite conditions occurs, manual overwrite and priority processing logic is further triggered, thereby solving the problems of inconsistent terminology naming, tag drift, role ambiguity, and unstable automatic classification that lead to downstream process distortion in the prior art.
[0034] Second Embodiment
[0035] The second embodiment relates to another method for processing question-and-answer data pairs. This second embodiment is an improvement upon the first embodiment; for specific improvements, please refer to the following implementation details of the question-and-answer data pair processing method. The following implementation details are provided for ease of understanding only and are not essential for implementing this solution.
[0036] Please see Figure 2 This is shown as an exemplary flowchart of another method for processing question-and-answer data pairs. Figure 2 As shown, the processing method for the question-and-answer data pairs includes:
[0037] S21, obtain at least one domain-specific seed question-and-answer data pair and perform structured parsing to obtain a unified seed object. In this embodiment, the seed question-and-answer data pair refers to high-quality original question-and-answer samples used to drive the expansion of domain-specific question-and-answer training data. The seed question-and-answer data pair includes at least information such as business background, known information, constraints, question requirements, answer structure, scoring rules, and expansion direction. The unified seed object includes at least information such as metadata fields, topic fields, question type fields, difficulty fields, role fields, evidence pattern fields, question fields, answer fields, and audit fields.
[0038] As a preferred approach, structured parsing refers to converting seed question-and-answer data pairs into uniform field objects.
[0039] S22, classify the unified seed object to obtain an initial classification result. In this embodiment, the unified seed object is classified based on preset classification rules. The preset classification rules refer to a set of rules used to automatically classify the unified seed object by topic, question type, difficulty, and role. These rules include at least keyword matching rules, field combination rules, and tag priority rules. For example, when the question field and answer field of the seed object contain words such as "calculation," "proportion," "cost," "threshold," "achievement standard," and "formula," and the answer structure contains an explicit calculation process, the seed object can be classified as a calculation analysis type. When the question field contains words such as "screening system," "process steps," "scoring standard," and "admission mechanism," and the question requests the output of a process or system solution, it can be classified as a solution type.
[0040] As a preferred embodiment, step S22 includes the following steps:
[0041] S221, using semantic features, perform keyword extraction (e.g., segmenting the title and question fields and extracting keywords), feature extraction (e.g., extracting features from the step structure in the answer field and the evaluation object in the rating field), and / or rule priority extraction on the unified seed object. In this embodiment, semantic features from the seed title, question field, answer field, rating field, and expansion field are utilized.
[0042] S222, the extracted keywords, fields, and rule priorities are matched with the various tag rules in the pre-stored registry to generate the initial classification result. In this embodiment, the pre-stored registry refers to the topic registry, question type registry, difficulty registry, role registry, evidence pattern registry, and quality gating rule set that are pre-maintained and stored in the memory.
[0043] S23, extract the key fields of the unified seed object, form the key fields into a sample expansion prompt template, and then perform controlled transformation on the dimensional attribute parameters of the sample expansion prompt template according to the preset sample expansion direction to obtain key data for generating candidate questions.
[0044] In this embodiment, the step of extracting the key fields of the unified seed object and assembling the key fields into an expansion prompt template specifically includes extracting the background context, known information, constraints, question requests, assumptions, role identifiers, question type identifiers, and difficulty identifiers from the unified seed object, and assembling them together with the evidence pattern field into an expansion prompt template.
[0045] In this embodiment, the evidence pattern field includes a priori direct generation pattern, minimum parameter package pattern, and mandatory evidence pattern, with different evidence patterns corresponding to different candidate generation constraints. Specifically, when the evidence pattern is the minimum parameter package pattern, the system detects whether the candidate question involves one or more quantitative variables such as price, quantity, threshold, payment period, ratio, KPI target value, and time limit conditions. If so, the system automatically requires the question to explicitly provide the minimum set of parameters needed to complete the reasoning; otherwise, it is judged as having insufficient parameters in subsequent gating. Furthermore, the evidence pattern field is not freely given by the generation model, but is determined by the system during the seed database stage based on mature structured field extraction, rule engine, and manual review mechanisms. Specifically, it can be determined based on the question type identifier, whether the question contains external time-sensitive facts, whether it contains quantitative variables such as price / quantity / ratio / threshold, and whether source identifiers and historical audit results appear. For example, questions involving process steps or explanations of principles are typically configured in a priori direct generation mode; questions containing cost calculations, ratio calculations, or indicator evaluations are typically configured in a minimum parameter package mode; and questions containing facts about policies, market conditions, indices, exchange rates, or the timeliness of regulations are typically configured in a mandatory evidence mode. The aforementioned background context, known information, constraints, question requirements, and assumptions belong to the question field group of a unified seed object, while role identifiers, question type identifiers, and difficulty identifiers belong to the registry mapping field group. Together, they constitute the structured input of the expanded sample prompt template, rather than ordinary natural language concatenated text.
[0046] In this embodiment, the preset expansion direction refers to the dimensions and boundaries that are allowed to be changed when transforming the seed question, including at least numerical perturbation, change of constraints, scene migration, role perspective switching, and question type retention / question type switching.
[0047] In this embodiment, the controlled transformation of the dimension attribute parameters of the expanded sample prompt template refers to parametrically rewriting the aforementioned dimensions according to the registry, evidence model, and quality gating rules without disrupting the core business logic and answerability. For example, in the supplier admission question, "domestic production area supplier" is transformed into "import trader," while supplementing constraints such as customs declaration, quarantine, delivery date, and letter of credit; or in the thermal coal blending question, the sulfur content threshold, calorific value requirement, and demurrage parameters are adjusted within a preset range, while forcibly retaining the units, formulas, and acceptance red lines. The controlled transformation itself does not generate or train a new question generation model, but rather generates structured input data that can be called by existing local models or remote inference models. Subsequently, the question generation model outputs candidate questions, and then field-level gating and reverse answerability verification determine whether the candidate questions can enter the answer generation and manual review stages.
[0048] S24, read the overwrite table and use it to correct the initial classification results. Replace the initial classification results that do not meet the overwrite conditions with pre-stored classification results to determine the registry mapping results and stabilize the subsequent process. In this embodiment, the overwrite table is a structured rule table used to correct the initial classification results. It records at least the object to be overwritten, the original classification result, the target result after overwriting, the reason for overwriting, and the timestamp. The overwrite conditions include at least insufficient confidence in automatic classification, the difference in confidence between the first candidate label and the second candidate label being lower than a preset threshold, label out of bounds, combination conflicts between topic identifiers and question type identifiers or role identifiers, role ambiguity, or historical audit failure records. The registry mapping results are obtained by matching the fields in the unified seed object with each registry entry. It unifies seed question-and-answer data from different sources and with different writing styles into a unified system executable label, thereby providing a consistent data index for subsequent expansion question construction, answer generation constraints, and audit statistics.
[0049] In this embodiment, when the same unified seed object hits multiple overwrite conditions at the same time, the final classification result is determined in the following order: "object exact matching takes precedence over category matching, rules with newer manual confirmation times take precedence over older rules, and explicit manual overwrite takes precedence over automatic classification results".
[0050] In this embodiment, seed question-and-answer data pairs are parsed into a unified structure object, and a registry mapping result is stably generated by linking automatic classification with an overwrite table. When candidate tag confidence levels are close, tag combination conflicts occur, or historical audits point to high-risk classifications, overwrite and priority processing logic is further triggered, thereby solving the problems of inconsistent terminology naming, tag drift, role ambiguity, and unstable automatic classification that lead to downstream process distortion in the prior art.
[0051] S25, call the pre-stored candidate question generation model, and input the key data into the pre-stored candidate question generation model to generate candidate questions, and then perform multi-dimensional detection on the candidate questions (in this embodiment, multi-dimensional detection is also called field-level gating, and the field-level gating checks at least whether the background context, known information, constraints, question requirements and assumptions are complete, and whether there are any dangling references, unclosed variables, question type out of bounds or role context drift).
[0052] As a preferred approach, candidate problems are subjected to multi-dimensional detection, including structural integrity detection, consistency detection, and identification of high-risk samples.
[0053] Specifically, structural integrity testing refers to determining whether the generated candidate questions contain background context, known information, constraints, question requirements, and assumptions. If so, the candidate question is structurally complete; otherwise, it is structurally incomplete. For example, if a candidate question only provides the question requirement "Please design a supplier admission scheme" without providing any supply constraints, quality constraints, or compliance constraints, it is judged to have failed the structural integrity test.
[0054] Specifically, consistency testing refers to determining whether the question type label is consistent with the question text, whether the role label is consistent with the contextual description, and whether the evidence model is consistent with the way the information is presented in the question. For example, if the question type label is a calculation and analysis type but the question text does not contain any numerical values or thresholds for calculation, or if the role label is a purchasing director but the question text requires discussion of underlying algorithms such as loss functions and model weights, then consistency is deemed to have failed.
[0055] Specifically, identifying high-risk samples refers to identifying samples containing vague references such as "the above," "the preceding text," or "see table," as well as identifying samples that require external evidence but whose sources are not provided in the question.
[0056] This application differentiates the generation constraints of candidate questions based on the evidence model and implements field-level gating immediately after the questions are generated. Therefore, it can intercept high-risk samples such as dangling references, variable non-closure, question type out-of-bounds, and role context inconsistencies before the questions enter the answer generation stage. In particular, through the minimum parameter package model, the question can be forced to supplement the minimum quantitative parameters required to complete the reasoning without introducing a complete set of external evidence, thereby reducing the fraudulent quantitative answers caused by missing parameters.
[0057] S26, candidate questions obtained through multi-dimensional detection are input into a preset answer generation model to obtain candidate answers for the candidate questions. If the evidence pattern corresponding to the candidate question is the minimum parameter package pattern, the answer generation model is restricted to answering only based on the question parameters; if the corresponding evidence must be included pattern, the answer generation model outputs a hint for supplementary evidence instead of fabricating facts when the evidence is insufficient.
[0058] S27, perform a reverse answerability verification operation on the candidate answers to determine whether the candidate answers address the question's requirements, whether they only use the information given in the question or its direct logical deduction, and whether they arbitrarily supplement unprovided key numbers, thresholds, payment terms, ratios, KPIs, or external facts. Based on preset verification trigger conditions, determine whether manual numerical verification is required for calculation-type questions. The judgment of "addressing the question's requirements" means that the answer covers the core objective of the question's requirements and provides the corresponding conclusion; the judgment of "only using the information given in the question or its direct logical deduction" means that the answer uses... Data, conditions, and conclusions can be traced back to the fields in the question or derived directly from the fields in the question through logical deduction. The judgment of "unauthorized supplementation of key figures, thresholds, payment terms, ratios, KPIs, or external facts not given" refers to the answer introducing new facts or parameters that do not appear in the fields in the question or the authorized evidence and have a decisive effect on the conclusion. Among them, when the question or answer involves at least one of the following situations: formula substitution, unit conversion, ratio / threshold / KPI derivation, multi-step arithmetic operations, interval comparison, or insufficient parameters in the question but the answer still gives a definite numerical conclusion, a manual numerical verification mark is generated.
[0059] As a preferred embodiment, the reverse answerability verification operation includes claim coverage detection, evidence dependency detection, and generating compliance markers. Claim coverage detection determines whether the answer covers the core objective of the question. Evidence dependency detection determines whether the answer relies on facts outside the question or unauthorized parameter supplementation. Compliance marker generation is used to output a manual numerical verification mark for calculation-based questions when formula substitution, unit conversion, ratio or threshold derivation, multi-step calculation, interval comparison, or missing key parameters are detected, and records the potential problem location and triggering reason.
[0060] This application effectively suppresses problems such as adding numbers out of thin air, falsifying sources, and providing unverifiable answers by continuing to restrict model behavior based on evidence patterns during the answer generation stage, and by checking whether the answer depends on facts outside the question, whether key parameters are added without authorization, and by automatically generating manual numerical verification marks when formula substitution, unit conversion, ratio or threshold derivation, multi-step calculation, interval comparison, or insufficient parameters still give a definite numerical conclusion. This improves the trainability and auditability of the answer.
[0061] S28, record the candidate questions, candidate questions that pass the multi-dimensional detection, candidate answers, and the verification results of the reverse answerability verification operation as audit records, and update the overwrite table, multi-dimensional detection rules, or prompt template based on the audit records.
[0062] This application records the candidate questions, candidate answers, the verification results of the reverse answerability verification operation and the reasons for their failure as audit logs, and uses the audit logs to reverse correct the overwrite table, gating rules and prompt templates, forming a continuously converging engineering closed loop. This solves the problem that existing technologies can only be optimized at the level of single-point generation or single-point scoring and cannot be continuously improved across the entire chain.
[0063] It is not difficult to see that the question-and-answer data pair processing method provided in this embodiment has the following beneficial effects:
[0064] First, the question-and-answer data pair processing method provided in this embodiment can further trigger manual overwriting and priority processing logic when candidate label confidence is close, label combination conflicts occur, or historical audits point to high-risk classifications. This solves the problems of inconsistent terminology naming, label drift, role ambiguity, and unstable automatic classification that lead to distortion of downstream processes in the prior art.
[0065] Second, the question-answer data pair processing method provided in this embodiment is not simply to generate question-answer pairs using a large language model, but rather to provide a closed-loop control method for training data production in highly constrained domains, which can significantly improve the consistency, answerability, verifiability and traceability of samples while ensuring expansion efficiency.
[0066] Third, the question-and-answer data pair processing method provided in this embodiment forms a combined closed loop of "structured seed parsing - automatic classification and manual overwriting linkage and conflict priority handling - evidence pattern diversion - question field-level gating - answer reverse answerability verification - audit feedback update". This closed loop can reduce the number of manual reworks in the data production pre-stage, reduce the number of unanswerable samples entering the downstream process before question candidates enter the answer generation, and improve the answer verifiability after answer generation through evidence dependency checks and manual numerical verification marking, thereby enabling the training data construction process to have a stable quality convergence effect.
[0067] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.
[0068] Third Embodiment
[0069] This embodiment provides an electronic device. The electronic device can be various forms of digital computer, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, mainframe computers, cellular phones, smartphones, wearable devices, and other similar computing devices.
[0070] The electronic device includes: one or more processors; and a memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the question-and-answer data pair processing method provided in any one or more of the above embodiments.
[0071] Figure 3 An exemplary structural diagram of the electronic device is disclosed. The electronic device includes one or more processors 1101, a memory 1102, an input device 1103, and an output device 1104. The various components are interconnected via a bus or other means (the diagram shows an example of bus connection). The processor 1101 can be used to execute instructions stored in the memory 1102 to control the overall operation of the electronic device. The memory 1102 may include a program storage area and a data storage area, wherein the program storage area stores the operating system and applications required for at least one function; the data storage area stores data created according to the use of the electronic device, etc. The memory 1102 may include high-speed random access memory and may also include non-transitory memory, such as disk storage devices, flash memory devices, or other non-transitory solid-state storage devices. In some embodiments, the memory 1102 may also include storage resources located remotely to the processor and accessible via a network.
[0072] Input device 1103 can be used to receive input numerical or character information or user operation signals, such as a touch screen, keypad, mouse, trackpad, touchpad, indicator, one or more mouse buttons, trackball, joystick, etc. Output device 1104 may include display devices (such as liquid crystal displays, light-emitting diode displays, plasma displays, and optional touch screens), auxiliary lighting devices (such as LEDs), and haptic feedback devices (such as vibration motors), etc.
[0073] To facilitate user interaction, the electronic device may be configured to include a display device (such as an LCD or CRT monitor) and input devices such as a keyboard and pointing devices (e.g., a mouse or touchpad). Feedback can be any form of sensory feedback (e.g., visual feedback, auditory feedback); input may also be received via voice, touch, or other means.
[0074] This application also relates to a computer-readable medium storing a computer program / instructions thereon, which, when executed by a processor, implement the steps of the question-and-answer data pair processing method provided in any one or more of the above embodiments. The computer-readable medium may be a memory included in an electronic device, or it may be a standalone storage medium not assembled into the device.
[0075] It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium, a computer-readable storage medium, or a combination of both. Examples include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. Specific examples of storage media may include, but are not limited to, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory, optical fibers, portable CD-ROMs, optical storage devices, magnetic storage devices, etc., or any suitable combination thereof.
[0076] Computer-readable media may store one or more programs that can be used by or in conjunction with an instruction execution system. The media may be permanent or non-permanent, removable or non-removable, and may store information by any method or technology, including computer-readable instructions, data structures, program modules, or other data.
[0077] The computer program code used to implement the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages (such as Java, Smalltalk, and C++) and conventional procedural programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. The remote computer can be connected to the user's computer via any network (including a local area network or a wide area network) or can be connected to an external computer.
[0078] In the above embodiments, the functions can be implemented in whole or in part by software, hardware, firmware, or any combination thereof, for example, by using application-specific integrated circuits, general-purpose computers, or other similar hardware devices. In some embodiments, the software program of this application can be executed by a processor to implement the steps or functions; it can also be implemented by hardware, for example, as a circuit that works in conjunction with the processor to execute the steps or functions.
[0079] This application also provides a computer program product, including one or more computer programs / instructions, which, when executed by a processor, generate all or part of the processes or functions described in this application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one storage medium to another via wired (e.g., DSL) or wireless (e.g., wireless, microwave) means. The computer-readable storage medium may be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).
[0080] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0081] The scope of this application is defined by the appended claims rather than the foregoing description, and is therefore intended to encompass all variations falling within the meaning and scope of equivalents of the claims. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device in software or hardware. Terms such as "first," "second," etc., are used only for distinguishing descriptions and do not indicate any particular order, nor should they be construed as indicating or implying relative importance.
[0082] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily made by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.
Claims
1. A method for processing question-and-answer data pairs, characterized in that, The processing method includes: Obtain seed question-and-answer data pairs from at least one domain and perform structured parsing to obtain a unified seed object; The unified seed objects are classified to obtain initial classification results; The initial classification results are corrected using an overwrite table, and initial classification results that do not meet the overwrite conditions are replaced with pre-stored classification results to determine the registry mapping results; wherein, the overwrite table is a structured rule table used to correct the initial classification results.
2. The method for processing question-and-answer data pairs according to claim 1, characterized in that, Classifying the unified seed object to obtain initial classification results includes: Using semantic features, keyword extraction, feature extraction, and / or... are performed on the unified seed object. Or extract based on rule priority; The extracted keywords, fields, and rule priorities are matched with the various tag rules in the pre-stored registry to generate the initial classification results.
3. The method for processing question-and-answer data pairs according to claim 1, characterized in that, Before determining the registry mapping result, the processing method further includes: Extract the key fields of the unified seed object, and combine the key fields to form a sampling hint module. plate; Based on the preset expansion direction, the dimensional attribute parameters of the expansion prompt template are subjected to controlled transformation. To obtain key data for generating candidate questions.
4. The method for processing question-and-answer data pairs according to claim 3, characterized in that, After generating the candidate question generation model, the processing method further includes: Invoke the pre-stored candidate question generation model and input the key data into the pre-stored candidate question generation model to generate candidate questions; The candidate problems are subjected to multi-dimensional detection.
5. The method for processing question-and-answer data pairs according to claim 4, characterized in that, The candidate problem is subjected to multi-dimensional detection, including structural integrity detection, consistency detection, and identification of high-risk samples.
6. The method for processing question-and-answer data pairs according to claim 4, characterized in that, After performing multi-dimensional detection on the candidate questions, the processing method further includes inputting the candidate questions that have passed the multi-dimensional detection into a preset answer generation model to obtain candidate answers for the candidate questions, and performing a reverse answerability verification operation on the candidate answers to obtain candidate answers that have passed the reverse answerability verification operation; wherein, the reverse answerability verification operation includes claim coverage detection, evidence dependence detection, and generation of compliance markers.
7. The method for processing question-and-answer data pairs according to claim 6, characterized in that, After performing a reverse answerability verification operation on the candidate answers, the method for processing the question-answer data pairs further includes recording the candidate questions, the candidate questions that pass the multi-dimensional detection, the candidate answers, and the verification results of the reverse answerability verification operation as audit records, and updating the overwrite table, multi-dimensional detection rules, or prompt template based on the audit records.
8. An electronic device, characterized in that, The electronic device includes: One or more processors; and A memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the question-and-answer data pair processing method as described in any one of claims 1 to 7.
9. A computer-readable medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the question-and-answer data pair processing method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the method for processing question-and-answer data pairs as described in any one of claims 1 to 7.