Text generation method and device based on large model, intelligent agent and electronic equipment

By optimizing the initial questions of the large model to match the job type and generating responses that match the user's intent and description style, the problem of limited understanding of the large model is solved, and the accuracy of the responses and user experience are improved.

CN120687571APending Publication Date: 2025-09-23BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510827926.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

The large model's understanding of the user's question intention is limited by the user's ability to express himself, resulting in answers that do not meet the user's true intentions and job type requirements.

Method used

By optimizing the initial questions based on the object's job type, the target questions are generated, and the large model is used to generate responses with the question intent and description style that match the job type.

Benefits of technology

It improves the large model's ability to understand the user's question intention, enhances the matching degree between the reply text and the user's question intention and description style, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687571A_ABST
    Figure CN120687571A_ABST
Patent Text Reader

Abstract

The invention provides a text generation method and device based on a large model, an intelligent agent and electronic equipment, and relates to the technical field of artificial intelligence, in particular to the technical field of large models and AI assistants. The specific implementation scheme of the text generation method comprises the following steps: receiving an initial question input by an object; optimizing the initial problem by using the large model based on the post type of the object and the initial problem to generate a target problem; the target question indicates a question intention matched with the post type; and generating a target text for replying the initial question based on the target question and the post type by using the large model, wherein the description style of the target text is matched with the post type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as large models and AI assistants, and specifically to text generation methods, devices, intelligent agents, and electronic devices based on large models. Background Art

[0002] The intelligent question-answering system built on the big model can generate corresponding replies based on the semantic understanding of the questions input by the user.

[0003] Since the degree to which large models can understand the intent of a question is often limited by the user's ability to express the question, there is an urgent need for a method that can deeply understand the user's intent to ask a question and generate a response. Summary of the Invention

[0004] The present disclosure provides a text generation method, device, intelligent agent and electronic device based on a large model.

[0005] According to one aspect of the present disclosure, a text generation method based on a big model is provided, comprising: receiving an initial question input by an object; utilizing the big model to optimize the initial question based on the object's job type and the initial question to generate a target question; the target question indicates a question intention that matches the job type; and utilizing the big model to generate a target text for answering the initial question based on the target question and the job type; wherein the description style of the target text matches the job type.

[0006] According to another aspect of the present disclosure, a large model-based text generation device is provided, including: a receiving module, an optimization module, and a generation module.

[0007] The receiving module is used to receive the initial question of the object input.

[0008] The optimization module is used to utilize the large model to optimize the initial question based on the object's job type and the initial question to generate the target question; the target question indicates the question intention that matches the job type.

[0009] The generation module is used to use the large model to generate a target text for answering the initial question based on the target question and the job type; wherein the description style of the target text matches the job type.

[0010] According to another aspect of the present disclosure, an intelligent agent is provided, including an input module, a processing module, and an output module.

[0011] The input module is used to receive the initial question of the object input.

[0012] The processing module is used to determine the target task based on the initial question received by the input module, determine the target large model based on the target task, and obtain the target text by calling the target large model to execute the large model-based text generation method described above.

[0013] The input module is used to output the target text obtained by the processing module.

[0014] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described above.

[0015] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described above.

[0016] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, which implements the method described above when executed by a processor.

[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.

[0019] Figure 1 Schematically illustrates an exemplary system architecture to which a large model-based text generation method and apparatus can be applied according to an embodiment of the present disclosure;

[0020] Figure 2 The flowchart of the text generation method based on the large model according to the embodiment of the present disclosure is schematically shown;

[0021] Figure 3 A schematic diagram schematically illustrates optimized questions generated from initial questions based on various job types according to an embodiment of the present disclosure;

[0022] Figure 4A A schematic diagram of generating a target text for answering a target question based on a job type according to an embodiment of the present disclosure is shown schematically;

[0023] Figure 4BA schematic diagram of generating a target text for answering a target question based on a job type according to another embodiment of the present disclosure is shown schematically;

[0024] Figure 4C A schematic diagram of generating a target text for answering a target question based on a job type according to another embodiment of the present disclosure is shown schematically;

[0025] Figure 5 A schematic diagram schematically illustrates information security verification for a generated target text according to an embodiment of the present disclosure;

[0026] Figure 6 Schematically shows a block diagram of a text generation device based on a large model according to an embodiment of the present disclosure;

[0027] Figure 7 A block diagram of an intelligent agent for text generation according to an embodiment of the present disclosure is schematically shown; and

[0028] Figure 8 A block diagram of an electronic device suitable for implementing a large model-based text generation method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0029] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0030] Since the large model's understanding of the question's intent is often limited by the user's ability to express the question, when the user enters the same question, the large model will usually generate similar answers.

