Result generation optimization method, apparatus, device and system for large language model

By concurrently presetting prompt words to multiple large language models and performing results optimization processing, the accuracy and reliability of the generation results of a single large language model are solved, and more efficient result generation is achieved.

WO2025113284A1PCT designated stage expired Publication Date: 2025-06-05E-SURFING DIGITAL LIFE TECH CO LTD

Patent Information

Application Number
PCT/CN2024/133266
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-30
Filing Date
2024-11-20
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

The results generated by the prior art based on a single large language model lack accuracy and reliability and cannot meet the practical application needs.

Method used

By concurrently sending preset prompt words to multiple preset large language models, multiple generation results are obtained, and multiple generation results are comprehensively optimized based on the preset comparison selection algorithm or the preset merging algorithm to obtain optimization results.

Benefits of technology

It improves the accuracy and reliability of the generated results and can better meet practical application needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024133266_05062025_PF_FP_ABST
    Figure CN2024133266_05062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a result generation optimization method, apparatus, device and system for a large language model. The method comprises: concurrently sending a preset prompt word to a plurality of preset large language models, so as to obtain a plurality of generation results; and performing comprehensive optimization processing on the plurality of generation results on the basis of a preset comparison selection algorithm or a preset merging algorithm, so as to obtain an optimization result, wherein the preset comparison selection algorithm is constructed on the basis of similar-distance analysis, and the preset merging algorithm is realized on the basis of merging the generation results. A plurality of preset large language models are used to simultaneously perform result generation on the basis of the same preset prompt word, and these generation results are then comprehensively optimized to obtain an optimized result; and during the process, optimization can be performed by means of selecting a preset comparison selection algorithm or a preset merging algorithm on the basis of the actual situations, so that it can be ensured that the optimized result is more accurate and reliable. In this way, the present application can solve the technical problem in the prior art of it not being possible to meet actual application requirements due to a result generated on the basis of a single large language model lacking accuracy and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

A large language model result generation optimization method, device, equipment and system Technical Field

[0001] The present application relates to the technical field of large language models, and in particular to a method, apparatus, device, and system for optimizing the generation of large language model results. Background Art

[0002] A large language model refers to a deep learning model trained using large amounts of text data. It can generate natural language text or understand the meaning of language text. A large language model can handle a variety of natural language tasks, such as text classification, question-answering, and conversation, and is an important path to artificial intelligence.

[0003] Refer to Figure 3. Typically, users interact with a large language model by directly inputting prompt words to obtain returned results. However, this approach, based on a single large language model, lacks accuracy and reliability in generating results, making it difficult to meet the needs of real-world applications. Summary of the Invention

[0004] The present application provides a method, apparatus, device and system for optimizing the generation of large language model results, which are used to solve the technical problem that the results generated by the existing technology based on a single large language model lack accuracy and reliability and cannot meet the needs of actual applications.

[0005] In view of this, the first aspect of the present application provides a method for optimizing the generation of large language model results, comprising:

[0006] Send the preset prompt words to multiple preset large language models to obtain multiple generation results;

[0007] Performing comprehensive optimization processing on the plurality of generated results based on a preset comparison and selection algorithm or a preset merging algorithm to obtain an optimization result;

[0008] The preset comparison and selection algorithm is constructed based on similarity distance analysis, and the preset merging algorithm is implemented based on merging the generated results.

[0009] Preferably, the performing comprehensive optimization processing on the plurality of generated results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimization result includes:

[0010] Calculate the similarity distance between any two generated results based on a preset comparison and selection algorithm;

[0011] Accumulate the similarity distances between each generated result and other generated results to obtain a sum of similarity distances;

[0012] The generated result corresponding to the smallest sum of the similarity distances is selected as the optimization result.

[0013] Preferably, the calculating of the similarity distance between any two generated results based on a preset comparison and selection algorithm further includes:

[0014] Performing embedding-based vector conversion on the generated result to obtain a generated result vector;

[0015] Then, the calculation of the similarity distance between any two generated results based on the preset comparison and selection algorithm includes:

[0016] The similarity distance between any two generated result vectors is calculated based on a preset comparison and selection algorithm.

[0017] Preferably, the performing comprehensive optimization processing on the plurality of generated results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimization result includes:

[0018] Merging all the generated results based on a preset merging algorithm and generating a merged prompt word;

