CN-122021871-A - Method, apparatus and storage medium for suppressing large model illusion
Abstract
The application discloses a method, equipment and storage medium for inhibiting large model illusion, wherein the method for inhibiting large model illusion comprises the steps of carrying out shielding treatment on acquired original data to be queried to obtain shielding data; and adjusting the obtained initial large model according to the negative question-answer pair and the shielding data pair to obtain a target large model. According to the scheme, the illusion problem generated when the large model is used for solving the problem of data defects can be reduced.
Inventors
- ZHANG HAILONG
Assignees
- 浙江大华技术股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251216
Claims (10)
- 1. A method of suppressing a large model illusion, the method comprising: Masking the acquired original data to be queried to obtain masking data; generating a negative question-answer pair according to the shielding data, wherein the negative question-answer pair is used for representing that the shielding data has defects; And adjusting the obtained initial large model according to the negative question-answer pair and the shielding data pair to obtain a target large model.
- 2. The method of claim 1, wherein the masking the obtained raw data to be queried to obtain masked data comprises: Obtaining pre-labeling information of the original data, wherein the pre-labeling information comprises necessary data and/or optional data; and performing shielding processing on optional data in the original data to obtain the shielding data.
- 3. The method according to claim 2, wherein masking optional data in the raw data to obtain the masked data comprises: acquiring a preset shielding proportion; and carrying out shielding processing on table information and/or field information of target data in the selectable data according to the preset shielding proportion to obtain the shielding data.
- 4. A method according to claim 3, wherein the masking the table information and/or the field information of the target data in the selectable data according to the preset masking ratio to obtain the masked data includes: Acquiring associated data of the target data; and carrying out shielding processing on the table information and/or the field information of the target data and the table information and/or the field information of the associated data to obtain the shielding data.
- 5. A method according to claim 3, wherein the masking the table information and/or the field information of the target data in the selectable data according to the preset masking ratio to obtain the masked data includes: Acquiring the data importance of the optional data; determining target data in the selectable data according to the data importance; And carrying out shielding processing on the table information and/or the field information of the target data to obtain the shielding data.
- 6. The method of claim 1, wherein generating a negative question-answer pair from the mask data comprises: Generating a natural language question and a negative answer corresponding to the natural language question according to the shielding data, wherein the negative answer characterizes that the shielding data is used for solving the defect when the natural language question exists; And determining the natural language question and the negative answer as the negative answer pair.
- 7. The method of claim 1, wherein said adjusting the obtained initial large model based on the negative question-answer pair and the mask data pair to obtain a target large model comprises: Sorting the plurality of shielding data and the corresponding negative question-answer pairs into a negative sample set; And performing model fine adjustment processing on the initial large model according to the negative sample set to obtain the target large model.
- 8. The method of claim 1, wherein said adjusting the obtained initial large model based on the negative question-answer pair and the mask data pair to obtain a target large model comprises: Sorting the plurality of shielding data and the corresponding negative question-answer pairs into a negative sample set; Acquiring a positive sample set corresponding to the original data; And performing model fine adjustment processing on the initial large model according to the negative sample set and the positive sample set to obtain the target large model.
- 9. An electronic device comprising a memory and a processor for executing program instructions stored in the memory to implement the method of any one of claims 1 to 8.
- 10. A computer readable storage medium having stored thereon program instructions, which when executed by a processor, implement the method of any of claims 1 to 8.
Description
Method, apparatus and storage medium for suppressing large model illusion Technical Field The present application relates to the field of artificial intelligence technology, and in particular, to a method, apparatus, and storage medium for suppressing large model illusions. Background Currently, large model technology is rapidly developed in the current society, and the large model technology brings people with strong capabilities of generating words, images, videos and the like, so that learning and working efficiency is improved. More and more people use large models in daily life. However, when outputting content, the large model may generate fictional, erroneous or contradictory information due to model mechanism or data defect, that is, generate a illusion of the large model. For example, in NL2SQL tasks, large Language Models (LLMs) often lack modeling of "unknown fields/unknown tables" in the training data, resulting in large models that virtualize and output fields and/or tables that are not present in the database at the time of reasoning. In general, the large model reasoning can alleviate the illusion through data enhanced retrieval or post-processing verification after reasoning, but the illusion problem is not solved from the source per se. Disclosure of Invention The present application provides at least a method, apparatus, device, and computer-readable storage medium for suppressing large model illusions. The application provides a method for inhibiting illusion of a large model, which comprises the steps of carrying out shielding treatment on acquired original data to be queried to obtain shielding data, generating a negative question-answer pair according to the shielding data, wherein the negative question-answer pair is used for representing that the shielding data has defects, and adjusting the acquired initial large model according to the negative question-answer pair and the shielding data to obtain a target large model. In an embodiment, the masking processing is performed on the obtained original data to be queried to obtain masked data, and the masking processing comprises the steps of obtaining pre-marked information of the original data, wherein the pre-marked information comprises necessary data and/or optional data, and masking the optional data in the original data to obtain the masked data. In an embodiment, the masking the selectable data in the original data to obtain the masked data includes obtaining a preset masking ratio, and masking target data in the selectable data according to the preset masking ratio to obtain the masked data. In an embodiment, the masking processing is performed on the target data in the selectable data according to the preset masking proportion to obtain the masking data, and the masking processing is performed on the target data and the associated data to obtain the masking data. In an embodiment, the masking processing is performed on target data in the selectable data according to the preset masking proportion to obtain the masking data, and the masking processing includes obtaining data importance of the selectable data, determining the target data in the selectable data according to the data importance, and masking the target data to obtain the masking data. In one embodiment, the generating of the negative question-answer pair according to the shielding data includes generating a natural language question and a negative answer corresponding to the natural language question according to the shielding data, wherein the negative answer characterizes that the shielding data is used for solving the natural language question and has defects, and determining the natural language question and the negative answer as the negative question-answer pair. In an embodiment, the adjusting the obtained initial large model according to the negative question-answer pair and the shielding data pair to obtain a target large model includes that a plurality of shielding data and corresponding negative question-answer pairs are arranged into a negative sample set, and model fine adjustment processing is conducted on the initial large model according to the negative sample set to obtain the target large model. In an embodiment, the method for obtaining the target large model includes the steps of sorting a plurality of shielding data and corresponding negative question-answer pairs into negative sample sets, obtaining positive sample sets corresponding to the original data, and carrying out model fine tuning on the initial large model according to the negative sample sets and the positive sample sets to obtain the target large model. The application provides a device for inhibiting illusion of a large model, which comprises a data shielding module, a question-answer generating module and a model adjusting module, wherein the data shielding module is used for shielding acquired original data to be queried to obtain shielding data, the question-answer generating modu