[0031] For example, the user might ask, “How long is the trial period?” and the answer generated by the large model might be, “The trial period is x months.”

[0032] However, in actual application scenarios, users in different job types have different focuses when asking questions about the same issue.

[0033] For example, regarding the question of "how long is the probation period?", users in legal positions are primarily concerned with whether the company's rules and regulations regarding the probation period comply with relevant legal provisions and whether they pose legal risks. Users in sales positions, on the other hand, are primarily concerned with the length of the probation period and the conditions for becoming a regular employee after the probation period.

[0034] In view of this, the embodiment of the present disclosure provides a text generation method based on a large model. By utilizing the large model based on the object's job type, the initial question is optimized so that the question intention that matches the job type is clearly indicated in the optimized question. This enables the large model to generate a reply that matches the user's question intention and description style based on the optimized question and in combination with the job type. This further improves the large model's ability to understand the user's question intention, improves the matching degree between the reply text and the user's question intention, and improves the matching degree between the reply text and the description style applicable to the job type, further improving the user experience.

[0035] Figure 1 An exemplary system architecture to which the large model-based text generation method and apparatus can be applied according to an embodiment of the present disclosure is schematically shown.

[0036] It should be noted that Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture to which the large model-based text generation method and apparatus may be applied may include a terminal device, but the terminal device may implement the large model-based text generation method and apparatus provided in the embodiments of the present disclosure without interacting with a server.

[0037] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a terminal device 101 , an agent 102 and a server 103 .

[0038] like Figure 1 As shown, the exemplary architecture 100 may include a terminal device 101 , an agent 102 , and a server 103 .

[0039] Various communication client applications can be installed on the terminal device 101, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, AI smart assistants, etc. (only as examples).

[0040] The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.

[0041] The intelligent agent 102 can identify user needs based on a large model, such as a large language model, and output information that meets the user needs.

[0042] Server 103 may be a server that provides various services, such as a background management server (for example only) that supports content browsed by a user on terminal device 101. The background management server may analyze and process received data such as user requests, and provide feedback (e.g., web pages, information, or data obtained or generated based on user requests) to terminal device 101.

[0043] For example, a user may input an initial question into the terminal device 101 , and the terminal device 101 may call the agent 102 multiple times to perform operations such as question optimization, answer text generation, and answer text optimization, and finally output the target text 110 .

[0044] It should be noted that the text generation method based on the large model provided in the embodiment of the present disclosure can generally be executed by the terminal device 101. Accordingly, the text generation apparatus based on the large model provided in the embodiment of the present disclosure can also be set in the terminal device 101.

[0045] Alternatively, the text generation method based on the big model provided in the embodiment of the present disclosure may also be generally executed by the server 103. Accordingly, the text generation device based on the big model provided in the embodiment of the present disclosure may generally be set in the server 103. The text generation method based on the big model provided in the embodiment of the present disclosure may also be executed by a server or server cluster that is different from the server 103 and can communicate with the terminal device 101 and / or the server 103. Accordingly, the text generation device based on the big model provided in the embodiment of the present disclosure may also be set in a server or server cluster that is different from the server 103 and can communicate with the terminal device 101 and / or the server 103.

[0046] For example, terminal device 101 may send an initial question input by a user to server 103. After receiving the initial question, server 103 may invoke agent 102 to generate the target text by executing the large model-based text generation method of the present disclosure. Finally, the target text is fed back to terminal device 101.

[0047] It should be understood that Figure 1 The number of terminal devices, agents and servers in the embodiment is merely illustrative. Any number of terminal devices, agents and servers may be provided as required.

[0048] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.

[0049] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0050] Figure 2 The flowchart of the text generation method based on the large model according to the embodiment of the present disclosure is schematically shown.

[0051] like Figure 2 As shown, the method 200 includes operations S210 to S230.

[0052] In operation S210 , an initial question input by a subject is received.

[0053] In operation S220 , the initial question is optimized based on the job type of the object and the initial question using the large model to generate a target question.

[0054] In operation S230 , a target text for answering the initial question is generated based on the target question and the job type using the large model.