[0019] The merged prompt words are sent to the merged large language model to generate an optimization result.

[0020] A second aspect of the present application provides a large language model result generation and optimization device, comprising:

[0021] A result generation unit, configured to send the preset prompt words to multiple preset large language models to obtain multiple generation results;

[0022] A result optimization unit, configured to perform comprehensive optimization processing on the plurality of generated results based on a preset comparison and selection algorithm or a preset merging algorithm to obtain an optimized result;

[0023] The preset comparison and selection algorithm is constructed based on similarity distance analysis, and the preset merging algorithm is implemented based on merging the generated results.

[0024] Preferably, the result optimization unit specifically includes:

[0025] A similarity calculation subunit, configured to calculate a similarity distance between any two generated results based on a preset comparison and selection algorithm;

[0026] a distance accumulation subunit, configured to accumulate the similarity distances between each of the generated results and other generated results to obtain a sum of the similarity distances;

[0027] The optimization selection subunit is used to select the generated result corresponding to the smallest sum of the similarity distances as the optimization result.

[0028] Preferably, it also includes:

[0029] A vector conversion unit, configured to perform embedding-based vector conversion on the generated result to obtain a generated result vector;

[0030] Then, the similarity calculation subunit is specifically used to:

[0031] The similarity distance between any two generated result vectors is calculated based on a preset comparison and selection algorithm.

[0032] Preferably, the result optimization unit specifically includes:

[0033] A result merging subunit, configured to merge all the generated results based on a preset merging algorithm and generate a merge prompt word;

[0034] The reset generation subunit is used to send the merged prompt word to the merged large language model to generate an optimization result.

[0035] A third aspect of the present application provides a large language model result generation and optimization device, the device comprising a processor and a memory;

[0036] The memory is used to store program code and transmit the program code to the processor;

[0037] The processor is used to execute the large language model result generation optimization method described in the first aspect according to the instructions in the program code.

[0038] A fourth aspect of the present application provides a large language model result generation optimization system, which is used to implement the large language model result generation optimization method described in the first aspect, including: a scheduler, a generator, an embedding unit, and a large language model unit;

[0039] The large language model unit is used to deploy multiple preset large language models;

[0040] The scheduler is configured to receive a preset prompt word sent by a user, and send the preset prompt word to the plurality of preset large language models in parallel, receive a plurality of generation results generated by the preset large language models, and send the generation results to the generator;

[0041] The generator is configured to perform comprehensive optimization processing on the plurality of generated results based on a preset comparison and selection algorithm or a preset merging algorithm to obtain an optimized result;

[0042] The embedding unit is used to convert the generated result into a vector expression to obtain a generated result vector.

[0043] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0044] In the present application, a large language model result generation optimization method is provided, including: sending preset prompt words to multiple preset large language models in parallel to obtain multiple generation results; performing comprehensive optimization processing on the multiple generation results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimized result; the preset comparison selection algorithm is constructed based on similarity distance analysis, and the preset merging algorithm is implemented based on the merged generation results.

[0045] This application provides a large language model result generation optimization method. This method uses multiple preset large language models to simultaneously generate results based on the same preset prompt words, obtaining generation results from multiple different models. These generation results are then comprehensively optimized to obtain an optimized result. During this process, optimization can be performed based on a preset comparison selection algorithm or a preset merging algorithm, depending on the actual situation, to ensure that the optimized result is more accurate and reliable. Therefore, this application can solve the technical problem that the existing technology, which generates results based on a single large language model, lacks accuracy and reliability and cannot meet the needs of practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] FIG1 is a flow chart of a method for optimizing large language model result generation according to an embodiment of the present application;

[0047] FIG2 is a schematic diagram of the structure of a large language model result generation and optimization device provided in an embodiment of the present application;

[0048] FIG3 is a schematic diagram of the generation results of an existing large language model, which is provided as background technology of this application;

[0049] FIG4 is a schematic diagram of a comprehensive optimization process for multiple generation results based on a preset comparison selection algorithm or a preset merging algorithm according to an embodiment of the present application;

[0050] FIG5 is a schematic diagram of a comprehensive optimization process based on a preset comparison and selection algorithm provided in an embodiment of the present application;

[0051] FIG6 is a schematic diagram of a comprehensive optimization process based on a preset merging algorithm according to an embodiment of the present application;

