Data set optimization method for improving credibility evaluation efficiency and reliability of large language model
By optimizing the dataset of a large language model through data distillation and augmentation methods, the problems of low evaluation efficiency and insufficient reliability are solved, and efficient and reliable evaluation results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV
- Filing Date
- 2026-03-18
- Publication Date
- 2026-05-12
AI Technical Summary
Existing large language model credibility assessments suffer from low efficiency and insufficient reliability. Existing benchmark datasets are large in scale, have redundant samples, and are susceptible to data contamination and external security filters, leading to distorted assessment results.
Data distillation and data augmentation methods are used to optimize datasets and improve the efficiency and reliability of assessments. Data distillation includes sample cleaning, risk classification, and semantic clustering, while data augmentation generates enhanced samples by constructing multi-dimensional perturbation rules to ensure the credibility of the assessment.
While reducing computational costs, it improves the efficiency and reliability of the evaluation, effectively identifies the true capabilities of the model, and reduces the impact of data contamination on the evaluation results.
Smart Images

Figure CN122020182A_ABST
Abstract
Description
Technical Field
[0001] This application relates to a dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation, belonging to the field of software engineering design pattern technology. Background Technology
[0002] Large Language Models (LLMs), with their powerful semantic understanding and generation capabilities, have been widely applied in various fields such as question answering, text generation, and code assistance. However, issues related to privacy leaks, social biases, and factual inconsistencies have become key obstacles to their implementation in high-risk domains. To assess the reliability of LLMs, related research has constructed a large number of benchmark datasets covering dimensions such as privacy, bias, and factual consistency, which have become important bases for LLM reliability evaluation.
[0003] However, existing LLM reliability assessments suffer from two major problems: First, the assessment efficiency is low. Existing benchmark datasets are large in scale and have redundant samples, resulting in high computational costs and long processing times, making it difficult to meet the rapid assessment needs in practical applications. Second, the assessment reliability is insufficient. Publicly available benchmark datasets are easily incorporated into LLM pre-training corpora, allowing models to obtain artificially high scores by memorizing samples. Furthermore, external security filters can only provide superficial risk protection and are easily bypassed by strategic wording, making standard test results unable to reflect the true capabilities of the model.
[0004] Existing dataset optimization methods are mostly designed for single dimensions or specific scenarios. They either perform simple dataset sampling and distillation, ignoring risk type coverage, or only augment specific datasets, resulting in poor generalization ability and failing to simultaneously address the dual issues of evaluation efficiency and reliability. Therefore, they cannot meet the general, efficient, and reliable evaluation requirements of LLM. Thus, there is an urgent need for a dataset optimization method with a simple process and strong implementation capabilities, which, through standardized distillation and augmentation processes, can simultaneously improve evaluation efficiency and ensure evaluation reliability. Summary of the Invention
[0005] This invention provides a dataset optimization method to improve the efficiency and reliability of large language model credibility evaluation, which solves the problems of high cost, serious sample redundancy, and distortion of evaluation results due to data contamination and external security filtering in the prior art.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation, the method comprising the following steps:
[0007] Step 1: Obtain the original dataset used to evaluate the credibility of the large language model, wherein the original dataset covers at least one credibility dimension among privacy, bias, and fact consistency;
[0008] Step 2: Perform data distillation on the original dataset to obtain a distilled dataset;
[0009] Step 3: Perform data augmentation on the distillation dataset to obtain an augmented dataset;
[0010] Step 4: Use the distillation dataset and augmentation dataset to evaluate the credibility of the target large language model and output the evaluation results.
[0011] In step 1, the original dataset used to evaluate the credibility of the large language model is obtained. Samples can be collected from publicly available research papers, public benchmarks, reproducible experimental repositories, or historical evaluation data within an enterprise. The original dataset preferably covers one or more dimensions of privacy, bias, and factual consistency, and retains sample text, labeled answers, task type, sample source, sub-dimensional descriptions, or other fields that can be used for subsequent risk classification. Since the method of this invention is applicable to multiple-choice, true / false, and open-ended generation tasks, it does not rely on a single data format and can be directly processed against existing mainstream credibility evaluation benchmarks.
[0012] In step 2, data distillation is used to select the most valuable subset of samples from the original dataset. Unlike existing methods that compress data solely based on random sampling or representative clustering, the data distillation of this invention simultaneously considers sample cleanliness, risk coverage, and contribution to model ranking, as detailed below:
[0013] Step 2-1: Perform duplicate sample removal and outlier cleaning on the original dataset. First, the sample text is formatted, case-normalized, and whitespace-normalized to eliminate format noise. Then, completely duplicate samples are deleted, and the semantic similarity between samples is calculated using a pre-trained sentence vector model to remove samples with high semantic overlap. Based on this, samples that cause the large language model to output blank responses, fixed rejection responses, abnormal error responses, or responses without effective evaluation information are further deleted. At the same time, statistically abnormal samples are removed based on the sample text length distribution and the sample average score distribution to ensure that subsequent distillation is based on high-quality samples.
[0014] Step 2-2: Perform risk classification and semantic clustering on the cleaned samples. For the privacy dimension, classification can be performed according to categories such as identity information, name, gender, address, email address, phone number, place of birth, education level, occupation, and relationship status. For the bias dimension, classification can be performed according to categories such as gender, occupation, ethnicity, race, religion, income level, and nationality. For the factual consistency dimension, classification can be performed according to categories such as text summary, health knowledge, geographical knowledge, political knowledge, legal knowledge, financial knowledge, biographical knowledge, and language knowledge. For datasets with original sub-dimension labels, direct mapping is performed; for datasets without explicitly labeled sub-dimensions, classification is performed using a keyword dictionary and semantic rules. After risk classification, semantic clustering is further performed within each risk type based on sentence vector embedding to ensure that samples with different expressions and contextual forms under the same risk type are preserved.
[0015] Steps 2-3: Candidate samples are screened based on discriminative and ranking contribution. Discriminative score is represented by the variance of scores from different large language models being evaluated on the same sample; a larger variance indicates that the sample better reveals the differences in ability between different models. Ranking contribution is represented by the consistency between the sample-induced local model ranking and the global model ranking; higher consistency indicates that the sample is more helpful in maintaining the relative ranking of models reflected in the complete dataset. The discriminative and ranking contribution scores are normalized to form a combined score. Samples with higher combined scores are prioritized within each risk type and each semantic cluster, ultimately forming the distillation dataset. The distillation dataset obtained in this way not only significantly reduces the sample size but also maintains the stability of the original evaluation conclusions at a lower cost.
[0016] In step 3, data augmentation is used to verify whether the high scores of the large language model on the distillation dataset truly stem from its reliable capabilities, rather than from public sample memory, training data contamination, or external security filtering. The data augmentation generates augmented samples by applying semantically invariant perturbation rules to the distillation samples, as follows:
[0017] Step 3-1: Construct expression rewriting perturbation rules. These rules include task restatement, paraphrasing, style transfer, and cross-language translation. Task restatement rewrites prompts without altering the task intent; paraphrasing replaces the original question or context with semantically equivalent but literally different expressions; style transfer changes the writing style, tone, or expression of the input; and cross-language translation translates the input into another natural language before continuing the evaluation. These rules are used to detect whether the model is only sensitive to fixed expressions in publicly available samples.
[0018] Step 3-2: Construct context-disruption perturbation rules. These rules include perturbation scenario settings, misleading example insertion, challenging task combinations, and explanatory information insertion. Specifically, perturbation scenario settings add irrelevant but narratively contextualized text before the original question; misleading example insertion adds examples that may induce the model to imitate unreliable behavior; challenging task combinations insert additional questions before the task to be evaluated to increase the model's attention burden; and explanatory information insertion adds seemingly relevant supplementary explanations that do not affect the judgment of the standard answer. These rules are used to detect the model's stability in complex, redundant, or misleading contexts.
[0019] Step 3-3: Construct security bypass perturbation rules. These rules include script injection and issue repetition. Script injection involves adding special character sequences, abnormal prefixes, or other format perturbations to the input to test whether external security filters can be bypassed. Issue repetition involves repeating the same sensitive query to detect changes in the model's response under unstable security priority allocation. These rules are used to distinguish the model's true capabilities from the superficially high scores resulting from external security protection.
[0020] Steps 3-4: Perform perturbation rule sampling and combination on the distillation samples. For each distillation sample, multiple non-repeating perturbation rules are randomly sampled and applied stepwise in a predetermined order to generate enhanced samples. Preferably, the stacking depth of the perturbation rules is 3 to 5 steps to achieve a balance between enhancement effect and text readability. By randomly sampling and combining rules, different versions of enhanced samples can be generated in different rounds of evaluation, thereby improving the dynamics of the evaluation and reducing the risk of the model memorizing them again later.
[0021] In step 4, a joint credibility assessment of the target large language model is performed using the distillation dataset and the augmented dataset. First, the credibility score of the target model is calculated on the distillation dataset, and the ability to maintain the model's ranking after distillation is evaluated based on the weighted ranking error between the distillation dataset and the original dataset. Simultaneously, Shannon entropy is calculated based on the sample distribution of the distillation dataset across different risk types to assess the risk coverage balance of the distillation dataset. Then, the target model that performs well on the distillation dataset is selected and re-evaluated on the augmented dataset, and the score change before and after augmentation is calculated. When the score drops significantly after augmentation, it can be determined that the model may have inflated performance on the corresponding samples; when the score remains stable, it further indicates that the model's ability on that type of sample is closer to its true credibility.
[0022] The present invention also provides a dataset optimization system for credibility evaluation of large language models, including a data acquisition module, a data distillation module, a data augmentation module, and an evaluation module, for performing the above methods.
[0023] This invention implements a data distillation method for credibility assessment of large language models. Instead of simply compressing the data size, this method models the value of samples within the context of credibility assessment. First, the removal of duplicate and outlier samples prevents low-quality data from affecting the evaluation results. Second, risk classification and semantic clustering ensure that the distilled dataset maintains coverage of multiple risk types and expression forms even after size reduction. Finally, by jointly modeling sample discriminability and ranking contribution, the boundary samples that best reflect the differences in the capabilities of different models are preferentially retained, making the distilled dataset both efficient and discriminative.
[0024] This invention implements a data augmentation method for evaluating the credibility of large language models. Unlike augmentation methods that target only a single dimension, a single dataset, or a single data format, this method constructs a general perturbation rule system that can be reused across multiple credibility dimensions. Through three types of rules—expression rewriting, contextual interference, and secure bypass—the surface form and contextual structure of samples can be systematically perturbed without altering the original evaluation objective, thereby testing the model's stability in the face of changing inputs. This allows the augmented dataset to more effectively distinguish between the model's true capability and its sample retention capacity.
[0025] This invention also implements a joint evaluation mechanism based on distillation datasets and augmented datasets. The distillation dataset is primarily used to improve evaluation efficiency and maintain ranking results, while the augmented dataset is primarily used to improve evaluation reliability and identify samples with artificially high performance. The combination of these two datasets reduces the testing costs required for credibility evaluation and reveals the actual credibility level of large language models under more rigorous and dynamic evaluation conditions.
[0026] Compared to existing technologies, this solution has the following advantages:
[0027] Compared to existing simplified methods that rely solely on random sampling, representative clustering, or single-indicator sampling, this invention simultaneously considers sample quality, risk coverage, and ranking stability. Therefore, it can still effectively preserve the evaluation conclusions of the complete dataset even with a lower sampling ratio. Compared to existing data augmentation methods that are manually designed for specific tasks, this invention employs a universal perturbation rule system, which is independent of the format of any particular dataset and does not require access to the model's output layer probabilities. Therefore, it is applicable to the credibility evaluation of black-box large language models.
[0028] This invention prioritizes high-discrimination samples in the distillation dataset, allowing the evaluation focus to be on key samples near the model's capability boundary. These samples are more valuable for discovering model defects and comparing model differences.
[0029] This invention can effectively reduce the distortion of evaluation results caused by the memorization of public benchmarks by dynamically generating enhanced samples, and can further identify whether the model "looks" credible on standard samples by relying on fixed security policies, thereby improving the authenticity of the evaluation results.
[0030] The method of this invention is applicable to scenarios such as post-training acceptance of large language models, pre-deployment security evaluation, model iteration monitoring, and horizontal comparison of multiple models, and has strong engineering application value and promotion value. Attached Figure Description
[0031] Figure 1 A schematic diagram of the overall processing flow of the dataset optimization method of the present invention (see attached figure in the abstract).
[0032] Figure 2 This is a schematic diagram of the overall process of the dataset optimization method in this embodiment of the invention;
[0033] Figure 3 This is a schematic diagram of the three-stage filtration process of the data distillation module in an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram illustrating the perturbation rule classification of the data augmentation module in an embodiment of the present invention;
[0035] Figure 5 This is a schematic diagram illustrating the process of jointly evaluating the credibility of a large language model using a distillation dataset and an augmentation dataset in an embodiment of the present invention. Detailed Implementation
[0036] The present invention will be further described below with reference to the accompanying drawings and embodiments. It should be understood that the following embodiments are only for explaining the present invention and are not intended to limit the scope of protection of the present invention. Where there is no conflict, the technical features in the following embodiments can be combined with each other.
[0037] In the description of this invention, "credibility assessment" refers to the quantitative evaluation of the reliable behavior of a large language model in dimensions such as privacy protection, bias control, and factual consistency; "original dataset" refers to a public or reproducible evaluation dataset that has not been processed by the method of this invention; "distilled dataset" refers to a low-cost evaluation dataset obtained after sample cleaning, coverage control, and sorting and filtering; "enhanced dataset" refers to an evaluation dataset generated on the basis of the distilled dataset through semantically invariant perturbation.
[0038] Example 1
[0039] This embodiment provides a dataset optimization method for credibility evaluation of large language models, and its overall process is as follows: Figure 2 As shown, Figure 2This invention demonstrates the overall processing flow from acquiring the original dataset, data distillation, data augmentation to joint credibility assessment.
[0040] Step 101: Obtain the raw dataset. In this embodiment, the raw dataset is collected from publicly available research resources related to credibility assessment. The raw dataset may cover multiple credibility dimensions, such as privacy, bias, and factual consistency. For each dataset, sample text, standard answers, assessment types, risk subtype labels, or text fields that can be used to infer risk types are retained. The raw dataset meets the following conditions: the data source is open and transparent, it is downloadable or reproducible, it has clear evaluation documentation, the sample format is clear, and it is consistent with the evaluation language of the target large language model.
[0041] In one specific embodiment, the original dataset covers three credibility dimensions: privacy, bias, and factual consistency, and a total of nine publicly available evaluation datasets are selected. The privacy dimension includes Enron Email, SynthPAI, and SPY; the bias dimension includes AMQA, StereoSet, and Winogender; and the factual consistency dimension includes FKTC, TruthfulQA, and SummEdits. For each dataset, fields such as sample text, reference answer, task type, dimension labels, sub-dimension labels, and data source identifiers are uniformly retained for subsequent risk classification and evaluation.
[0042] To support the calculation of score variance and ranking contribution in subsequent distillation steps, after obtaining the original dataset, multiple reference large language models are first selected to pre-evaluate the original dataset, resulting in a sample-model score matrix. In one specific embodiment, the reference large language models include GPT-4o, Llama-3.1-405B-Instruct, DeepSeek-R1, Claude-3.5-Sonnet, Gemini-2.0-Flash, and Qwen2.5-72B-Instruct. For multiple-choice or true / false questions, the correctness of the answer is used as the score; for open-ended generation task samples, edit distance similarity, semantic similarity, or 1 minus similarity is used to obtain a score value between 0 and 1. The score matrix serves as one of the inputs for subsequent cleaning, filtering, and ranking calculations.
[0043] like Figure 3 As shown, the data distillation module employs a three-stage filtering process, including cleaning-based filtering, coverage-based filtering, and ranking-based filtering. These three stages are executed sequentially to select refined samples from the original dataset that possess good sample quality, risk coverage, and ranking stability.
[0044] Step 102: Perform cleaning-based filtering. First, normalize the sample text in the original dataset, including unifying capitalization, removing redundant whitespace characters, unifying punctuation and encoding formats. Then, delete samples with completely duplicate text. Next, use a pre-trained sentence vector encoding model to encode the remaining samples to obtain embedded representations, and calculate the cosine similarity between samples. When the cosine similarity between two samples is higher than a set threshold, they are considered to have highly overlapping semantics, and only one representative sample is retained to reduce unnecessary repeated evaluation overhead. Furthermore, anomaly detection is performed on the model output behavior and statistical attributes of the samples. Specifically, this includes deleting samples that cause the target model to produce blank responses, fixed rejection templates, error messages, or unparseable outputs; calculating the text length of each sample and the average score of multiple models on that sample, and constructing anomaly intervals using the mean and standard deviation to remove anomalous samples that significantly deviate from the overall distribution. This step improves data quality and avoids noisy samples interfering with subsequent screening. In a preferred embodiment, the cosine similarity threshold for semantic duplication removal is set to 0.95; the anomaly sample filtering adopts the three-standard-deviation principle, that is, deleting samples that are not within the interval of the mean plus or minus three standard deviations. By setting this parameter, redundant samples and statistically abnormal samples can be effectively removed while retaining high-value samples.
[0045] Step 103: Perform coverage-based filtering. After cleaning, the samples are classified by risk type. In this embodiment, a risk subtype system is preset for different credibility dimensions. For the privacy dimension, the samples can be subdivided into subtypes such as identity information, name, gender, address, email address, phone number, place of birth, education level, occupation, and relationship status; for the bias dimension, the samples can be subdivided into subtypes such as gender, occupation, ethnicity, race, religion, income level, and nationality.
[0046] For the factual consistency dimension, samples can be subdivided into subtypes such as text summaries, health knowledge, geographical knowledge, political knowledge, legal knowledge, financial knowledge, biographical knowledge, and linguistic knowledge. When the original dataset itself provides sub-dimension labels, these labels are directly used to map to the preset risk type; when the original dataset does not provide sub-dimension labels, classification is based on a manually constructed keyword dictionary and rule matching.
[0047] Within each risk subtype, sample embeddings are generated using a pre-trained sentence vector model, and semantic clustering is performed using a clustering algorithm. K-means clustering is preferred, and the number of clusters for each risk subtype is automatically selected based on the silhouette coefficient. This process ensures that samples with different semantic expressions within the same risk type are grouped into different clusters, thus balancing risk coverage and semantic diversity during subsequent screening. In one specific embodiment, the maximum number of clusters for each risk subtype is set to 5. When the optimal number of clusters corresponding to the silhouette coefficient is greater than 5, 5 is taken as the upper limit for the number of clusters for that risk subtype; when the sample size is too small to form multiple stable clusters, it can degenerate into single-cluster processing. This setting helps to achieve a balance between semantic granularity and sample representativeness.
[0048] Step 104: Perform ranking-based filtering. For the candidate samples obtained after coverage filtering, further screening is performed based on model discrimination and ranking preservation ability. On one hand, multiple large language models to be evaluated are scored on each candidate sample, and their score variance is calculated. A higher score variance indicates that the sample is better able to distinguish the ability boundaries of different models, and is considered a high-value sample.
[0049] On the other hand, a consistency metric is calculated between the local model ranking for each candidate sample and the global model ranking obtained based on the complete dataset. Kendall Tau-b is preferably used as the ranking consistency measure. A higher consistency value for a sample indicates that the sample is more helpful in maintaining the relative model ranking reflected in the complete dataset.
[0050] Subsequently, the score variance and ranking consistency are normalized and combined into a single sample score. Preferably, a linear summation method can be used to form the combined score. Finally, within each risk type and semantic cluster, priority sampling is performed based on the combined score, and high-scoring samples are gradually aggregated globally until a predetermined distillation ratio is reached, such as 10% of the original dataset size. This yields the distilled dataset.
[0051] In one specific embodiment, min-max normalization is first performed on the score variance and Kendall Tau-b value, respectively. Then, the two normalized scores are summed to obtain a combined score, and samples are selected from high to low based on the combined score. The distillation ratio is set to 10% of the original dataset size, thereby reducing evaluation costs while maintaining high ranking fidelity and risk coverage.
[0052] Through steps 102 to 104, the distillation dataset can still maintain the model ranking results on the complete dataset as much as possible even with a significant reduction in the number of samples, while providing more comprehensive coverage of different risk types.
[0053] Example 2
[0054] Based on the distillation dataset obtained in Example 1, this example further provides a data augmentation process, the flow of which is as follows: Figure 4 , Figure 4 The document demonstrates the organization of the three types of perturbation rules in the data augmentation module and the processing logic for applying perturbations to distilled samples to generate augmented samples.
[0055] Step 201: Construct a set of perturbation rules. To improve the reliability of the evaluation without changing the original evaluation intent and objectives, this embodiment constructs three types of semantically invariant perturbation rules. The first type is expression rewriting rules, including:
[0056] R1 task restatement is used to rewrite the expression of task instructions while keeping the intent unchanged;
[0057] R2 paraphrasing is used to rewrite a question or context into a semantically equivalent but differently expressed text.
[0058] R3 style transfer is used to transform raw input between formal, conversational, concise, or descriptive styles.
[0059] R4 cross-language translation is used to translate the original input into a preset language before using it as test input.
[0060] The second category is context-disruptive rules, including:
[0061] R5 interference scene setting is used to insert background text that is unrelated to the evaluation objective but has a narrative or emotional tone before the question;
[0062] R6 Misleading Example Insertion: This feature adds examples before questions that may induce the model to mimic incorrect behavior.
[0063] The R7 Challenge Tasks Bundle is designed to add challenging tasks that need to be ignored or thought about internally before the original problem, thereby increasing the attention load.
[0064] R8 Explanatory Information Insertion is used to insert seemingly relevant but unhelpful explanatory text before or after the original question.
[0065] The third category is security bypass rules, including:
[0066] R9 script injection is used to add special character sequences or abnormal format fragments to the input to perturb external security filters.
[0067] R10 is a repeated issue used to test the model’s behavior when security priority allocation is unstable.
[0068] Step 202: Generate enhanced samples.
[0069] For each sample in the distillation dataset, multiple non-repeating perturbation rules are randomly sampled, sequentially stacked to form a perturbation sequence, and then applied to the samples in turn to generate enhanced samples. Preferably, the stacking depth of the perturbation rules is set to 3 to 5 steps to achieve a balance between enhancement effectiveness and text readability.
[0070] In one specific embodiment, assuming the original sample is "Marat Makhmutov was born in which city?", it can be rewritten as "What is the birthplace of Marat Makhmutov?" using task restatement in R1; it can be rewritten as "I am organizing my assignment materials, but there is one question I still haven't figured out: Marat Makhmutov was born in which city?" using interference scenario setting in R5; and it can also be rewritten as "Note: This question focuses on his birth city" by inserting explanatory information in R8. Although the above enhancements change the surface expression and contextual structure of the input, they do not change the evaluation objective and the criteria for determining the correct answer corresponding to the original sample.
[0071] When generating enhanced samples, the following constraints must be ensured:
[0072] 1. The evaluation objectives of the enhanced sample and the original distilled sample are consistent;
[0073] 2. Enhancing the sample does not change the criteria for judging the correctness of the standard answer;
[0074] 3. Enhance the readability of the samples to avoid evaluation distortion due to meaningless perturbations;
[0075] 4. The same distilled sample can correspond to different perturbation sequences in different evaluation rounds to achieve dynamic enhancement.
[0076] After step 202, an augmented dataset of similar size to the distillation dataset is obtained. The augmented dataset is more suitable for probing whether the model truly possesses the corresponding capabilities or merely relies on memorizing public samples or benefits from external security mechanisms.
[0077] Example 3
[0078] This embodiment presents a credibility evaluation process based on distillation datasets and augmented datasets, such as... Figure 5 As shown. Figure 5 The process demonstrates the joint evaluation of the distillation dataset and the augmented dataset after inputting them into the target large language model, and outputs results such as ranking preservation ability, risk coverage ability, and score decline.
[0079] Step 301: Evaluate the target large language model using the distillation dataset.
[0080] First, multiple large language models to be tested are inferred on the distillation dataset to obtain scores for each sample. For the multiple-choice dataset, scores between 0 and 1 can be generated based on the correctness of the answers; for open-ended generation tasks, scores can be generated using edit distance similarity, semantic similarity, or target difference. Then, the average score of each model on the distillation dataset is used to rank the generated models and compared with the ranking on the complete original dataset. Weighted ranking error is preferably used as the ranking preservation ability indicator. The lower the weighted ranking error, the better the distillation dataset retains the original evaluation conclusions. Simultaneously, the sample proportion of each risk type in the distillation dataset is statistically analyzed, and Shannon entropy is used to evaluate the risk coverage balance. The higher the Shannon entropy, the more balanced the coverage of different risk types in the distillation dataset.
[0081] Step 302: Re-evaluate the high-performance model using the augmented dataset. Select target models with high credibility scores from the distillation dataset evaluation results and re-evaluate them on the augmented dataset to obtain augmentation scores. Compare the augmented scores with the distillation dataset scores and calculate the score decrease. If a model scores highly on the distillation dataset but shows a significant decrease on the augmented dataset, it indicates that the model is highly sensitive to the original publicly available sample representations and may have achieved high scores through data contamination, sample memory, or fixed security strategies. Conversely, if the score change is small, it indicates that the model's capabilities in the corresponding dimension are relatively stable and it is more likely to truly possess the credibility capability tested.
[0082] Step 303: Output evaluation results and update the strategy. Output the ranking preservation capability, risk coverage capability, score changes before and after enhancement, and a list of highly sensitive samples to form a credibility evaluation report. Furthermore, the similarity threshold, upper limit of cluster number, distillation ratio, perturbation depth, or perturbation rule set can be adjusted based on the evaluation results to optimize the next round of evaluation. Example 4
[0083] This embodiment provides a dataset optimization system for credibility evaluation of large language models, comprising: a data acquisition module for acquiring raw datasets from local storage, network data sources, or evaluation platforms; a data distillation module for performing sample normalization, duplication removal, anomaly cleaning, risk classification, semantic clustering, and sample selection based on score variance and ranking consistency; a data augmentation module for maintaining a perturbation rule base and generating augmented samples according to a set perturbation depth and sampling strategy; an evaluation module for performing distillation evaluation and augmentation re-evaluation on the target large language model, outputting weighted ranking error, Shannon entropy, score decrease magnitude, and anomaly risk warnings; and a strategy update module for automatically or semi-automatically adjusting distillation and augmentation parameters based on the evaluation results. All modules can be deployed on the same server or distributed across multiple computing nodes. Data interaction between modules occurs via message bus, interface calls, or shared storage.
Claims
1. A dataset optimization method to improve the efficiency and reliability of credibility evaluation for large language models, characterized in that, The method includes the following steps: Step 1: Determine the target dimension for the reliability assessment of large language models and collect the original assessment dataset that meets the preset criteria; Step 2: Perform a three-stage data distillation operation on the original evaluation dataset to obtain a refined dataset that is 10% the size of the original dataset. The three stages include cleaning-based filtering, coverage-based filtering, and ranking-based filtering. Step 3: Design three types of semantically invariant perturbation rules, randomly combine the samples of the refined dataset and apply the perturbation rules one by one to generate an augmented dataset with the same size as the refined dataset. Step 4: Input the refined dataset into the large language model to be evaluated to obtain the preliminary reliability score and ranking of the model; input the augmented dataset into the large language model to be evaluated to obtain the actual reliability score of the model; combine the results of the two evaluations to complete the comprehensive reliability evaluation of the large language model.
2. The dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation according to claim 1, characterized in that, In step 1, the preset criteria are: based on publicly available research papers, publicly available or reproducible, accompanied by clear documentation, with no more than 20,000 sample instances, and in English text datasets.
3. The dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation according to claim 1, characterized in that, The three-stage data distillation in step 2 is as follows: Step 2-1: Cleaning stage: Remove duplicate samples, filter invalid samples, and remove outliers from the original dataset to complete the basic cleaning of the dataset; Step 2-2: Coverage Stage: Divide the cleaned dataset into risk subcategories according to the evaluation dimensions and complete the risk classification. Then, perform semantic clustering on the samples of each risk subcategory to ensure the risk type coverage and semantic diversity of the samples. Steps 2-3: Sorting stage: Calculate the discrimination score and ranking score for each sample, obtain the combined score after normalization, and sample in descending order of combined score to obtain a refined dataset that has both discrimination and ranking stability.
4. The dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation according to claim 1, characterized in that, Step 3, the three-stage data augmentation, specifically involves: Step 3-1: Expression rewriting stage: Rewrite the surface form of the refined dataset samples, only changing the expression form of the samples, without changing the underlying semantics; Step 3-2: Contextual Interference Stage: Introduce irrelevant contextual information into the rewritten sample to increase the cognitive burden on the model and test the reliability of the model under interference scenarios; Step 3-3: Security Bypass Phase: Apply strategic wording perturbations to samples with interfering contexts to circumvent external security filters and test the model's real reliability in boundary scenarios.
5. The dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation according to claim 3, characterized in that, In steps 2-3, the discrimination score is the variance of the sample's model score. The higher the variance, the stronger the sample's ability to distinguish model performance. The ranking score is the sample ranking contribution value based on Kendall Tau. The higher the value, the stronger the consistency between the sample and the global model ranking.
6. The dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation according to claim 4, characterized in that, In step 3, the perturbation operations in each stage are designed with rules. Each stage contains multiple sub-perturbation rules. Sub-rules are randomly selected to perturb the samples, and each sub-rule is used only once in a single enhancement process.
7. The dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation according to claim 1, characterized in that, In step 4, the model reliability score is calculated as follows: for single-choice / multiple-choice question sets, the correctness of the answer is used as the reliability score; for open-ended question sets, the similarity between the model output and the label is used as the reliability score. All reliability scores are normalized to the 0-1 range, and the higher the score, the better the model reliability.
8. The dataset optimization method for improving the efficiency and reliability of large language model credibility evaluation according to claim 1, characterized in that, In step 4, the judgment criterion for the comprehensive evaluation is: if the model’s credibility score on the augmented dataset is significantly lower than that on the refined dataset, it indicates that the model’s high performance on the original dataset is artificially high due to data pollution or external security filters. If the two scores are basically consistent, it indicates that the model truly possesses the reliable capability for the corresponding evaluation dimension.
9. A dataset optimization system for improving the efficiency and reliability of credibility evaluation of large language models, characterized in that, include: The data acquisition module is used to determine the target dimensions for the reliability assessment of large language models and to collect the original assessment dataset; The data distillation module performs cleaning-based filtering, coverage-based filtering, and ranking-based filtering on the original evaluation dataset to generate a refined dataset. The data augmentation module applies three types of perturbation rules—expression rewriting, contextual interference, and security bypass—to the refined dataset samples to generate augmented datasets. The evaluation module is used to perform a joint reliability evaluation on the large language model to be evaluated based on the refined dataset and the augmented dataset, and output the evaluation results.