[0055] According to an embodiment of the present disclosure, the initial question input by the object may be a question text, or a question text obtained based on audio or video recognition.

[0056] In some embodiments, the position type of the object may include, but is not limited to, sales, technical, legal, and human resources positions, and may be configured based on the needs of the actual application scenario. This embodiment of the present disclosure does not specifically limit this. The position type of the object may be identified based on the login information entered by the object when logging into the interactive interface.

[0057] In some embodiments, Prompt A can be constructed based on the target's job type and initial question. This Prompt A is then fed into the large model, which then outputs the target question. To further enhance the large model's understanding of the problem optimization task, examples of optimizing reference questions based on different reference roles can be added to Prompt A. This allows the large model to learn the focus of different reference roles on the reference questions, thereby improving the match between the optimized target question and the job type.

[0058] According to embodiments of the present disclosure, the target question indicates a questioning intent that matches the position type. For example, in response to the initial question "How long is the probation period?", a user in an HR position may be interested in questions such as the length of the probation period and the probation approval process. A user in a technical position may be interested in questions such as whether the probation period for a technical position differs from that for other positions and the approval process for becoming a regular employee after the probation period.

[0059] Therefore, based on the initial question "How long is the probation period?", the target question generated for users in human resources positions can be "Please explain the maximum duration, common duration, and approval method of the employee probation period based on the human resources management system."

[0060] It can be understood that in the target question after optimization based on the object's job type, the question intention that matches the job type is clearly defined, which makes it easier for the big model to understand the focus of the user's inclined response to the initial question, so as to generate a response text that matches the user's question intention.

[0061] In response to the same question, users of different job types not only have different intentions in asking questions, but also have different requirements for the descriptive style of the answer content.

[0062] For example, a user in HR might require a formal, compliant, and jargon-heavy response style. A user in technical roles might require a concise, professional, and actionable response style. A user in legal affairs might require a rich legal terminology and citations. A user in sales might require a colloquial, clear, and directional response style.

[0063] In some embodiments, the target question and the job type constructed Prompt B can be input into the large model to output the target question. Description style information matching the job type can be added to Prompt B to improve the matching degree between the description style of the target text and the job type.

[0064] For example, the target text generated for users in sales positions might be, "The sales probation period is typically three months, during which designated performance targets must be achieved before a full-time position can be achieved." The target text generated for users in legal positions might be, "According to Article x of the xx Law, the probation period cannot exceed x months, and for technical positions, the maximum is y months. Therefore, the probation period duration currently stipulated in company rules and regulations complies with the xx Law."

[0065] The disclosed embodiments provide a method for generating text based on a large model. By utilizing the large model based on the object's job type, the initial question is optimized so that the optimized question clearly indicates the question intent that matches the job type. This enables the large model to generate a response that matches the user's question intent and description style based on the optimized question and in combination with the job type. This further improves the large model's ability to understand the user's question intent, improves the matching degree between the response text and the user's question intent, and improves the matching degree between the response text and the description style applicable to the job type, further improving the user experience.

[0066] Reference below Figures 3 to 5, combined with specific embodiments Figure 2 The method shown is further explained.

[0067] According to an embodiment of the present disclosure, using a big model to optimize the initial question based on the object's job type and the initial question to generate a target question can include the following operations: using the big model to perform semantic recognition on the initial question to generate an initial question intention; and using the big model to optimize the initial question based on the job type and the initial question intention to generate a target question.

[0068] In some embodiments, the initial question intent may include an intent type. Intent types may include, but are not limited to, information query, such as how long the performance cycle is; process operation, such as how to apply for a job transfer; policy review, such as whether there is additional compensation for overtime; and scenario rule, such as how long the probation period for sales personnel is.

[0069] In the disclosed embodiment, Prompt C, constructed based on each job type and the initial question intent, can be used as input to the macro model to output the target question. Examples of optimizing reference questions based on different reference roles can be added to Prompt C. This allows the macro model to learn from these examples the focus of different reference role types on the question and optimize the question based on this focus.

[0070] In some embodiments, using a big model to optimize the initial question based on the job type and the initial question intention to generate a target question can include the following operations: using a big model to generate attention information that matches the job type based on the job type and the initial question intention; and using a big model to optimize the initial question intention based on the attention information to generate a target question.