[0052] FIG7 is a schematic diagram of a system optimization process based on a preset comparison and selection algorithm provided in an embodiment of the present application;

[0053] FIG8 is a schematic diagram of a system optimization process based on a preset merging algorithm provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0055] For ease of understanding, please refer to FIG1 , which shows an embodiment of a large language model result generation optimization method provided by this application, including:

[0056] Step 101: Send the preset prompt words to multiple preset large language models to obtain multiple generation results.

[0057] It should be noted that the preset prompt words are information set and sent by the user. The preset prompt words can be sent to different preset large language models simultaneously, and the preset large language models can generate corresponding results based on the preset prompt words. The structure and number of preset large language models can be set and selected according to actual circumstances and are not limited in this embodiment. Moreover, differences in the configuration of the structure and number do not affect the implementation of the technical solution of this application.

[0058] Step 102: Perform comprehensive optimization processing on the multiple generated results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimized result.

[0059] The preset comparison selection algorithm is constructed based on similarity distance analysis, and the preset merging algorithm is implemented based on the merging generation results.

[0060] Furthermore, step 102 includes:

[0061] Calculate the similarity distance between any two generated results based on a preset comparison selection algorithm;

[0062] Accumulate the similarity distances between each generated result and other generated results to obtain the sum of similarity distances;

[0063] The generated result corresponding to the minimum sum of similarity distances is selected as the optimization result.

[0064] Furthermore, the similarity distance between any two generated results is calculated based on a preset comparison selection algorithm, which also includes:

[0065] Perform embedding-based vector conversion on the generated result to obtain the generated result vector;

[0066] Then, the similarity distance between any two generated results is calculated based on the preset comparison selection algorithm, including:

[0067] Calculate the similarity distance between any two generated result vectors based on the preset comparison selection algorithm.

[0068] It should be noted that in order to improve the accuracy and reliability of the generated results, this embodiment designs a preset comparison selection algorithm and a preset merging algorithm to comprehensively optimize the generated results; please refer to Figure 4, multiple generated results can be optimized using the preset comparison selection algorithm, or they can be optimized using the preset merging algorithm; and it can be understood that the preset comparison selection algorithm and the preset merging algorithm are used to optimize the generated results at the same time to obtain two optimized results, and then the target result is selected from the two optimized results. The solution is also within the protection scope of this application, and the specific process will not be repeated.

[0069] If comprehensive optimization is performed based on a preset comparison selection algorithm, please refer to Figure 5. In order to facilitate the calculation of similarity and comparative analysis, this embodiment can convert the generated result into a vector expression before calculating the similarity distance to obtain a generated result vector; the vector conversion can use an embedding model or other methods. This embodiment only gives an example.

[0070] Similarity distance calculation is the distance between two generated result vectors, which can be used to obtain the similarity distance. For any current generated result, a similarity distance can be calculated with any other generated result. These similarity distances are summed to obtain the sum of the similarity distances corresponding to the current generated result. The sum of the similarity distances of each generated result is compared, and the generated result with the smallest sum of similarity distances is selected as the optimized result. This optimized result is the most balanced one among all generated results, ensuring high reliability and accuracy.

[0071] Assume that the result conversion vector generated by a certain model is expressed as V i , the similarity distance between two vectors can be expressed as dist(), and the sum of similarity distances can be expressed as D, then the specific calculation process can be expressed as: D1=(dist(V1,V2)+dist(V1,V3)+dist(V1,V x )) D2=(dist(V2,V1)+dist(V2,V3)+dist(V2,V x )) D3=(dist(V3,V1)+dist(V3,V2)+dist(V3,V x )) D x =(dist(V x ,V1)+dist(V x ,V2)+dist(V x ,V3))

[0072] Then the sum of the minimum similarity distances can be expressed as: i=min(D1,D2,D3,D x )

[0073] The optimization result can be determined based on the sum of the selected minimum similarity distances.

[0074] Furthermore, step 102 includes:

[0075] Merge all generated results based on the preset merging algorithm and generate a merged prompt word;

[0076] The merged prompt words are sent to the merged large language model to generate the optimized results.

