Large language model output generation method and apparatus, device, medium, and product
By constructing seed concepts and soft cue prototypes, a continuous behavior concept space is built, and candidate vector selection and filtering are performed. This solves the problem of homogeneity in the output of large language models, achieves diverse and effective generation results, is applicable to both open-source and closed-source models, and reduces training costs.
Patent Information
- Application Number
- CN202611402626.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-11-27
AI Technical Summary
Existing large language models suffer from output homogenization during output generation, and increasing the sampling temperature cannot effectively address the diversity at the conceptual semantic level, easily leading to garbled text and invalid output.
Construct N seed concepts in text form, assemble soft cue prototypes, construct a continuous behavior concept space by combining shared prefix and suffix parameter blocks with concept-specific parameter blocks, perform diversity selection and filtering of candidate vectors, generate exploratory soft cues, and iteratively train on a pre-trained model to output diverse and effective generation results.
It enables the generation of diverse and effective outputs without changing the weights of the pre-trained model, avoids the problems caused by word-level sampling noise, is applicable to both open-source and closed-source models, reduces training costs, and improves the diversity and quality of generated results.
Smart Images

Figure CN123180156A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, specifically to a method, apparatus, device, medium, and product for generating large language model output. Background Technology
[0002] Large language models are widely used in creative tasks such as product design, advertising creativity, and user research. For the same input, they can generate multiple sets of different candidate outputs for users to filter and create.
[0003] Existing large language models generally suffer from output homogenization (also known as pattern collapse). Multiple independent samplings of the same input result in highly similar outputs, with a large number of results concentrated in a few dominant generation trajectories. For example, increasing the sampling temperature hyperparameter to 2.0, with 100 samplings per task, will result in an average of 42.5% of the output falling into the same semantic cluster. Increasing the sampling temperature to improve output diversity only applies perturbations at the lexical level and cannot generate new generation behaviors at the conceptual semantic level, making it difficult to fundamentally solve the output homogenization problem and easily leading to invalid outputs such as garbled text and off-topic errors. Summary of the Invention
[0004] This application provides a method, apparatus, device, medium, and product for generating large language model outputs, which can balance the diversity of outputs and the effectiveness of outputs.
[0005] According to a first aspect of the embodiments of this application, a method for generating output of a large language model is provided, comprising: constructing N seed concepts in text form according to a target application scenario; assembling soft prompt prototypes corresponding to various sub-concepts, wherein N is a positive integer greater than 1; selecting corresponding values for various sub-concepts along the target diversity dimension of the target application scenario; the soft prompt prototypes sharing a prefix parameter block, a concept-specific parameter block, and a shared suffix parameter block; the concept-specific parameter block being used to encode the generation behavior corresponding to the seed concepts; and the shared prefix parameter block and the shared suffix parameter block being used to carry general generation logic for the task; and constructing a continuous behavior concept space based on the concept-specific parameter blocks in each soft prompt prototype. Within a continuous behavioral concept space, candidate vectors obtained based on behavioral offset extrapolation and radius calibration using the concept-specific parameter blocks are subjected to soft cue prototype empirical subspace filtering and diversity selection to obtain target candidate vectors. The target candidate vectors are then dimension-restored to obtain recombined concept-specific parameter blocks. These recombined concept-specific parameter blocks are then concatenated with shared prefix and suffix parameter blocks to obtain exploratory soft cues. Each exploratory soft cue is input into a pre-trained large language model, which outputs k task results. Here, all network weights of the pre-trained large language model remain fixed, and k is the number of valid candidate vectors to be filtered and output, where k is a positive integer.
[0006] In some possible implementations, based on the target application scenario, N seed concepts are constructed, and soft prompt prototypes corresponding to various sub-concepts are assembled. This includes: constructing N text-based seed concepts based on the target application scenario; generating dialogue datasets corresponding to various sub-concepts based on a pre-trained large language model, where the dialogue datasets include training tasks and corresponding responses, and all network weights of the pre-trained large language model remain fixed; assembling corresponding primary soft prompt prototypes based on various sub-concepts, where the primary soft prompt prototypes include shared prefix parameter blocks, concept-specific parameter blocks, and shared suffix parameter blocks; concatenating the training tasks and the primary soft prompt prototypes corresponding to the seed concepts, and inputting them into the pre-trained large language model for iterative training to obtain soft prompt prototypes corresponding to various sub-concepts.
[0007] In some possible implementations, the training task and the primary soft prompt prototypes corresponding to the seed concepts are concatenated and input into a pre-trained large language model for iterative training to obtain soft prompt prototypes corresponding to various sub-concepts. This includes: mixing the dialogue datasets corresponding to all seed concepts to obtain a mixed dialogue dataset; training the shared prefix parameter block, shared suffix parameter block, and concept-specific parameter block in the primary soft prompt prototypes based on the mixed dialogue dataset and the pre-trained large language model to obtain trained shared prefix parameter blocks, trained shared suffix parameter blocks, and trained concept-specific parameter blocks, while keeping all network weights of the pre-trained large language model fixed; freezing the trained shared prefix parameter block and trained shared suffix parameter block; and for each seed concept, iteratively updating the trained concept-specific parameter block corresponding to the seed concept based on the dialogue dataset and the pre-trained large language model until training converges, thus obtaining the trained soft prompt prototypes corresponding to various sub-concepts.
[0008] In some possible implementations, a continuous behavior concept space is constructed based on the concept-specific parameter blocks in each soft cue prototype. Within this continuous behavior concept space, soft cue prototype empirical subspace filtering and diversity selection are performed on the candidate vectors obtained from behavior offset extrapolation and radius calibration based on each concept-specific parameter block to obtain target candidate vectors. The target candidate vectors are then dimension-restored to obtain recombined concept-specific parameter blocks, including: flattening each concept-specific parameter block into a one-dimensional vector, using the one-dimensional vector as anchor points, constructing a continuous behavior concept space based on all anchor points, calculating the κ nearest neighbor set of each anchor point in the continuous behavior concept space, where κ is a positive integer greater than 1; calculating the distance between each anchor point and the k1-th nearest neighbor anchor point in the corresponding κ nearest neighbor set, defining the weight of each anchor point based on the distance, normalizing the weights corresponding to all anchor points to obtain the sampling probability corresponding to each anchor point, and using a roulette wheel sampling algorithm to perform weighted random sampling in all anchor point sets according to the sampling probability of each anchor point, and extracting the baseline anchor point u. iand base anchor point u a Wherein, the reference anchor point is used to extract the behavior offset, and the base anchor point is the starting point for generating a new behavior vector by superimposing the behavior offset. Based on the reference anchor point u... i Base anchor point u a and reference anchor point u i Anchor point u in the κ nearest neighbor set j Synthesize m·k initial candidate vectors, where the anchor point u j and reference anchor point u i The values are not the same. m is the excess multiple, k is the number of valid candidate vectors to be filtered and output, 1 ≤ k1≤ κ, and k1, k and m are all positive integers. The radius calibration of each initial candidate vector is performed to obtain candidate vectors. Soft hint prototype empirical subspace filtering and diversity selection are performed on each candidate vector to filter and obtain k target candidate vectors. The dimension of each target candidate vector is restored to obtain the recombined concept-specific parameter block.
[0009] In some possible implementations, radius calibration is performed on each initial candidate vector to obtain a candidate vector, including: calculating the center of all anchor points, calculating the radial distance of each anchor point relative to the center of the anchor point, statistically analyzing the distribution of the radial distances of all anchor points, and determining a radius threshold; calculating the radial distance of each candidate vector relative to the center of the anchor point; if the radial distance corresponding to the initial candidate vector is less than or equal to the radius threshold, then the initial candidate vector is determined as a candidate vector; if the radial distance corresponding to the initial candidate vector is greater than the radius threshold, then the direction of the initial candidate vector relative to the center of the anchor point remains unchanged, and the radial distance corresponding to the initial candidate vector is scaled to the radius threshold to obtain a candidate vector.
[0010] In some possible implementations, the large language model output generation method further includes: loading the aforementioned exploration soft prompts onto the pre-trained large language model; performing greedy decoding on the identity probes to obtain k exploration proxies; merging the k exploration proxies and k seed concepts from N textual seed concepts into a candidate concept pool, the candidate concept pool including 2k candidate concepts, where each candidate concept is either an exploration proxies or any one of the k seed concepts; encoding all candidate concepts using a text embedding model, converting the candidate concepts into vectors, performing a greedy selection based on the vector cosine similarity to select the k most dissimilar candidate concepts from the candidate concept pool; and placing the k most dissimilar candidate concepts into the system prompts of the first large model to generate corresponding k task results.
[0011] According to a second aspect of the embodiments of this application, a large language model output generation device is provided. The large language model output generation device includes: an assembly module, an acquisition module, and an output module. The assembly module is used to construct N text-based seed concepts according to a target application scenario, assemble soft prompt prototypes corresponding to various sub-concepts, where N is a positive integer greater than 1, and various sub-concepts select corresponding values along the target diversity dimension of the target application scenario. The soft prompt prototypes share a prefix parameter block, a concept-specific parameter block, and a shared suffix parameter block. The concept-specific parameter block is used to encode the generation behavior corresponding to the seed concepts, and the shared prefix parameter block and shared suffix parameter block are used to carry the general generation logic of the task. The acquisition module is used to acquire data based on the values in each soft prompt prototype. A continuous behavioral concept space is constructed using concept-specific parameter blocks. Within this space, candidate vectors obtained from behavioral offset extrapolation and radius calibration based on the concept-specific parameter blocks are subjected to soft cue prototype empirical subspace filtering and diversity selection to obtain target candidate vectors. Dimensionality is restored from the target candidate vectors to obtain recombined concept-specific parameter blocks. These recombined blocks are then concatenated with shared prefix and suffix parameter blocks to obtain exploratory soft cues. The output module inputs each exploratory soft cue into a pre-trained large language model and outputs k task results. All network weights of the pre-trained large language model remain fixed, and k represents the number of valid candidate vectors to be filtered and output, where k is a positive integer.
[0012] According to a third aspect of the embodiments of this application, an electronic device is provided, including a memory and a processor. The memory is used to store a computer program executable by the processor; the processor is used to execute the computer program in the memory to implement the above-described large language model output generation method.
[0013] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the executable computer program in the storage medium is executed by a processor, the above-described large language model output generation method can be implemented.
[0014] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described large language model output generation method.
[0015] The method described in this application has the following beneficial effects:
[0016] (1) In the first stage, the self-distillation data synthesis process and the construction of soft cue prototypes with shared prefix parameter blocks and suffix parameter blocks upgrade discrete text concepts to a continuous behavioral concept space. Through soft cue prototype encoding, the model outputs the corresponding fixed behavioral paradigm based on the concept, which not only understands the literal meaning of the conditional text, but also fundamentally breaks through the exploration boundary of discrete concept enumeration.
[0017] (2) In stage two, all vector operations from generating candidate vectors to selecting target candidate vectors are completed in the vector space and executed before decoding. There is no need to rely on the noise of decoding lexical sampling to obtain diversity, and the additional computational overhead is small.
[0018] (3) In stage three, the exploration soft prompts are externalized into text behavior agents by the identity probe greedy decoding. Combined with the selection of the farthest point on the condition side, the continuous space exploration results can be transferred to the closed source model with only text interface without loss.
[0019] (4) The main weights of the large model are fixed during the training phase. Only the soft cue parameters are trained. The training only needs to be performed once. After completion, the entire soft cue prototype and concept space are obtained. The subsequent inference phase will not repeat the training. The training cost is paid only once. It is orthogonally compatible with any decoding strategy during inference. The module corresponding to the exploratory encoding in the second phase is an independent component. It does not need to modify the underlying model. It can be mounted on the open source large model or connected to the closed source large model that only provides API calls. Attached Figure Description
[0020] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which:
[0021] Figure 1 This is a flowchart illustrating a method for generating output of a large language model according to an exemplary embodiment.
[0022] Figure 2 This is a general framework diagram illustrating an exemplary embodiment.
[0023] Figure 3 A comparison of the main experimental utility metrics is shown according to an exemplary embodiment.
[0024] Figure 4 The ablation result of the exploratory decoding component is shown according to an exemplary embodiment.
[0025] Figure 5 This is a block diagram illustrating a large language model output generation device according to an exemplary embodiment.
[0026] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0027] It should be understood that in the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0028] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered 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.
[0029] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0030] One embodiment of this application provides a method for generating the output of a large language model. Please refer to [link to relevant documentation]. Figure 1 The method for generating the output of this large language model may include the following steps:
[0031] S101, based on the target application scenario, construct N text-based seed concepts and assemble soft prompt prototypes corresponding to various sub-concepts, where N is a positive integer greater than 1. Various sub-concepts select corresponding values along the target diversity dimension of the target application scenario. The soft prompt prototypes share a prefix parameter block, a concept-specific parameter block, and a shared suffix parameter block. The concept-specific parameter block is used to encode the generation behavior corresponding to the seed concept, and the shared prefix parameter block and the shared suffix parameter block are used to carry the general generation logic of the task.
[0032] Phase 1: Prototype learning.
[0033] In some embodiments, N textual seed concepts C={c1,…,c2} can be constructed according to the target application scenario. N}, where N is a positive integer greater than 1, and various sub-concepts select corresponding values along the target diversity dimension of the target application scenario, so that the seed concepts are aligned with the target diversity dimension. This step is to construct the seed concept pool.
[0034] It is understandable that user survey and Q&A applications can use persona descriptions, advertising copy generation applications can use copywriting style tags, and product design applications can use design direction tags. Seed concept pools can be generated offline using methods such as concept enumeration, and this application does not limit the source of the seed concept pool.
[0035] For example, in user survey Q&A applications, the target diversity dimension of the application scenario is the answers from the perspectives of people with different identities and backgrounds, and the seed concept can be the persona.
[0036] The seed concept can be multiple character texts.
[0037] For example, c1 represents a 20-year-old college student in a first-tier city, c2 represents a 30-year-old white-collar worker in a first-tier city, and c3 represents a 40-year-old self-employed individual in a second-tier city.
[0038] In some embodiments, a dialogue dataset corresponding to each seed concept is generated based on a pre-trained large language model. The dialogue dataset includes the training task and the corresponding response, and all network weights of the pre-trained large language model remain fixed. This step is known as self-distillation data synthesis. It can be understood that the pre-trained large language model in this application can be an open-source exploratory model.
[0039] In this process, all network weights of the pre-trained large language model (i.e., the frozen backbone model) remain fixed and do not participate in gradient updates. The model is only trained on the parameters in the subsequent soft suggestion prototype, without altering the knowledge and generative capabilities learned by the pre-trained large language model itself.
[0040] For each seed concept cᵢ, it is placed into a fixed prompt template as a system prompt. A training task xⱼ is randomly selected from a pre-set task question pool, and the pre-trained large language model is allowed to answer automatically, resulting in the answer yᵢⱼ=LLM. θ (cᵢ, xⱼ), thus constructing a dialogue dataset Dᵢ={(xⱼ, yᵢⱼ)} for each seed concept.
[0041] Where θ represents the weight parameters of the pre-trained large language model. i and j are positive integers. yᵢⱼ represents the output answer of the pre-trained large language model. The pre-defined task question pool is not used for subsequent model performance testing or evaluation, but only for generating the training dataset.
[0042] This dialogue dataset is generated by self-sampling from a pre-trained large language model without any external supervision or manual annotation. Its purpose is to capture the generative behavior that the pre-trained large language model can already express under the seed concept cᵢ.
[0043] In some embodiments, an "identity probe" question-and-answer pair can be added to each dialogue dataset Dᵢ, which is a sample pair consisting of a fixed question (such as "Please briefly introduce yourself") and a corresponding seed concept description, for subsequent externalization of behavior into text.
[0044] The self-distillation data synthesis process described above for generating dialogue datasets and identity probes can expand the distribution of training data, enrich the expression of model behavior, and improve the stability and diversity of model identity output.
[0045] In some embodiments, a corresponding primary soft suggestion prototype is assembled based on each seed concept. The primary soft suggestion prototype includes a shared prefix parameter block, a concept-specific parameter block, and a shared suffix parameter block. This step is called assembling the soft suggestion prototype.
[0046] In some embodiments, a primary soft cue prototype zᵢ=[b; sᵢ; e] can be constructed for each seed concept cᵢ, where sᵢ∈R^(n s ×d) is a concept-specific parameter block used to encode the generative behavior of a pre-trained large language model given this seed concept. b∈R^(n b ×d) represents a shared prefix parameter block. e∈R^(n) e ×d) is a shared suffix parameter block. b and e are the same set of parameter matrices shared by all seed concepts, used to carry the general generation logic for tasks unrelated to seed concepts. Here, R is the set of all real numbers. R^(n) s ×d) represents n s A real matrix space of d rows and d columns, representing sᵢ as a two-dimensional real matrix (a sequence of lexical units, each lexical unit being a d-dimensional vector). s is the number of lexical units (sequence length) contained in the concept-specific parameter block. d is the word embedding dimension of the pre-trained large language model. n b n is the number of tokens (sequence length) contained in the shared prefix parameter block. e This represents the number of lexical units (sequence length) contained in the shared suffix parameter block. b, sᵢ, and e are concatenated in order. The input position of the text used to place the seed concept in the original fixed cue template is replaced with the soft cue prototype zᵢ. The original path that used the seed concept as a condition for the pre-trained large language model to generate an answer is replaced with a path that uses the soft cue prototype as a condition for the pre-trained large language model to generate an answer. This replacement occurs at the model input embedding level, not at the text string level.
[0047] In some embodiments, the training task and the primary soft cue prototype corresponding to the seed concept are concatenated and then input into a pre-trained large language model for iterative training to obtain soft cue prototypes corresponding to various sub-concepts.
[0048] In some embodiments, a hybrid dialogue dataset can be obtained by aggregating dialogue datasets of all seed concepts. A sample (xⱼ, yᵢⱼ) corresponding to the seed concept cᵢ is sampled from the hybrid dialogue dataset. The corresponding primary soft cue prototype is found and concatenated with task xⱼ, and then input into a pre-trained large language model LLM. θThe first stage of training is completed by comparing the prediction results of the pre-trained large language model with the target output yᵢⱼ in the dialogue dataset, calculating the loss (i.e., teacher-forced cross-entropy), and iteratively updating the shared prefix parameter block, shared suffix parameter block, and all concept-specific parameter blocks. This yields the trained shared prefix parameter block, trained shared suffix parameter block, and trained concept-specific parameter block, while all network weights of the pre-trained large language model remain fixed. In some embodiments, the trained shared prefix parameter block and trained shared suffix parameter block can be frozen. For each seed concept, based on the corresponding dialogue dataset and the pre-trained large language model, only the concept-specific parameter block corresponding to that seed concept is iteratively updated until training converges, resulting in the trained soft prompt prototypes for various sub-concepts. This step is known as two-stage distillation training.
[0049] Therefore, after training, the concept-specific parameter blocks sᵢ constitute R^(n s ×d) Continuous behavioral prototypes within the space: Concept-specific parameter blocks encode the generative behavior of a pre-trained large language model corresponding to the seed concept, rather than the surface semantic embedding of the seed concept text. That is, concept-specific parameter blocks reside in a continuous real-number space, enabling vector operations and allowing the generation of new model behaviors not present in the original seed concept through offset and interpolation operations.
[0050] S102, construct a continuous behavioral concept space based on the concept-specific parameter blocks in each soft cue prototype. Within the continuous behavioral concept space, perform soft cue prototype empirical subspace filtering and diversity selection on the candidate vectors obtained by extrapolating based on behavioral offsets and radius calibration according to each concept-specific parameter block to obtain target candidate vectors. Perform dimension restoration on the target candidate vectors to obtain recombined concept-specific parameter blocks. Concatenate the recombined concept-specific parameter blocks with shared prefix parameter blocks and shared suffix parameter blocks to obtain exploration soft cue.
[0051] Phase Two: Exploratory Coding
[0052] In some embodiments, each concept-specific parameter block is flattened into a one-dimensional vector uᵢ=vec(sᵢ)∈R^D (D=n s ·d) Using all one-dimensional vectors uᵢ as anchor points, construct a continuous behavior concept space, and calculate the κ nearest anchor points in the continuous behavior concept space for each anchor point uᵢ, forming the κ nearest neighbor set N of that anchor point. κ (i), where κ is a positive integer greater than 1, can be defined as the vector difference between anchor point i and other anchor points in its nearest neighbor set, such as (uⱼ−uᵢ), as a transferable candidate behavior offset. This step is anchor point vectorization.
[0053] In some embodiments, to enhance coverage of underexplored regions, the distance between each anchor point uᵢ and the k1-th nearest neighbor anchor point in the κ nearest neighbor set can be calculated, and the weight of each anchor point uᵢ can be defined based on this distance. The weight is proportional to the distance, that is ∝‖uᵢ−uᵢ^(k1)‖. k1 is the nearest neighbor hyperparameter, and k1 is a positive integer. 1 ≤ k1≤ κ. Normalize the weights corresponding to all anchor points to obtain the sampling probability π(i) for each anchor point. That is, the sparser the local space of an anchor point, the greater the distance from that anchor point to its k1-th nearest neighbor anchor point, the greater the weight, the higher the sampling probability, and the higher the probability of being selected. The Roulette Wheel Sampling (RWS) algorithm can be used to perform weighted random sampling from the set of all anchor points based on the sampling probability π(i) of each anchor point, and then extract the baseline anchor point u. i and base anchor point u a Among them, reference anchor point i is used to extract behavior offset (i.e., the direction of behavior change), and reference anchor point u... i Selecting the nearest neighbor anchor point u from the κ nearest neighbor set j With the nearest anchor point u j With reference anchor point u i vector difference (u) j -uᵢ) serves as the behavior offset, with the base anchor point u a This serves as the starting point for generating a new behavior vector by superimposing this behavior offset. In some embodiments, the reference anchor point u i and base anchor point u a They can be the same or different. The reference anchor point u is obtained by sampling based on the sampling probability π(i). i and base anchor point u a Then, select the nearest neighbor anchor point u from the κ nearest neighbor set. j Synthesize the initial candidate vector:
[0054] u a + (u) j -uᵢ) Formula (1)
[0055] Here, γ controls the exploration stride. This initial candidate vector transfers the local behavior offset (uⱼ−uᵢ) to another anchor point u. a This allows for the creation of novel behaviors that no single seed concept possesses. The above process is repeated to synthesize a total of m·k initial candidate vectors. Here, m is the oversampling factor in the hyperparameters, and k is the number of valid candidate vectors to be filtered (i.e., the final number of diverse results to be generated). This step is density-aware extrapolation synthesis.
[0056] It is understandable that, due to the extrapolation operation introducing the exploration step size γ, the radial distance of some initial candidate vectors relative to the center of the prototype anchor point will exceed the empirical distribution range of the prototype anchor point set. If such initial candidate vectors with excessively large radial scales are directly used to reconstruct soft hints for decoding, it is easy to cause the behavior of large language models to go out of control, resulting in invalid outputs such as going off-topic and garbled text. Therefore, the behavioral direction of the candidate vectors can be kept unchanged, and only the radial length of the vectors can be scaled to constrain the initial candidate vectors to the empirical radius distribution range of the anchor points.
[0057] In some embodiments, the center of all anchor points in the continuous behavior concept space can be calculated, such as ū=(1 / N)Σuᵢ, the radial distance of each anchor point uᵢ relative to the anchor point center can be calculated, the distribution of the radial distances of all anchor points can be statistically analyzed, and the radius threshold can be determined; for each initial candidate vector, the radial distance of the initial candidate vector relative to the anchor point center can be calculated; if the radial distance corresponding to the initial candidate vector is less than or equal to the empirical radius threshold, the initial candidate vector is retained without modification, and a candidate vector is obtained; if the radial distance corresponding to the initial candidate vector is greater than the empirical radius threshold, the direction of the initial candidate vector relative to the anchor point center is kept unchanged, the radial length of the initial candidate vector is scaled, and the distance from the initial candidate vector to the anchor point center is scaled to the radius threshold, and a candidate vector is obtained, thus completing the radius calibration. As shown in the following formula (3):
[0058] Formula (3)
[0059] Specifically, a radius threshold r is determined based on the set of distances from anchor points to the center of anchor points corresponding to N soft cue prototypes, and candidate vectors are scaled in the same direction. This step, known as radius calibration, preserves the explored behavioral directions while matching the radial scale of candidate vectors with the distribution of soft cue prototypes. In some embodiments, ablation experiments show that removing this step leads to radius mismatch, increased invalid outputs, and a significant decrease in utility metrics.
[0060] In some embodiments, soft-cue prototype empirical subspace filtering and diversity selection can be performed on each candidate vector, such as calibrated candidate vectors, to filter out k target candidate vectors. The soft-cue prototype empirical subspace is a low-dimensional principal component subspace obtained by principal component analysis of all anchor points. This step is called subspace filtering and diversity selection.
[0061] The soft-hint prototype empirical subspace filtering step includes: performing Principal Component Analysis (PCA) dimensionality reduction on each candidate vector, such as each calibrated candidate vector; measuring the degree to which each candidate vector deviates from the soft-hint prototype empirical subspace by the reconstruction error of the first ℓ principal components; and removing outlier candidate vectors from the soft-hint prototype empirical subspace, such as removing the 10% of candidate vectors with the largest reconstruction errors, to obtain the set of effective candidate vectors. The soft-hint prototype empirical subspace is a low-dimensional principal component subspace obtained by PCA from all anchor points, and is the empirical subspace spanned by the original soft-hint prototype samples.
[0062] The diversity selection step includes: employing a farthest-point sampling algorithm, starting with the candidate vector farthest from the centroid of the effective candidate vector set, and greedily iteratively selecting the k target candidate vectors with the largest mutual distance within the effective candidate vector set. Both the subspace filtering step and the diversity selection step are completed in the vector space before decoding: on the one hand, this avoids the excessive text generation overhead required for output-level reordering; on the other hand, the selection is not based on any generated text, thus fundamentally preventing speculation on evaluation metrics. The subspace filtering step can eliminate candidate vectors with abnormal behavior, while the diversity selection step ensures that the selected target candidate vectors are spatially discrete within the continuous behavioral concept space, guaranteeing the diversity of subsequent generation results.
[0063] It is understandable that the geometric operations mentioned above in Phase 2 are all performed on the Central Processing Unit (CPU), and the time consumed by decoding the pre-trained large model is negligible.
[0064] In some embodiments, the dimensions of each target candidate vector can be restored, reshaping the one-dimensional target candidate vector into the original dimension of the concept-specific parameter block, resulting in the reshaped concept-specific parameter block ŝ=reshape(û)∈R^(n) s ×d), concatenate the recombined concept-specific parameter block with the shared prefix parameter block and the shared suffix parameter block to obtain k exploration soft hints ẑ=[b; ŝ; e].
[0065] S103, input each exploration soft cue into the pre-trained large language model, and output k task results. Here, all network weights of the pre-trained large language model remain fixed, k is the number of valid candidate vectors to be filtered out, and k is a positive integer.
[0066] In some embodiments, each exploration soft cue can be input into a pre-trained large language model, guiding the model to perform decoding and output k task results. Therefore, all concept conditionation methods share the same task template and decoding hyperparameters; the diversity stems entirely from structured exploration of the concept space rather than lexical-level sampling techniques. This step is the soft cue recombination and decoding.
[0067] Phase Three: Exploration and Enhancement
[0068] It is understandable that closed-source large models do not support the injection of soft cue vectors. To address this, this application further provides an exploration enhancement mechanism that externalizes the behavior obtained from the second-stage exploration into text and transfers it to the closed-source model via context.
[0069] In some embodiments, the steps of Phase 1 and Phase 2 described above can be performed on an open-source exploration model such as a pre-trained large language model to obtain k exploration soft cues ẑ1,…,ẑ k .
[0070] In some embodiments, an open-source exploration model, such as a pre-trained large language model, can load various exploration soft cues ẑⱼ and perform greedy decoding on the identity probes used during training (such as "Please briefly introduce yourself") to obtain the corresponding text tⱼ, also known as a text behavior agent (hereinafter referred to as "exploration agent"). It can be understood that using greedy decoding can eliminate random fluctuations caused by lexical sampling and ensure that the differences in text come entirely from the differences in model behavior corresponding to different soft cues.
[0071] In some embodiments, k exploration agents {tⱼ} and k seed concepts {cᵢ} from N textual seed concepts can be merged into a candidate concept pool, thereby taking into account the complementary information between the new behaviors obtained from exploration and the original seeds. The candidate concept pool includes 2k candidate concepts, where a candidate concept is either an exploration agent or any one of the k seed concepts.
[0072] In some embodiments, conditional selection can be performed, such as encoding all candidate concepts in the candidate concept pool using a text embedding model, converting the text of the candidate concepts into vectors, and performing a greedy selection based on the farthest point according to the vector cosine similarity to select the k candidate concepts with the lowest similarity and the greatest difference among them. This selection operates on the input (conditional) side rather than the output side, does not require calling a large model to generate text for scoring, and does not touch any generated text, thus ensuring fair evaluation.
[0073] In some embodiments, contextual conditions can be generated, such as placing the selected k candidate concepts (i.e., concepts) one by one into the system prompts of the closed-source large model to generate k task results. The entire mechanism only requires write permissions to the system prompts and does not require access to model parameters, embeddings, or log odds. It is compatible with closed-source models in API form and is also applicable to open-source models.
[0074] The above-mentioned method for generating large language model output has the following advantages:
[0075] Advantage 1: Achieving both diversity and effectiveness, overcoming the dilemma of word-level sampling. The diversity in this application stems from structured exploration in the conceptual space: each output is conditioned on a new behavioral direction, rather than relying on increasing sampling randomness. Therefore, while significantly improving diversity, the output effectiveness remains comparable to the baseline of the cue class.
[0076] Advantage 2: It can create new behaviors beyond the seed concept. Extrapolation operations in continuous space can perform vector transfer of behavior offsets, generating new concepts that do not exist in the seed pool.
[0077] Advantage 3: Backbone freezing, low cost, and plug-and-play functionality. This application does not update any weights of the pre-trained large language model, i.e., the backbone model. Prototype learning is a one-time domain-level training, amortized over all subsequent tasks. Most of the geometric operations in stage two of inference are performed solely on the CPU, with negligible overhead compared to the decoding of a large model. In contrast, the approach of increasing diversity by scaling up the model or retraining is several orders of magnitude more expensive and yields minimal benefits.
[0078] Advantage 4: Pre-decoding selection eliminates output-level reordering overhead and prevents performance speculation. Both candidate quality filtering (PCA reconstruction error) and diversity selection (farthest point sampling) operate on the vector or input-side conceptual text before decoding, generating no unnecessary text and not selecting based on output content, ensuring fair and reliable evaluation criteria.
[0079] Advantage 5: Adaptable to closed-source models, with greater advantages for stronger models. Exploring enhancement mechanisms only requires system prompts for write permissions, allowing the exploration results to be transferred to closed-source models such as GPT-5.4 and Gemini-3.5-Flash, achieving optimal values for almost all indicators. Scale sensitivity experiments show that as the size of the closed-source model increases from nano to full, the benefits of existing concept hybrid methods continuously decline, while the utility advantage of this application remains stable or even relatively increases.
[0080] Advantage 6: The effect can be fully verified by experiments (overall), as can be seen in the following examples.
[0081] Another embodiment of this application provides a large language model output generation device.
[0082] In some embodiments, such as Figure 5 As shown, the large language model output generation device 200 includes an assembly module 201, an acquisition module 202, and an output module 203.
[0083] The assembly module 201 is used to construct N text-based seed concepts according to the target application scenario, and assemble soft prompt prototypes corresponding to various sub-concepts, where N is a positive integer greater than 1. The values for each sub-concept are selected according to the target diversity dimension of the target application scenario. The soft prompt prototypes share a prefix parameter block, a concept-specific parameter block, and a shared suffix parameter block. The concept-specific parameter block is used to encode the generation behavior corresponding to the seed concept, while the shared prefix and suffix parameter blocks are used to carry the general generation logic of the task. For specific applications of the assembly module 201, please refer to... Figure 1 Step S101 in the process will not be described again here.
[0084] The acquisition module 202 is used to construct a continuous behavioral concept space based on the concept-specific parameter blocks in each soft cue prototype. Within the continuous behavioral concept space, soft cue prototype empirical subspace filtering and diversity selection are performed on the candidate vectors obtained based on behavioral offset extrapolation and radius calibration of each concept-specific parameter block to obtain target candidate vectors. The target candidate vectors are then dimension-restored to obtain recombined concept-specific parameter blocks. The recombined concept-specific parameter blocks are then concatenated with shared prefix parameter blocks and shared suffix parameter blocks to obtain the exploration soft cue. For specific applications of the acquisition module 202, please refer to [reference needed]. Figure 1 Step S102 in the process will not be described again here.
[0085] Output module 203 is used to input each exploration soft cue into the pre-trained large language model and output k task results. The weights of all networks in the pre-trained large language model remain fixed, and k is the number of valid candidate vectors to be filtered for output; k is a positive integer. For specific applications of output module 203, please refer to [reference needed]. Figure 1 Step S103 in the process will not be described again here.
[0086] The method and apparatus embodiments of this application can complement each other.
[0087] Example:
[0088] This embodiment uses the open-source model Qwen3-8B as a pre-trained large language model, and takes the implementation of a user survey question-and-answer scenario as an example (the implementation methods are the same as LLaMA3-8B and other scenarios, with only a few hyperparameters being different).
[0089] (1) Seed concept pool: N=100 character descriptions, each containing elements such as occupation, age, gender, region, cultural background, and values. The advertising copy and product design scenarios can each use 100 copywriting style tags and 100 design direction tags.
[0090] (2) Soft prompt prototype structure: the length n of the shared prefix parameter block and the shared suffix parameter block in the role-playing question-and-answer scenariob =n e =2, the length n of the concept-specific parameter block s =8 (Rich character information); n represents the advertising copy and product design scenarios. b =n e =1、n s =4. The concept-specific parameter block sᵢ is initialized by cyclically filling the lexical embeddings of the corresponding seed description, and b and e are initialized by random lexical embeddings; the soft prompt prototype is connected to the pre-trained large language model with bf16 precision as 32-bit single-precision floating-point (fp32) precision parameters.
[0091] (3) Self-distillation training: 100 dialogues are automatically generated from 100 seed concepts as training data (total dialogue samples are 100×100), plus one identity probe sample for each seed concept. The optimizer AdamW has a peak learning rate of 5×10⁻³, weight decay of 0, and the learning rate is scheduled for the first 10% of training steps, with the learning rate linearly increasing from 0 to the peak; then decreasing according to a cosine curve, down to a minimum of 20% of the peak, gradient norm clipping of 1.0, and batch size of 8 (4 is used for product design scenarios due to the longer sample size). In the first stage, all seed concepts are trained together, traversing the complete dataset for 5 rounds. In the second stage, each seed concept is fine-tuned individually, with a maximum training time of 200 steps, using 10% of the validation set for early stopping (evaluating the validation set loss every 25 training steps, patiently repeating 5 times, with a minimum improvement threshold of 2×10⁻³, and rolling back to the optimal checkpoint). The entire domain-level training is completed in about 6 to 12 hours on a single NVIDIA A100 SXM480GB graphics card. The software environment consists of Python 3.11, PyTorch 2.10.0+cu128, and Transformers 5.10.2.
[0092] (4) Exploring hyperparameters: nearest neighbor number κ=3, overshoot factor m=5, extrapolation step size γ uniformly sampled from the interval (0,1), PCA dimension ℓ=32, and elimination ratio 10%. Sensitivity experiments show that when the above hyperparameters vary within one to two orders of magnitude, the utility index only fluctuates within a narrow range, and the method is not sensitive to the selection of hyperparameters.
[0093] (5) Decoding settings: Each task outputs k=10 results, sampling temperature 1.0, top-p 0.95, top-k 100; all comparison methods use the same task template and decoding hyperparameters as this application.
[0094] The implementation using the closed-source models GPT-5.4 and Gemini-3.5-Flash as the target models is as follows:
[0095] Using Qwen3-8B as the open-source exploration model, Phase 1 and Phase 2 are executed to obtain k exploration soft cues. For each soft cue, it is concatenated into the conditional template used during training. A greedy decoding algorithm is employed to decode at most 128 new lexical units for the identity probe problem, and these are folded into a single line of text to obtain text behavior proxies. The k proxies are merged with k seed concepts to form a concept pool. After encoding using the Qwen3-Embedding-4B text embedding model, a greedy selection algorithm is performed based on cosine similarity to select the furthest point, choosing k concepts. The selected concepts are then sequentially inserted into the system cues of the target closed-source model to complete the generation process. The target model receives only plain text throughout the entire process, without accessing any soft cues or embedding vectors.
[0096] Evaluation Setup: Evaluation was conducted on three types of multilingual open-ended tasks derived from real-world business scenarios: product design (627 tasks), role-playing Q&A (137 questions), and advertising creative (200 tasks). Each task generated k=10 outputs. Evaluation metrics included: Mean Pairwise Cosine Similarity (MPCS), which measures semantic redundancy (lower is better, Equation 4), and the number of semantically distinct pairs in the effective outputs (Dist). 10 (The higher the better, Formula 5), and the utility index Util accumulated based on marginal new information under sequential reading. 10 (The higher the better, Equation 6, where new information is measured by the marginal gain of the Vendi score, p=0.9 is the user patience coefficient, and the first invalid output is truncated). The validity and relevance of the output are judged by a unified large model judge (the same judge and the same judgment template are used for all methods) to prevent invalid text from artificially increasing diversity. The meanings of the symbols in the formula are as follows: φ(·) is the text embedding model, S is the cosine similarity matrix between output embeddings, V is the set of output subscripts that pass the validity judgment, CL_τ represents the fully connected agglomerative clustering with a merging threshold of τ=0.75 (here τ is the clustering threshold, which is independent of the sampling temperature); VS is the Vendi score that measures the diversity of the set, ν is the marginal information gain of the i-th output, ρ is the position of the first invalid output, and the patience coefficient p is different from the decoding parameter top-p.
[0097] Formula (4)
[0098] Formula (5)
[0099] Formula (6)
[0100] Table 1 shows the main experimental results of two open-source models and two closed-source models in three scenarios (10 outputs per task, bolded is the best of each group).
[0101] Table 1
[0102]
[0103] Table 1 shows the utility metrics of exploratory decoding (ExpDecode) in all three scenarios on the open-source model. 10 All metrics were optimal. For example, in Qwen3-8B, the utility of the product design scenario improved from the baseline of 1.63 to 2.01, the utility of the role-playing question-and-answer scenario improved from the baseline of 1.70 to 2.01, and the utility of the advertising creative scenario improved from the baseline of 1.51 to 1.72. In the closed-source model, Phase 3's ExpEnhance achieved optimal values for almost all metrics. (Reference) Figure 3 The main experimental utility metrics were compared, such as the number of semantically distinct groups in advertising creative scenarios on Gemini-3.5-Flash. 10 The efficiency improved from 2.43 to 7.12, and the utility improved from 1.81 to 2.61. The lexical sampling method presents a clear dilemma: min-p sampling has the highest number of semantically distinct groups in the LLaMA3-8B product design scenario, but its utility is inferior to that of this application, while p-less sampling sacrifices diversity for efficiency.
[0104] Table 2 shows the component ablation experiment data (role-based question-and-answer validation set).
[0105] Table 2
[0106]
[0107] Refer to Table 2 and Figure 4 The necessity of each component is demonstrated: removing radius calibration causes the utility index to plummet from 1.93 to 1.58, consistent with the mechanistic analysis that radius mismatch leads to increased invalid output. Removing density-aware synthesis or quality and diversity selection also results in a decrease in the number of semantically dissimilar groups and utility. For exploration enhancement, the complete approach of hybrid concept pool plus farthest point selection outperforms random selection and any single-source concept pool, demonstrating that exploration agents and seed concepts carry complementary information.
[0108] Table 3 shows the win rate of manual evaluation (10 tasks per scenario, 50 votes, and a blind test of the two outputs, choosing one of them).
[0109] Table 3
[0110]
[0111] Table 3 shows that, in the blind test, 79.3% of the five volunteers believed that the output set generated by this application was more valuable than direct sampling, with a win rate of 92% in the role-playing question-and-answer scenario. Furthermore, validity checks indicate that this application did not sacrifice efficiency for diversity: the proportion of effective outputs from this application in each backbone and scenario did not decrease by more than 0.8 percentage points relative to the weaker of the two prompting-based baselines (CFD and concept hybrid).
[0112] Embodiments of this application also propose an electronic device, including a processor and a memory; the memory is used to store a computer program executable by the processor; the processor is used to execute the computer program in the memory to implement the large language model output generation method of any of the above embodiments.
[0113] Embodiments of this application also propose a computer-readable storage medium that, when an executable computer program in the storage medium is executed by a processor, enables the large language model output generation method of any of the above embodiments.
[0114] Embodiments of this application also propose a computer program product, including a computer program that, when executed by a processor, implements the large language model output generation method of any of the above embodiments.
[0115] Regarding the apparatus in the above embodiments, the specific manner in which the processor performs the operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0116] Embodiments of this application also provide an electronic device 600, such as... Figure 6 As shown, the electronic device 600 includes a memory 601 and a processor 602. The memory 601 is used to store computer programs executable by the processor 602; the processor 602 is used to execute the computer programs in the memory 601 to implement the large language model output generation method provided in any of the above embodiments.
[0117] The electronic device 600 also includes a communication interface 603. The processor 602, memory 601, and communication interface 603 are connected via a communication bus and communicate with each other.
[0118] Processor 602 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of programs in the above scheme.
[0119] Communication interface 603 is used to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc.
[0120] The memory 601 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0121] In this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "multiple" refers to two or more unless otherwise expressly defined.
[0122] The above description of the embodiments is intended to enable those skilled in the art to understand and apply this application. It will be apparent to those skilled in the art that various modifications can be easily made to these embodiments, and the general principles described herein can be applied to other embodiments without creative effort. Therefore, this application is not limited to the embodiments described herein, and any improvements and modifications made by those skilled in the art based on the disclosure of this application without departing from the scope and spirit of this application are within the scope of this application.
Claims
1. A method for generating output of a large language model, characterized in that, The method for generating the output of the large language model includes: Based on the target application scenario, N text-based seed concepts are constructed, and soft prompt prototypes corresponding to various sub-concepts are assembled, where N is a positive integer greater than 1. Each seed concept selects a corresponding value along the target diversity dimension of the target application scenario. The soft prompt prototypes share a prefix parameter block, a concept-specific parameter block, and a shared suffix parameter block. The concept-specific parameter block is used to encode the generation behavior corresponding to the seed concept, and the shared prefix parameter block and the shared suffix parameter block are used to carry the general generation logic of the task. A continuous behavioral concept space is constructed based on the concept-specific parameter blocks in each of the aforementioned soft hint prototypes. Within the continuous behavioral concept space, soft hint prototype empirical subspace filtering and diversity selection are performed on the candidate vectors obtained based on behavioral offset extrapolation and radius calibration according to each of the aforementioned concept-specific parameter blocks to obtain target candidate vectors. The target candidate vectors are then dimension-restored to obtain recombined concept-specific parameter blocks. The recombined concept-specific parameter blocks are then concatenated with the shared prefix parameter blocks and the shared suffix parameter blocks to obtain the exploration soft hint. Each of the aforementioned exploration soft prompts is input into a pre-trained large language model, and k task results are output. Here, all network weights of the pre-trained large language model remain fixed, k is the number of valid candidate vectors to be filtered and output, and k is a positive integer.
2. The method for generating large language model output according to claim 1, characterized in that, The process of constructing N seed concepts based on the target application scenario and assembling soft prompt prototypes corresponding to various sub-concepts includes: Based on the target application scenario, construct N seed concepts in text form; A dialogue dataset corresponding to each seed concept is generated based on a pre-trained large language model. The dialogue dataset includes training tasks and corresponding answers. All network weights of the pre-trained large language model remain fixed. Based on each of the seed concepts, a corresponding primary soft hint prototype is assembled, and the primary soft hint prototype includes a shared prefix parameter block, a concept-specific parameter block, and a shared suffix parameter block; The training task and the primary soft cue prototype corresponding to the seed concept are concatenated and input into the pre-trained large language model for iterative training to obtain the soft cue prototype corresponding to each seed concept.
3. The method for generating large language model output according to claim 2, characterized in that, The step of concatenating the training task and the primary soft cue prototypes corresponding to the seed concepts, and then inputting them into the pre-trained large language model for iterative training, to obtain the soft cue prototypes corresponding to each seed concept, includes: The dialogue datasets corresponding to all seed concepts are mixed to obtain a hybrid dialogue dataset. Based on the hybrid dialogue dataset and the pre-trained large language model, the shared prefix parameter block, shared suffix parameter block and concept-specific parameter block in the primary soft prompt prototype are trained to obtain the trained shared prefix parameter block, trained shared suffix parameter block and trained concept-specific parameter block. All network weights of the pre-trained large language model remain fixed. Freeze the trained shared prefix parameter block and the trained shared suffix parameter block. For each seed concept, based on the dialogue dataset corresponding to the seed concept and the pre-trained large language model, iteratively update the trained concept-specific parameter block corresponding to the seed concept until training converges, and obtain the training completed soft prompt prototype corresponding to each seed concept.
4. The method for generating large language model output according to claim 1, characterized in that, The process involves constructing a continuous behavioral concept space based on concept-specific parameter blocks in each of the soft cue prototypes. Within this continuous behavioral concept space, soft cue prototype empirical subspace filtering and diversity selection are performed on candidate vectors obtained from behavioral offset extrapolation and radius calibration based on each of the concept-specific parameter blocks to obtain target candidate vectors. The target candidate vectors are then dimension-restored to obtain recombined concept-specific parameter blocks, including: Each concept-specific parameter block is flattened into a one-dimensional vector. The one-dimensional vector is used as an anchor point. A continuous behavior concept space is constructed based on all the anchor points. The κ nearest anchor points of each anchor point in the continuous behavior concept space are calculated to form the κ nearest neighbor set of each anchor point, where κ is a positive integer greater than 1. Calculate the distance between each anchor point and its corresponding k1-th nearest neighbor anchor point in the κ-nearest neighbor set. Define the weight of each anchor point based on the distance. Normalize the weights of all anchor points to obtain the sampling probability of each anchor point. Use a roulette wheel sampling algorithm to perform weighted random sampling in all anchor point sets according to the sampling probability of each anchor point, and extract the baseline anchor point u. i and base anchor point u a Wherein, the reference anchor point is used to extract the behavior offset, and the base anchor point is the starting point for generating a new behavior vector by superimposing the behavior offset, based on the reference anchor point u. i The base anchor point u a and the reference anchor point u i Anchor point u in the κ nearest neighbor set j Synthesize m·k initial candidate vectors, where the anchor point u j and the reference anchor point u i They are not the same, m is the excess multiple, k is the number of valid candidate vectors to be filtered and output, 1 ≤ k1≤ κ, k1, k and m are all positive integers, and the candidate vectors are obtained by radius calibration of each of the initial candidate vectors; Soft hinting prototype empirical subspace filtering and diversity selection are performed on each of the candidate vectors to obtain k target candidate vectors; The dimensions of each of the target candidate vectors are restored to obtain the recombined concept-specific parameter block.
5. The method for generating large language model output according to claim 4, characterized in that, The step of calibrating the radius of each of the initial candidate vectors to obtain candidate vectors includes: Calculate the center of all anchor points, calculate the radial distance of each anchor point relative to the center of the anchor point, statistically analyze the distribution of the radial distances of all anchor points, and determine the radius threshold; Calculate the radial distance of each candidate vector relative to the center of the anchor point; If the radial distance corresponding to the initial candidate vector is less than or equal to the radius threshold, then the initial candidate vector is determined as a candidate vector; If the radial distance corresponding to the initial candidate vector is greater than the radius threshold, then the direction of the initial candidate vector relative to the center of the anchor point is kept unchanged, and the radial distance corresponding to the initial candidate vector is scaled to the radius threshold to obtain the candidate vector.
6. The method for generating large language model output according to claim 2, characterized in that, The method for generating the output of the large language model also includes: Load the exploration soft prompts onto the pre-trained large language model, and perform greedy decoding on the identity probes to obtain k exploration agents; The k exploration agents and k seed concepts from the N textual seed concepts are merged into a candidate concept pool, which includes 2k candidate concepts. Each candidate concept is either an exploration agent or any one of the k seed concepts. All candidate concepts are encoded using a text embedding model, and the candidate concepts are converted into vectors. The farthest point greedy selection is performed based on the vector cosine similarity to select the k most dissimilar candidate concepts from the candidate concept pool. The k candidate concepts with the greatest differences are respectively placed into the system prompts of the first large model to generate the corresponding k task results.
7. A large language model output generation device, characterized in that, The large language model output generation device includes: an assembly module, an acquisition module, and an output module. The assembly module is used to construct N text-based seed concepts according to the target application scenario, and assemble soft prompt prototypes corresponding to various sub-concepts, where N is a positive integer greater than 1. Each seed concept selects a corresponding value along the target diversity dimension of the target application scenario. The soft prompt prototypes share a prefix parameter block, a concept-specific parameter block, and a shared suffix parameter block. The concept-specific parameter block is used to encode the generation behavior corresponding to the seed concept, and the shared prefix parameter block and the shared suffix parameter block are used to carry the general generation logic of the task. The acquisition module is used to construct a continuous behavioral concept space based on the concept-specific parameter blocks in each of the soft hint prototypes. Within the continuous behavioral concept space, soft hint prototype empirical subspace filtering and diversity selection are performed on the candidate vectors obtained by extrapolating based on behavioral offsets and radius calibration according to each of the concept-specific parameter blocks to obtain target candidate vectors. The target candidate vectors are then dimension-restored to obtain recombined concept-specific parameter blocks. The recombined concept-specific parameter blocks are then concatenated with the shared prefix parameter block and the shared suffix parameter block to obtain the exploration soft hint. The output module is used to input each of the exploration soft prompts into the pre-trained large language model and output k task results, wherein all network weights of the pre-trained large language model remain fixed, k is the number of valid candidate vectors to be filtered and output, and k is a positive integer.
8. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory is used to store a computer program executable by the processor; and the processor is used to execute the computer program in the memory to implement the large language model output generation method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the large language model output generation method as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the large language model output generation method as described in any one of claims 1-6.