[0071] According to an embodiment of the present disclosure, the attention information is associated with the initial question intention, and indicates the expected response direction of each position type to the initial question intention.

[0072] For example, the initial question may be about the length of the probation period. For users in legal positions, the response direction indicated by the information may be about whether the content regarding the length of the probation period in the company's rules and regulations complies with relevant regulations.

[0073] Then, the big model is used to optimize the initial question intention based on a full understanding of the response direction indicated by the attention information, and generate target questions with clear response direction.

[0074] In some embodiments, the attention information generated by the big model may include multiple pieces of information, and the multiple pieces of attention information can be displayed to the object through the interactive interface so that the object can select the attention information that meets the intention of the question from the interactive interface. The big model can optimize the initial question intention based on the attention information selected by the object, reducing the number of interactions between the big model and the user, while also reducing the user's input burden and further improving the user experience.

[0075] Figure 3 The diagram schematically shows optimized questions generated from initial questions based on various job types according to an embodiment of the present disclosure.

[0076] like Figure 3 As shown, in operation S220, semantic recognition is performed on the initial question 321 "How long is the trial period?", and the generated initial question intention may be "How long is the trial period?".

[0077] For human resources positions, the generated target question P1 can be "Please explain the maximum duration, common duration and approval method of the employee probation period according to the human resources management system" 322A.

[0078] For technical positions, the generated target question P2 can be "Is the probation period for technical positions unified at three months? Does the process require supervisor review?" 322B.

[0079] For legal positions, the generated target question P3 can be "Please confirm whether the probation period arrangement complies with relevant regulations and explain the applicability of different positions" 322C.

[0080] For sales positions, the generated target question P4 can be "Is there a special probation period for sales positions? Does the period include a performance evaluation process?" 322D.

[0081] In an embodiment of the present disclosure, the initial question intention is optimized based on the object's job type, so that the big model can understand the real intention of the user's question, reducing the number of times the user repeatedly interacts with the big model, and further improving the user experience.

[0082] According to an embodiment of the present disclosure, using a large model to generate a target text for answering an initial question based on a target question and a job type may include the following operations: determining text description style information that matches the job type; and using a large model to generate a target text based on the target question and the text description style information.

[0083] In some embodiments, weights for various style dimensions can be preconfigured based on job type. Style dimensions may include, but are not limited to, formality, conciseness, and compliance. Weights for various style dimensions may vary for different job types. The text description style information may include each style dimension and its corresponding weight.

[0084] For example, for a legal position, the text description style information may include: formality 0.9, conciseness 0.6, and compliance 0.9. For a sales position, the text description style information may include: formality 0.4, conciseness 0.9, and compliance 0.5.

[0085] Figure 4A The diagram schematically shows a schematic diagram of generating a target text for answering a target question based on a job type according to an embodiment of the present disclosure.

[0086] like Figure 4A As shown, in operation S230A, first, based on the position type “human resources” 331 , a text description style 332A of “[Formality] 0.7, [Conciseness] 0.4, and [Compliance] 0.8” may be determined.

[0087] At the same time, the large model is used to perform a response generation operation based on the target question P1 "Please explain the maximum duration, common duration and approval method of the employee probation period according to the human resources management system" 322A, and generate the initial text "The employee probation period is 3-6 months, and the approval method is as follows: xxx" 333.

[0088] Then, based on the text description style 332A "[Formality] 0.7, [Conciseness] 0.4, and [Compliance] 0.8" and the initial text "The employee probation period is 3-6 months, and the approval method is as follows: xxx" 333, text optimization is performed to generate the target text "According to the employee management system, the probation period shall not exceed 6 months, and the standard for technical positions is 3 months. The approval method for technical positions is as follows: xxx" 334A.

[0089] When generating reply text, the large model not only needs to consider whether the generated reply conforms to the question intent of the target question, but also needs to consider the matching degree between the text description style and the job type. In this way, while improving the matching degree between the reply content and the question intent, it also improves the matching degree between the reply style and the job type, further improving the user experience.

[0090] In actual application scenarios, since each user has a different expression style, there will be slight differences between the expression styles of each user even if they are in the same job type.

[0091] In some embodiments, determining text description style information that matches a job type may include the following operations: obtaining historical interaction information of the object; and using a large model to analyze the historical interaction information and the job type to generate text description style information.

[0092] According to an embodiment of the present disclosure, the historical interaction information may include: historical dialogue information between the object and the large model regarding other questions, and may also include: context information associated with the initial question.