[0077] If the pre-set merging algorithm is used for comprehensive optimization (see Figure 6), all generated results are directly assembled into a new version of the prompt word, namely the merged prompt word. This merged prompt word is then re-entered into the large language model to generate a result, which is the optimized result. It should be noted that the large language model used to input the merged prompt word can be any of the multiple pre-set large language models initially used, and the specific selection is not limited here.

[0078] The embodiments of the present application provide a large language model result generation optimization method that uses multiple preset large language models to simultaneously generate results based on the same preset prompt words, obtaining generation results from multiple different models; these generation results are then comprehensively optimized to obtain an optimized result. During this process, optimization can be performed based on a preset comparison selection algorithm or a preset merging algorithm according to actual conditions, ensuring that the optimization result is more accurate and reliable. Therefore, the embodiments of the present application can solve the technical problem that the results generated by the existing technology based on a single large language model lack accuracy and reliability and cannot meet the needs of actual applications.

[0079] For ease of understanding, please refer to FIG2 . This application provides an embodiment of a large language model result generation and optimization device, including:

[0080] A result generating unit 201 is used to send the preset prompt words to multiple preset large language models to obtain multiple generation results;

[0081] A result optimization unit 202 is configured to perform comprehensive optimization processing on multiple generated results based on a preset comparison and selection algorithm or a preset merging algorithm to obtain an optimized result;

[0082] The preset comparison selection algorithm is constructed based on similarity distance analysis, and the preset merging algorithm is implemented based on the merging generation results.

[0083] Preferably, the result optimization unit 202 specifically includes:

[0084] A similarity calculation subunit 2021 is used to calculate the similarity distance between any two generated results based on a preset comparison and selection algorithm;

[0085] The distance accumulation subunit 2022 is used to accumulate the similarity distances between each generated result and other generated results to obtain the sum of the similarity distances;

[0086] The optimization selection subunit 2023 is used to select the generated result corresponding to the minimum sum of similarity distances as the optimization result.

[0087] Preferably, it also includes:

[0088] A vector conversion unit 203 is used to perform embedding-based vector conversion on the generated result to obtain a generated result vector;

[0089] Then, the similarity calculation subunit 2021 is specifically used to:

[0090] Calculate the similarity distance between any two generated result vectors based on the preset comparison selection algorithm.

[0091] Preferably, the result optimization unit 202 specifically includes:

[0092] The result merging subunit 2024 is used to merge all generated results based on a preset merging algorithm and generate a merge prompt word;

[0093] The reset generation subunit 2025 is used to send the merged prompt words to the merged large language model to generate an optimization result.

[0094] The present application also provides a large language model result generation optimization device, the device including a processor and a memory;

[0095] The memory is used to store program codes and transmit the program codes to the processor;

[0096] The processor is used to execute the large language model result generation optimization method in the above method embodiment according to the instructions in the program code.

[0097] The present application also provides a large language model result generation optimization system, which is used to implement the large language model result generation optimization method in the above method embodiment, including: a scheduler, a generator, an embedding unit and a large language model unit;

[0098] Large language model unit, used to deploy multiple preset large language models;

[0099] The scheduler is configured to receive preset prompt words sent by the user, send the preset prompt words to multiple preset large language models in parallel, receive multiple generation results generated by the preset large language models, and send the generation results to the generator;

[0100] A generator is used to perform comprehensive optimization processing on multiple generation results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimized result;

[0101] The Embedding unit is used to convert the generated result into a vector expression to obtain the generated result vector.

[0102] Please refer to Figures 7 and 8. The user sends preset prompt words to the scheduler. The scheduler sends the received preset prompt words to multiple preset large language models to generate multiple results, namely result 1, result 2 and result 3. After receiving multiple generated results, the scheduler sends them to the generator, and the generator can perform optimization based on different optimization methods. If the optimization is based on the preset comparison algorithm, that is, Figure 7, it is necessary to trigger the Embedding unit to convert the generated result into a vector expression to obtain a generated result vector; then calculate the similarity distance and the sum of the similarity distances, and then compare the sum of the similarity distances to obtain the optimized result. If the optimization is based on the preset merging algorithm, that is, Figure 8, the multiple generated results are directly merged by the generator to obtain a merged prompt word, and then the merged prompt word is sent to a large language model. In Figure 8, large language model 1 is selected as an example for illustration. The result generated again by large language model 1 is the optimized result.

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

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