[0093] In some embodiments, the large model can fully understand the language expression style of the object in the historical interaction information, and score the expression style of the object around preset dimensions, such as formality, conciseness, and compliance. The scoring result can be used as the weight of the text description style.

[0094] Figure 4B The diagram schematically shows a schematic diagram of generating a target text for answering a target question based on a job type according to another embodiment of the present disclosure.

[0095] like Figure 4B As shown, in operation S230B, the large model is used to analyze the historical interaction information 335 and the position type "human resources" 331 in connection with the context to obtain the text description style 332B "[Formality] 0.6, [Conciseness] 0.6 and [Compliance] 0.8".

[0096] and Figure 4A Compared with the text description style 332A in the example shown, the formality decreases from 0.7 to 0.6, and the conciseness increases from 0.4 to 0.6. It is understandable that the user prefers concise responses. Therefore, based on the text description style 332B, the initial text "The employee probation period is 3-6 months, and the approval method is as follows: xxx" 333 is optimized, and the generated target text 334B is relatively Figure 4A The target text 334A shown in the figure uses a more concise and general description of the approval process. For example, "Regularization of technical positions is approved by the supervisor, while other positions are approved by xx."

[0097] The text description style is analyzed based on historical interaction information and job type, which better meets the user's personalized needs and further improves the user experience.

[0098] In some embodiments, using a large model to generate a target text based on a target question and text description style information may include the following operations: using the large model to generate an initial text for answering an initial question based on the target question; and using the large model to optimize the initial text based on the text description style information to generate a target text.

[0099] According to embodiments of the present disclosure, the initial text can represent text that semantically matches the target question. For example, the target question might be, "Please explain the maximum duration, typical length, and approval method for employee probationary periods, based on the human resources management system." Based on a full understanding of the target question's intent, the large model generates a response that semantically matches the target question, for example, "The employee probationary period is 3-6 months, and the approval method is as follows: xxx."

[0100] According to an embodiment of the present disclosure, in order to further improve the credibility of the reply content, a large model can be used to generate multiple candidate texts based on the target text; the large model can be used to perform traceability analysis on the multiple candidate texts to generate the credibility of the multiple candidate texts; and based on the credibility, the initial text can be determined from the multiple candidate texts.

[0101] In some embodiments, candidate texts can be generated by extracting text content based on the target question using a large model, by retrieving content related to the target question. Therefore, when performing source analysis on the candidate texts, the credibility of the candidate texts can be determined based on the source of the content used to extract the candidate texts.

[0102] For example, the content of candidate text F1 comes from the company's rules and regulations. The content of candidate text F2 comes from user reviews on the company's public platform. The credibility of different data sources can be pre-configured. For example, the credibility of rules and regulations is higher than the credibility of reviews. When tracing the candidate texts, the credibility of candidate text F1 is higher than that of candidate text F2.

[0103] In some embodiments, the candidate texts may be subjected to source analysis based on the logical association of the candidate text contents at the semantic level to generate credibility.

[0104] For example, candidate text F1 could contain "The probation period is 3-6 months, and the probation period for sales positions is 2 months." Candidate text F2 could contain "The probation period is 3-6 months, and the probation period for sales positions can be adjusted downward based on actual circumstances, with the floating period not exceeding 1 month."

[0105] It is understandable that the probationary period for sales positions in candidate text F1 is not between 3 and 6 months. Therefore, candidate text F1 contains a logical error at the semantic level. Candidate text F2 is logically rigorous at the semantic level, so the initial text can be determined to be candidate text F2.

[0106] The weights of each style dimension are configured in the text description style information. Therefore, when the large model optimizes the initial text based on the text description style information, it can optimize the initial text according to the requirements of each style dimension defined in the text description style information while maintaining the semantic similarity between the target text and the initial text.

[0107] Figure 4C The diagram schematically shows a schematic diagram of generating a target text for answering a target question based on a job type according to another embodiment of the present disclosure.

[0108] like Figure 4C As shown, in operation S230C, the formality of the text description style 332A is 0.7, the conciseness is 0.4, and the compliance is 0.8. It is understandable that the text description style for HR positions should be formal, compliant, and contain a lot of document terminology. Therefore, for the initial text F2, "The probation period is 3-6 months. The probation period for sales positions can be adjusted downward based on actual circumstances, with a floating period not exceeding 1 month. The approval process is as follows..." 333C, the optimized target text 334C could be "According to the employee management system, the probation period is no longer than 6 months. The probation period for sales positions can be adjusted downward, with a floating period not exceeding 1 month. The approval process is as follows..."

[0109] In the disclosed embodiment, the source analysis of candidate text 336 further improves the matching degree between the initial text F2 and the question intent of target question 322. Optimizing the initial text based on the text description style further satisfies the user's need for personalized response content and improves the user experience.

[0110] For information security reasons, information security analysis can also be performed on the target text generated by the large model to further improve information security in the text generation process.

[0111] Therefore, in an embodiment of the present disclosure, the above method may further include the following operations: using a large model to perform information security analysis on the target text based on the position type of the object to generate a security level; and in response to determining that the security level is less than a predetermined threshold, using the large model to correct the target text to generate a corrected text; wherein the corrected text matches the access rights.

[0112] According to an embodiment of the present disclosure, the security level represents the degree of matching between the content in the target text and the access rights of the object.

[0113] Figure 5 A schematic diagram schematically illustrates information security verification for a generated target text according to an embodiment of the present disclosure.

[0114] like Figure 5As shown, in this embodiment, the target text 334 generated by the large model can be analyzed for information security by calling the large model, and operation S350 is performed to determine whether the security level is less than a threshold. If so, the target text 334 is used as the final output text, and operation S370 is performed to output the target text.

[0115] If not, then operation S360 is executed to call the large model to correct the text, and then operation S380 is executed to output the corrected text.

[0116] For example, objects in different technical positions have different access rights to project content due to their different specific work content.

[0117] Therefore, when the response content generated for a question input by a position A object involves information that is prohibited from access by the position A object, the large model can be used to correct the response content until the content in the corrected text is accessible to the position A object.

[0118] In the embodiment of the present disclosure, by performing information security verification on the output target text, the information security during the text output process is further improved.

[0119] Figure 6 A block diagram of a large model-based text generation device according to an embodiment of the present disclosure is schematically shown.

[0120] like Figure 6 As shown, the text generating device 600 may include a receiving module 610 , an optimizing module 620 and a generating module 630 .

[0121] The receiving module 610 is configured to receive an initial question input by a subject.

[0122] The optimization module 620 is used to optimize the initial question using the large model based on the object's job type and the initial question to generate a target question; the target question indicates the question intention that matches the job type.

[0123] The generation module 630 is used to generate a target text for answering the initial question based on the target question and the job type using the large model; wherein the description style of the target text matches the job type.

[0124] According to an embodiment of the present disclosure, the optimization module 620 includes: a semantic recognition submodule and a first optimization submodule.

[0125] The semantic recognition submodule is used to use the large model to perform semantic recognition on the initial question and generate the initial question intent. The first optimization submodule is used to use the large model to optimize the initial question based on the job type and the initial question intent and generate the target question.

[0126] According to an embodiment of the present disclosure, the optimization submodule includes: a generation unit and an optimization unit.

[0127] The generation unit is used to generate attention information matching the job type based on the job type and the initial question intention by using the big model; wherein the attention information is associated with the initial question intention.

[0128] The optimization unit is used to use the large model to optimize the initial question intention based on the attention information and generate the target question.

[0129] According to an embodiment of the present disclosure, the generation module 630 includes: a determination submodule and a generation submodule.

[0130] The determination submodule is used to determine the text description style information that matches the job type. The second generation submodule is used to use the large model to generate the target text based on the target question and the text description style information.

[0131] According to an embodiment of the present disclosure, the determination submodule includes an acquisition unit and an analysis unit.

[0132] The acquisition unit is used to obtain historical interaction information of the object.

[0133] The analysis unit is used to use a large model to analyze historical interaction information and job types and generate text description style information.

[0134] According to an embodiment of the present disclosure, the generation submodule includes a generation unit and an optimization unit.

[0135] The generation unit is used to generate initial text for answering the initial question based on the target question by using the large model.

[0136] The optimization unit is used to use the large model to optimize the initial text based on the text description style information to generate the target text.

[0137] According to an embodiment of the present disclosure, the generation unit includes: a generation subunit, a source tracing analysis subunit and a determination subunit.

[0138] The generation subunit is used to generate multiple candidate texts based on the target text using the large model.