[0105] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0106] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for executing all or part of the steps of the method described in each embodiment of the present application through a computer device (which can be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), random access memory (English full name: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program code.

[0107] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for optimizing the generation of large language model results, characterized in that: include: Sending the preset prompt words to multiple preset large language models to obtain multiple generation results; Performing comprehensive optimization processing on the plurality of generated results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimization result; The preset comparison and selection algorithm is constructed based on similarity distance analysis, and the preset merging algorithm is implemented based on merging the generated results.

2. The large language model result generation optimization method according to claim 1, characterized in that: The step of performing comprehensive optimization processing on the plurality of generated results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimization result includes: Calculate the similarity distance between any two generated results based on a preset comparison selection algorithm; Accumulate the similarity distances between each of the generated results and other generated results to obtain the sum of the similarity distances; The generated result corresponding to the smallest sum of the similarity distances is selected as the optimization result.

3. The large language model result generation optimization method according to claim 2, characterized in that: The calculating of the similarity distance between any two generated results based on a preset comparison and selection algorithm also includes: Performing Embedding-based vector conversion on the generated result to obtain a generated result vector; Then, the calculating the similarity distance between any two generated results based on the preset comparison selection algorithm includes: The similarity distance between any two generated result vectors is calculated based on a preset comparison selection algorithm.

4. The large language model result generation optimization method according to claim 1, characterized in that: The step of performing comprehensive optimization processing on the plurality of generated results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimization result includes: Merging all the generated results based on a preset merging algorithm and generating a merged prompt word; The merged prompt words are sent to the merged large language model to generate an optimization result.

5. A large language model result generation optimization device, characterized in that: include: A result generating unit, used for sending the preset prompt words to multiple preset large language models to obtain multiple generation results; A result optimization unit, used for performing comprehensive optimization processing on the multiple generated results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimization result; The preset comparison and selection algorithm is constructed based on similarity distance analysis, and the preset merging algorithm is implemented based on merging the generated results.

6. The large language model result generation and optimization device according to claim 5, characterized in that: The result optimization unit specifically includes: A similarity calculation subunit, used for calculating the similarity distance between any two generated results based on a preset comparison selection algorithm; A distance accumulation subunit, used for accumulating the similarity distances between each of the generated results and other generated results to obtain a sum of the similarity distances; The optimization selection subunit is used to select the generation result corresponding to the smallest sum of the similarity distances as the optimization result.

7. The large language model result generation and optimization device according to claim 6, characterized in that: Also includes: A vector conversion unit, used for performing an Embedding-based vector conversion on the generated result to obtain a generated result vector; Then, the similarity calculation subunit is specifically used for: The similarity distance between any two generated result vectors is calculated based on a preset comparison selection algorithm.

8. The large language model result generation and optimization device according to claim 5, characterized in that: The result optimization unit specifically includes: A result merging subunit, used for merging all the generated results based on a preset merging algorithm and generating a merging prompt word; The reset generation subunit is used to send the merged prompt word to the merged large language model to generate an optimization result.

9. A large language model result generation optimization device, characterized in that: The device comprises a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the large language model result generation optimization method described in any one of claims 1-4 according to the instructions in the program code.

10. A large language model result generation optimization system, used to implement the large language model result generation optimization method according to claims 1-4, characterized in that: include: Scheduler, generator, embedding unit and large language model unit; The large language model unit is used to deploy multiple preset large language models; The scheduler is used to receive a preset prompt word sent by a user, and send the preset prompt word to multiple preset large language models in parallel, receive multiple generation results generated by the preset large language model, and send the generation results to the generator; The generator is used to perform comprehensive optimization processing on the multiple generated results based on a preset comparison selection algorithm or a preset merging algorithm to obtain an optimization result; The embedding unit is used to convert the generated result into a vector expression to obtain a generated result vector.

Citation Information

Patent Citations

  • Foreign language learning intelligent teaching comprehensive assessment system and method

    CN114743421A

  • System and method for second-order cue word of large language model for digital human intellectualization

    CN116881415A

  • Prompt word determination method and device applied to large language model, equipment and medium

    CN116955557A

  • Text processing method and device, storage medium and equipment

    CN117112764A

  • Task processing method and device based on large language model and electronic equipment

    CN117131540A

Cited By

  • Bayesian automatic cue word optimization method based on meta cue word

    CN120832540A