[0139] The source tracing analysis subunit is used to use a large model to perform source tracing analysis on multiple candidate texts and generate the credibility of multiple candidate texts.

[0140] The determination subunit is used to determine an initial text from multiple candidate texts based on the credibility.

[0141] According to an embodiment of the present disclosure, the above-mentioned device further includes: a security analysis module and a correction module.

[0142] The security analysis module is used to use a large model to perform information security analysis on the target text based on the object's job type and generate a security level; the security level represents the degree of match between the content in the target text and the object's access rights.

[0143] The correction module is used to correct the target text using the large model in response to determining that the security level is less than a predetermined threshold, and generate a corrected text; wherein the corrected text matches the access permission.

[0144] According to an embodiment of the present disclosure, the present disclosure also provides an intelligent agent for text generation, an electronic device, a readable storage medium and a computer program product.

[0145] According to an embodiment of the present disclosure, an intelligent agent for text generation includes: an input module, a processing module and an output module.

[0146] The input module is used to receive the initial question of the object input.

[0147] The processing module is used to determine the target task based on the initial question received by the input module, determine the target large model based on the target task, and obtain the target text by calling the target large model to execute the method of text generation based on the large model.

[0148] The output module is used to output the target text obtained by the processing module.

[0149] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described above.

[0150] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method described above.

[0151] According to an embodiment of the present disclosure, a computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the method described above.

[0152] Figure 7 Schematically shows a block diagram of an intelligent agent for text generation according to an embodiment of the present disclosure

[0153] like Figure 7 As shown, in the embodiment of the present disclosure, inspired by the von Neumann structure in modern computer theory, as shown in FIG. Figure 7As shown, the AI ​​agent 700 may include three core modules: an input module 710, an output module 720, and a processing module 730. The processing module 730 may include a control unit 731, a storage unit 732, and an operation unit 733.

[0154] Input module 710 is responsible for receiving or perceiving information such as queries, requests, instructions, signals, or data from the outside world (e.g., users or the external environment) and converting it into a format that AI agent 700 can understand and process. Input module 710 is the primary link for AI agent 700 to interact with the outside world. It enables AI agent 700 to efficiently and accurately obtain necessary "sensory" information from the outside world and respond to this information.

[0155] In an example, the input information received by the input module 710 may be the initial question described above.

[0156] In this example, processing module 730 is the core support for AI agent 700's ability to handle complex tasks. Processing module 730 can determine a target task based on the input information received by input module 710, determine a large model based on the target task, and execute the large model-based text generation method described above by calling the large model to output the target text.

[0157] In the example, the control unit 731 in the processing module 730 will continuously interact with the storage unit 732, the computing unit 733, and / or the output module 720 during operation. However, it should be noted that in the embodiment of the present disclosure, the control unit 731 acts as a single initiator to initiate communication with the storage unit 732, the computing unit 733, and / or the output module 720, and there is no communication coupling between the storage unit 732, the computing unit 733, and the output module 720.

[0158] In this example, the performance of the control unit 731 can be closely related to the large model based on which the AI ​​agent 700 is based. In order to fully utilize the capabilities of the large language model, the internal structure of the control unit 1031 can be designed to be highly configurable and scalable to cope with various types of tasks and requirements in real scenarios.

[0159] The storage unit 732 may be responsible for memorizing information such as historical conversations, event flows, etc. The configuration information, target text, and data resources generated in each round as described above may be included in the storage unit 732 .

[0160] In the example, after the AI ​​agent 700 obtains the configuration generation request, the AI ​​agent 1000 can use the intent recognition model to determine the configuration intent from the initial text. The configuration intent can be stored in the storage unit 732. The AI ​​agent 700 can retrieve the relevant data resources from the storage unit 1032 and feed it back to the control unit 731. Then, the control unit 731 can use the fed-back data resources to obtain the configuration data corresponding to the initial text. It can also retrieve relevant text data from the storage unit 732 and feed it back to the control unit 731. Then, the control unit 731 can use the returned text data to obtain the target text. And pass the target text and configuration data to the output module 720.

[0161] The computing unit 1033 can be viewed as a predefined tool library. The renderer and presentation controls mentioned above can be included in the computing unit 733.

[0162] In the example, when the AI ​​agent 1000 needs to render multiple output data, it can call the relevant renderer and display control from the operation unit 733 and feed it back to the control unit 732. Then, the control unit 732 can use the feedback renderer and display control to render the first search result and pass the first search result to the output module 720. It can be understood that although the large language model has excellent language understanding and generation capabilities, it is the same as a human. Without the help of any tools, the tasks that can be solved are very limited. When the AI ​​agent 700 is given the ability to call tools, it can achieve tasks such as completing mathematical operations with the help of a calculator, completing data analysis with the help of python, and completing prediction tasks with the help of a search engine.

[0163] In an example, the output module 720 may output the target text described above.

[0164] The AI ​​agent 700 according to the embodiment of the present disclosure can simply and effectively improve the level of intelligence, and enhance flexibility and versatility.

[0165] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0166] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. Computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to bus 804.

[0167] Various components in device 800 are connected to I / O interface 805, including an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0168] The computing unit 801 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the large-model-based text generation method. For example, in some embodiments, the large-model-based text generation method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the large-model-based text generation method described above can be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the large model-based text generation method in any other appropriate manner (eg, by means of firmware).

[0169] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-a-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0170] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0171] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0172] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0173] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0174] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0175] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0176] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A text generation method based on a large model, comprising: Receive the initial question of the subject input; Using the large model, based on the job type of the object and the initial question, the initial question is optimized to generate a target question; The target question indicates a questioning intention that matches the position type; as well as The large model is used to generate a target text for answering the initial question based on the target question and the job type; wherein the description style of the target text matches the job type.

2. The method according to claim 1, wherein The method of utilizing the large model to optimize the initial question based on the position type of the object and the initial question to generate a target question includes: Using the large model, semantically identifying the initial question and generating an initial question intention; and The large model is used to optimize the initial question based on the job type and the initial question intention to generate the target question.

3. The method according to claim 2, wherein: The method of using the large model to optimize the initial question based on the job type and the initial question intention to generate the target question includes: Using the large model, based on the job type and the initial question intention, generating interest information that matches the job type; wherein the interest information is associated with the initial question intention; and The large model is used to optimize the initial question intention based on the focus information to generate the target question.

4. The method according to claim 1, wherein The step of utilizing the large model to generate a target text for answering the initial question based on the target question and the job type includes: Determining text description style information that matches the job type; and The target text is generated by utilizing the large model based on the target question and the text description style information.

5. The method according to claim 4, wherein The determining of text description style information matching the position type includes: Obtaining historical interaction information of the object; and The large model is used to analyze the historical interaction information and the job type to generate the text description style information.

6. The method according to claim 4, wherein: The step of generating the target text by using the large model based on the target question and the text description style information includes: generating an initial text for answering the initial question based on the target question using the large model; and The large model is used to optimize the initial text based on the text description style information to generate the target text.

7. The method according to claim 6, wherein: The step of generating an initial text for answering the initial question based on the target question by using the large model includes: Using the large model, generating a plurality of candidate texts based on the target text; Performing source analysis on the multiple candidate texts using the large model to generate credibility of the multiple candidate texts; and Based on the confidence level, the initial text is determined from the plurality of candidate texts.

8. The method according to any one of claims 1 to 7, wherein The method further comprises: Using the large model, based on the position type of the object, perform information security analysis on the target text to generate a security level; wherein the security level represents the degree of match between the content in the target text and the access rights of the object; and In response to determining that the security level is less than a predetermined threshold, the target text is corrected using the large model to generate a corrected text; wherein the corrected text matches the access permission.

9. A text generation device based on a large model, comprising: A receiving module, used to receive the initial question input by the object; An optimization module, configured to optimize the initial problem using a large model based on the job type of the object and the initial problem, and generate a target problem; The target question indicates a questioning intention that matches the position type; as well as A generation module is used to use the large model to generate a target text for answering the initial question based on the target question and the job type; wherein the description style of the target text matches the job type.

10. An intelligent agent for text generation, comprising: An input module, used to receive the initial question of the object input; a processing module, configured to determine a target task based on the initial question received by the input module, determine a target macromodel based on the target task, and execute the method according to any one of claims 1 to 8 by calling the target macromodel to obtain a target text; as well as An output module is used to output the target text obtained by the processing module.

11. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

13. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Product production demand management method and device, equipment and storage medium

    CN116894556A

  • Full-process automatic interview assisting method, system and equipment based on large language model

    CN118096095A

  • Problem rewriting method and device, terminal equipment and storage medium

    CN118939773A