Method for generating Prompt based on large language model low-code programming
By constructing a structured Prompt framework and optimizing the generated Prompt, the problems of inconsistent formats and poor functional integrity in the field of code generation in large language models are solved, and the standardization and practicality of code generation are realized, which shortens the project cycle and improves practical value.
Patent Information
- Application Number
- CN202411775897.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In the field of code generation, large language models have problems such as inconsistent format and poor functional integrity, which leads to limited practical application value of code generation and increases the difficulty of debugging for R&D personnel.
By constructing a structured Prompt framework, it is subdivided into four parts: role, requirements, standards and results, and adding detailed information through the completion and optimization modules, optimize the generated Prompt until the quality evaluation and effect verification index reaches a custom threshold.
It realizes the standardization and practicality of code generation, and the generated code is more structured and complete, shortens the overall cycle of the project from requirement analysis to test release, and has extremely high practical value.
Smart Images

Figure CN119847497A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big models and information technology, and in particular to a method for generating prompts based on low-code programming of a big language model. Background Art
[0002] Large Language Model (LLM) is a type of advanced artificial intelligence model in the field of deep learning. They have hundreds of billions or more parameters and are trained with massive amounts of text data. This type of model can not only generate and understand natural language text, but is also good at performing a variety of natural language processing tasks such as translation and sentiment analysis. LLM has demonstrated a wide range of application value in multiple application scenarios such as text writing, question-and-answer devices, and dialogue interactions. From automated customer service to high-end scientific research, it has demonstrated its extraordinary practical potential and powerful capabilities.
[0003] Similarly, large language models also have some disadvantages and limitations in the field of code generation programming:
[0004] (1) Code generation formats vary and lack consistency: Due to the lack of standardized structures and guiding prompts, large language models may produce diverse output results for the same code requirement, including different versions and tool libraries suitable for different operating environments. This greatly weakens the actual application value of the code and increases the debugging difficulty for R&D personnel.
[0005] (2) Lack of completeness in code generation: Large language models usually only output code snippets for a single function, which makes it difficult to cover the overall idea, that is, comprehensive content forms such as design documents and unit tests. This makes the code unclear in conveying key information and data, affecting the overall readability and maintainability.
[0006] Prompt construction engineering is a natural language processing technology, that is, a technology that guides language models to generate text that meets specific requirements or styles through carefully designed input prompts (i.e. prompts). It uses the model's ability to understand context to achieve more accurate and controllable text generation, and is widely used in question-answering devices, text creation and other fields.
[0007] In order to solve the problems of inconsistent format and poor functional integrity in the field of code generation of large language models, improve the standardization and practicality of code generation, and meet the urgent needs of software development, scientific research and other fields for high-quality, structured code and design document generation, the present invention proposes a method for generating Prompts based on low-code programming of large language models. Summary of the invention
[0008] In order to remedy the defects of the prior art, the present invention provides a simple and efficient method for generating prompts based on low-code programming of a large language model.
[0009] The present invention is achieved through the following technical solutions:
[0010] A method for generating prompts based on low-code programming of a large language model, comprising the following steps:
[0011] Step S1, construct the overall framework of Prompt according to the functional requirements and performance requirements of the project, and subdivide the overall framework of Prompt into four parts: roles, requirements, standards and results;
[0012] Among them, roles are used to define the identity and capabilities of the large language model when performing tasks, requirements are used to clearly explain the problems or tasks to be solved, standards are used to put forward specific requirements and restrictions on output results, and results are used to clarify the specific goals and expected results of the tasks;
[0013] Step S2: For the four parts of roles, requirements, standards, and results, complete and optimize the prompt framework content and add more detailed information capability descriptions;
[0014] In step S2, the implementation steps are as follows:
[0015] Step S2.1, in the role section, customize and clearly set the role played by the large language model, and list in detail the professional and technical skills possessed by the role, which will serve as a reference for the ability of the large language model to perform tasks;
[0016] Step S2.2: In the requirements section, describe in detail the task or problem that needs to be solved by the large language model, including the task background, goals, constraints, and key points;
[0017] Step S2.3, in the standard part, customize and clearly specify the standards and requirements for the output results of the large language model, including code running environment requirements, output format requirements, and unified content architecture requirements;
[0018] In step S2.3, programming language characteristics, data structures and algorithm logic are introduced to transform abstract standards into specific executable requirements.
[0019] Step S2.4: In the results section, customize the evaluation criteria and verification methods for the output results;
[0020] Conduct quality assessment and effect verification of output results according to project requirements;
[0021] Step S3: Optimize the generated prompt, and continuously adjust and improve the content according to the output feedback of the large language model until the quality assessment index and effect verification index reach the custom threshold to meet the project requirements.
[0022] In step S3, the implementation steps are as follows:
[0023] Step S3.1, based on the output feedback of the large language model, preliminarily evaluate the accuracy and completeness of the results;
[0024] Step S3.2: Optimize Prompt based on the problems and deficiencies identified in the preliminary evaluation and user needs;
[0025] Step S3.3, verify the optimized Prompt again, generate output results, and perform quality assessment and effect verification on the results;
[0026] Step S3.4: Repeat steps S3.1 to S3.3 until both the quality assessment index and the effect verification index reach the custom threshold to meet project requirements.
[0027] In step S3, the generated Prompt is optimized, and the optimization methods include the following three:
[0028] (1) Compound prompts to add tasks or requirements so that a single prompt contains multiple tasks or requirements to solve the problem more efficiently;
[0029] (2) Iterate the prompt to adjust the question statement;
[0030] (3) Contextual Prompt to provide contextual information. In complex tasks, providing contextual information can significantly enhance the quality of AI’s response.
[0031] A device for generating prompts based on low-code programming of a large language model, comprising a prompt framework construction module, a completion and optimization module, and a prompt optimization module;
[0032] The Prompt framework construction module is responsible for constructing the Prompt overall framework according to the functional and performance requirements of the project, and subdividing the Prompt overall framework into four parts: roles, requirements, standards, and results;
[0033] Among them, roles are used to define the identity and capabilities of the large language model when performing tasks, requirements are used to clearly explain the problems or tasks to be solved, standards are used to put forward specific requirements and restrictions on output results, and results are used to clarify the specific goals and expected results of the tasks;
[0034] The completion and optimization module is responsible for completing and optimizing the Prompt framework content for the four parts of roles, requirements, standards, and results, and adding more detailed information capability descriptions;
[0035] The completion and optimization module completes and optimizes the Prompt framework content. The implementation steps are as follows:
[0036] Step S2.1, in the role section, customize and clearly set the role played by the large language model, and list in detail the professional and technical skills possessed by the role, which will serve as a reference for the ability of the large language model to perform tasks;
[0037] Step S2.2: In the requirements section, describe in detail the task or problem that needs to be solved by the large language model, including the task background, goals, constraints, and key points;
[0038] Step S2.3, in the standard part, customize and clearly specify the standards and requirements for the output results of the large language model, including code running environment requirements, output format requirements, and unified content architecture requirements;
[0039] In step S2.3, programming language characteristics, data structures and algorithm logic are introduced to transform abstract standards into specific executable requirements.
[0040] Step S2.4: In the results section, customize the evaluation criteria and verification methods for the output results;
[0041] Conduct quality assessment and effect verification of output results according to project requirements;
[0042] The prompt optimization module is responsible for optimizing the generated prompts. It continuously adjusts and improves the content based on the output feedback of the large language model until the quality assessment index and effect verification index reach the custom threshold to meet project requirements.
[0043] The Prompt optimization module optimizes, adjusts and improves the generated Prompt, and the implementation steps are as follows:
[0044] Step S3.1, based on the output feedback of the large language model, preliminarily evaluate the accuracy and completeness of the results;
[0045] Step S3.2: Optimize Prompt based on the problems and deficiencies identified in the preliminary evaluation and user needs;
[0046] Step S3.3, verify the optimized Prompt again, generate output results, and perform quality assessment and effect verification on the results;
[0047] Step S3.4: Repeat steps S3.1 to S3.3 until both the quality assessment index and the effect verification index reach the custom threshold to meet project requirements.
[0048] The Prompt optimization module optimizes the generated Prompt, and the optimization methods include the following three:
[0049] (1) Compound prompts to add tasks or requirements so that a single prompt contains multiple tasks or requirements to solve the problem more efficiently;
[0050] (2) Iterate the prompt to adjust the question statement;
[0051] (3) Context Prompt to provide context information.
[0052] A device for generating prompts based on low-code programming of a large language model, characterized in that it includes a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the above-mentioned method steps when executing the computer program.
[0053] A readable storage medium, characterized in that: a computer program is stored on the readable storage medium, and the computer program implements the above method steps when executed by a processor.
[0054] The beneficial effects of the present invention are as follows: the method for generating prompts based on low-code programming of a large language model fully utilizes the generalization ability of the large language model and the precise guidance advantages of the prompt construction project, realizes the intelligence and efficiency of programming and document generation, has strong flexibility, greatly enriches the dimensions of programming output, shortens the overall cycle of the project from demand analysis to test release, and has extremely high practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Attached Figure 1 This is a schematic diagram of the method for generating Prompt based on low-code programming of a large language model in the present invention.
[0057] Attached Figure 2 This is a schematic diagram of the dynamic optimization Prompt method of the present invention. DETAILED DESCRIPTION
[0058] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0059] Prompt is an AI-based instruction technology that guides the output of language models through clear and specific instructions. By asking questions, Prompt enables language models to clearly understand requirements, standards, goals, and expected results. Based on this basic concept, a structured Prompt framework is built to standardize the output of large language models to ensure that they generate relevant, accurate, and high-quality text.
[0060] The method for generating prompts based on low-code programming of a large language model includes the following steps:
[0061] Step S1, construct the overall framework of Prompt according to the functional requirements and performance requirements of the project, and subdivide the overall framework of Prompt into four parts: roles, requirements, standards and results;
[0062] Among them, roles are used to define the identity and capabilities of the large language model when performing tasks, requirements are used to clearly explain the problems or tasks to be solved, standards are used to put forward specific requirements and restrictions on output results, and results are used to clarify the specific goals and expected results of the tasks;
[0063] In step S1, the overall framework of Prompt includes the following four parts:
[0064] Roles: can be considered as a "capability set" or "syntactic sugar" for a large model. Users do not need to describe each capability in detail or break down tasks in detail, but can use the capabilities behind them by introducing "roles".
[0065] Requirements: These are the parts that are most directly related to the task. They must clearly describe what the user wants the large model to do so that the model can output the most expected results. In addition to clear and unambiguous descriptions, task decomposition is particularly important in complex tasks.
[0066] Standards: are the standardized restrictions on tasks based on requirements, clarifying the executable scope of tasks and customer expectations.
[0067] Result: It is the expectation of the task output result, that is, the specific result that the user expects the large model to output for the task.
[0068] Specifically, examples of the above prompt framework in generating code, design documents, and unit tests are as follows:
[0069] Example 1: Generate code to find the number of prime numbers in any integer interval
[0070] a) Role: Software Development Engineer
[0071] b) Requirement: For any upper and lower limits of an integer interval input, output the number of prime numbers in the interval.
[0072] c) Standard: Generate Java code according to requirements. The operating environment is Java 8. The code content should contain detailed comments. Each comment is prefixed with "comment:".
[0073] d) Result: Provide a Java method that returns the number of prime numbers of type int.
[0074] Example 2: Generate a design document to find the number of prime numbers in any integer interval
[0075] a) Role: Solution Architect
[0076] b) Requirement: For a function that inputs an arbitrary integer interval with upper and lower limits and outputs the number of prime numbers within the interval, output the corresponding functional design document.
[0077] c) Standards: Generate design documents based on requirements, including data flow, functional description, business logic description, and referenced tool libraries and versions.
[0078] d) Result: Output the design document in docx format.
[0079] Example 3: Generate a unit test to find the number of prime numbers in any integer interval
[0080] a) Role: Test Engineer
[0081] b) Requirement: Generate unit test cases for the function of inputting upper and lower limits of arbitrary integer intervals and outputting the number of prime numbers in the interval.
[0082] c) Standard: The test cases are mainly black box tests, including boundary tests, and cover all boundary values as much as possible.
[0083] d) Result: Output the written test cases and their expected results.
[0084] Step S2: For the four parts of roles, requirements, standards, and results, complete and optimize the prompt framework content and add more detailed information capability descriptions;
[0085] In step S2, the implementation steps are as follows:
[0086] Step S2.1, in the role section, customize and clearly set the role played by the large language model, such as solution architect, software development engineer, and test engineer. And list the professional and technical skills possessed by the role in detail, which will serve as a reference for the ability of the large language model to perform tasks;
[0087] Step S2.2: In the requirements section, describe in detail the task or problem that needs to be solved by the large language model, including the task background, goals, constraints, and key points;
[0088] Step S2.3, in the standard part, customize and clearly specify the standards and requirements for the output results of the large language model, including code running environment requirements, output format requirements, and unified content architecture requirements;
[0089] In step S2.3, programming language characteristics, data structures and algorithm logic are introduced to transform abstract standards into specific executable requirements.
[0090] Step S2.4: In the results section, customize the evaluation criteria and verification methods for the output results;
[0091] Conduct quality assessment and effect verification of output results according to project requirements;
[0092] Specifically, you can use the following template to supplement the "role information":
[0093] Now you are an excellent {{role identity noun}}, with {{basic technical skill level}} and {{knowledge scope}}, your job content is {{job content related to requirements}}, and you have the following abilities {{supplementary abilities}}.
[0094] Specifically, "requirements" is the part with the most information in the prompt, and it is also the part most relevant to the task. The decomposition of complex tasks is often very effective in supplementing the information in the "requirements" part, which can not only improve the reasoning ability of the large model, but also make the output of the large model more in line with user requirements. With the help of the planning idea in the agent, let the large model help split a complex task. The following template can be used:
[0095] “{{The task you want to do}}, what steps are required, how to split it up / how to think about it?”
[0096] Specifically, the key to supplement the information of "standard" is to put the standard at the end of Prompt. The essence of large language models is to complete text. The output of the subsequent text will tend to be based on the closer context. The algorithm analysis explained by the "LIME" model shows that the weights between texts with closer distances are often greater, which can be clearly shown in the Attention weight in the Transformer model.
[0097] Step S3: Optimize the generated prompt, and continuously adjust and improve the content according to the output feedback of the large language model until the quality assessment index and effect verification index reach the custom threshold to meet the project requirements.
[0098] In step S3, the implementation steps are as follows:
[0099] Step S3.1, based on the output feedback of the large language model, preliminarily evaluate the accuracy and completeness of the results;
[0100] Step S3.2: Optimize Prompt based on the problems and deficiencies identified in the preliminary evaluation and user needs;
[0101] Step S3.3, verify the optimized Prompt again, generate output results, and perform quality assessment and effect verification on the results;
[0102] Step S3.4: Repeat steps S3.1 to S3.3 until both the quality assessment index and the effect verification index reach the custom threshold to meet project requirements.
[0103] Information about the professional and technical skills required for the role can be obtained through search engines or recruitment websites.
[0104] In step S3, the generated Prompt is optimized, and the optimization methods include the following three:
[0105] (1) Compound prompts to add tasks or requirements so that a single prompt contains multiple tasks or requirements to solve the problem more efficiently;
[0106] For example, when building a method to find the number of prime numbers in an arbitrary integer interval, you can design the following compound prompt:
[0107] Please provide a Java method that can receive user input data and then solve the number of prime numbers in the interval based on this data. Ensure that this method has user data verification function.
[0108] (2) Iterate the prompt to adjust the question statement;
[0109] When the initial Prompt result does not meet expectations, you can improve the result by iteratively optimizing the Prompt.
[0110] For example, if the generated Java method has errors in certain situations, you can adjust the prompt:
[0111] Please optimize the generated Java code to ensure that it formats all user input data correctly and fix any errors you have discovered.
[0112] (3) Contextual Prompt to provide contextual information. In complex tasks, providing contextual information can significantly enhance the quality of AI’s response.
[0113] For example, in the above functional requirements, the following code details should be included:
[0114] Please construct a method based on the following requirements (please provide detailed code description) to count the number of prime numbers that meet specific conditions.
[0115] The Prompt content is continuously optimized based on the above method until the result generated by the large language model according to the optimized Prompt fully meets the predetermined final requirements.
[0116] The device for generating prompts based on low-code programming of a large language model includes a prompt framework construction module, a completion and optimization module, and a prompt optimization module;
[0117] The Prompt framework construction module is responsible for constructing the Prompt overall framework according to the functional and performance requirements of the project, and subdividing the Prompt overall framework into four parts: roles, requirements, standards, and results;
[0118] Among them, roles are used to define the identity and capabilities of the large language model when performing tasks, requirements are used to clearly explain the problems or tasks to be solved, standards are used to put forward specific requirements and restrictions on output results, and results are used to clarify the specific goals and expected results of the tasks;
[0119] The completion and optimization module is responsible for completing and optimizing the Prompt framework content for the four parts of roles, requirements, standards, and results, and adding more detailed information capability descriptions;
[0120] The completion and optimization module completes and optimizes the Prompt framework content. The implementation steps are as follows:
[0121] Step S2.1, in the role section, customize and clearly set the role played by the large language model, and list in detail the professional and technical skills possessed by the role, which will serve as a reference for the ability of the large language model to perform tasks;
[0122] Step S2.2: In the requirements section, describe in detail the task or problem that needs to be solved by the large language model, including the task background, goals, constraints, and key points;
[0123] Step S2.3, in the standard part, customize and clearly specify the standards and requirements for the output results of the large language model, including code running environment requirements, output format requirements, and unified content architecture requirements;
[0124] In step S2.3, programming language characteristics, data structures and algorithm logic are introduced to transform abstract standards into specific executable requirements.
[0125] Step S2.4: In the results section, customize the evaluation criteria and verification methods for the output results;
[0126] Conduct quality assessment and effect verification of output results according to project requirements;
[0127] The prompt optimization module is responsible for optimizing the generated prompts. It continuously adjusts and improves the content based on the output feedback of the large language model until the quality assessment index and effect verification index reach the custom threshold to meet project requirements.
[0128] The Prompt optimization module optimizes, adjusts and improves the generated Prompt, and the implementation steps are as follows:
[0129] Step S3.1, based on the output feedback of the large language model, preliminarily evaluate the accuracy and completeness of the results;
[0130] Step S3.2: Optimize Prompt based on the problems and deficiencies identified in the preliminary evaluation and user needs;
[0131] Step S3.3, verify the optimized Prompt again, generate output results, and perform quality assessment and effect verification on the results;
[0132] Step S3.4: Repeat steps S3.1 to S3.3 until both the quality assessment index and the effect verification index reach the custom threshold to meet project requirements.
[0133] Information about the professional and technical skills required for the role can be obtained through search engines or recruitment websites.
[0134] The Prompt optimization module optimizes the generated Prompt, and the optimization methods include the following three:
[0135] (1) Compound prompts to add tasks or requirements so that a single prompt contains multiple tasks or requirements to solve the problem more efficiently;
[0136] (2) Iterate the prompt to adjust the question statement;
[0137] (3) Context Prompt to provide context information.
[0138] The device for generating prompts based on low-code programming of a large language model includes a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the above-mentioned method steps when executing the computer program.
[0139] The readable storage medium stores a computer program, and when the computer program is executed by a processor, the above method steps are implemented.
[0140] This method of generating prompts based on low-code programming with a large language model cleverly combines large language model technology with customized prompt generation strategies, achieving fast and efficient integrated generation of codes and solutions.
[0141] Compared with the traditional technology that relies on a single large language model to generate code, this method of generating prompts based on low-code programming with a large language model can not only output structured and stable code, but also assist in the simultaneous generation of comprehensive documents for design, annotations, and test cases. This not only greatly enriches the dimensions of programming output, but also significantly shortens the overall cycle of the project from requirements analysis to test release. Through the deep understanding ability of the large language model and the customized prompt design, this method ensures the intelligent and personalized generation of code and solutions. It is widely applicable to multiple fields such as software development, data analysis, and system maintenance, and demonstrates extremely high practical value and flexibility.
[0142] The embodiment described above is only one specific implementation of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating prompts based on low-code programming of a large language model, characterized in that: The following steps are involved: Step S1, construct the overall framework of Prompt according to the functional requirements and performance requirements of the project, and subdivide the overall framework of Prompt into four parts: roles, requirements, standards and results; Among them, roles are used to define the identity and capabilities of the large language model when performing tasks, requirements are used to clearly explain the problems or tasks to be solved, standards are used to put forward specific requirements and restrictions on output results, and results are used to clarify the specific goals and expected results of the tasks; Step S2: For the four parts of roles, requirements, standards, and results, complete and optimize the Prompt framework content and add more detailed information capability descriptions. The implementation steps are as follows: Step S2.1, in the role section, customize and clearly set the role played by the large language model, and list in detail the professional and technical skills possessed by the role, which will serve as a reference for the ability of the large language model to perform tasks; Step S2.2: In the requirements section, describe in detail the task or problem that needs to be solved by the large language model, including the task background, goals, constraints, and key points; Step S2.3, in the standard part, customize and clearly specify the standards and requirements for the output results of the large language model, including code running environment requirements, output format requirements, and unified content architecture requirements; Step S2.4: In the results section, customize the evaluation criteria and verification methods for the output results; Conduct quality assessment and effect verification of output results according to project requirements; Step S3: Optimize the generated prompt, and continuously adjust and improve the content according to the output feedback of the large language model until the quality assessment index and effect verification index reach the custom threshold to meet the project requirements.
2. The method for generating prompts based on low-code programming of a large language model according to claim 1 is characterized in that: In step S2.3, programming language characteristics, data structures and algorithm logic are introduced to transform abstract standards into specific executable requirements.
3. The method for generating prompts based on low-code programming of a large language model according to claim 1 is characterized in that: In step S3, the implementation steps are as follows: Step S3.1, based on the output feedback of the large language model, preliminarily evaluate the accuracy and completeness of the results; Step S3.2: Optimize Prompt based on the problems and deficiencies identified in the preliminary evaluation and user needs; Step S3.3, verify the optimized Prompt again, generate output results, and perform quality assessment and effect verification on the results; Step S3.4: Repeat steps S3.1 to S3.3 until both the quality assessment index and the effect verification index reach the custom threshold to meet project requirements.
4. The method for generating prompts based on low-code programming with a large language model according to claim 1 or 3, characterized in that: In step S3, the generated Prompt is optimized, and the optimization methods include the following three: (1) Compound prompts to add tasks or requirements so that a single prompt contains multiple tasks or requirements; (2) Iterate the prompt to adjust the question statement; (3) Context Prompt to provide context information.
5. A device for generating prompts based on low-code programming of a large language model, characterized in that: Includes Prompt framework construction module, completion and optimization module, and Prompt optimization module; The Prompt framework construction module is responsible for constructing the Prompt overall framework according to the functional and performance requirements of the project, and subdividing the Prompt overall framework into four parts: roles, requirements, standards, and results; Among them, roles are used to define the identity and capabilities of the large language model when performing tasks, requirements are used to clearly explain the problems or tasks to be solved, standards are used to put forward specific requirements and restrictions on output results, and results are used to clarify the specific goals and expected results of the tasks; The completion and optimization module is responsible for completing and optimizing the Prompt framework content for the four parts of roles, requirements, standards, and results, and adding more detailed information capability descriptions; The completion and optimization module completes and optimizes the Prompt framework content. The implementation steps are as follows: Step S2.1, in the role section, customize and clearly set the role played by the large language model, and list in detail the professional and technical skills possessed by the role, which will serve as a reference for the ability of the large language model to perform tasks; Step S2.2: In the requirements section, describe in detail the task or problem that needs to be solved by the large language model, including the task background, goals, constraints, and key points; Step S2.3, in the standard part, customize and clearly specify the standards and requirements for the output results of the large language model, including code running environment requirements, output format requirements, and unified content architecture requirements; Step S2.4: In the results section, customize the evaluation criteria and verification methods for the output results; perform quality assessment and effect verification on the output results according to project requirements; The prompt optimization module is responsible for optimizing the generated prompts. It continuously adjusts and improves the content based on the output feedback of the large language model until the quality assessment index and effect verification index reach the custom threshold to meet project requirements.
6. The device for generating prompts based on low-code programming of a large language model according to claim 5, characterized in that: In step S2.3, programming language characteristics, data structures and algorithm logic are introduced to transform abstract standards into specific executable requirements.
7. The device for generating prompts based on low-code programming of a large language model according to claim 5, characterized in that: The Prompt optimization module optimizes, adjusts and improves the generated Prompt, and the implementation steps are as follows: Step S3.1, based on the output feedback of the large language model, preliminarily evaluate the accuracy and completeness of the results; Step S3.2: Optimize Prompt based on the problems and deficiencies identified in the preliminary evaluation and user needs; Step S3.3, verify the optimized Prompt again, generate output results, and perform quality assessment and effect verification on the results; Step S3.4: Repeat steps S3.1 to S3.3 until both the quality assessment index and the effect verification index reach the custom threshold to meet project requirements.
8. The device for generating prompts based on low-code programming with a large language model according to claim 5 or 7, characterized in that: The Prompt optimization module optimizes the generated Prompt. The optimization method Including the following three types: (1) Compound prompts to add tasks or requirements so that a single prompt contains multiple tasks or requirements; (2) Iterate the prompt to adjust the question statement; (3) Context Prompt to provide context information.
9. A device for generating prompts based on low-code programming of a large language model, characterized in that: The method comprises a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the method according to any one of claims 1 to 4 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Knowledge-driven big language model reasoning method and device, equipment and medium
CN118333169A
Text2SQL semantic parsing method for domain large language model
CN118377796A
Bidirectional intelligent question and answer code supplementing method and system based on large language model
CN118426825A
Software test code generation method and device, related equipment and computer program product
CN118733472A
Training dynamic hybrid ai networks
WO2024158853A1
Cited By
Device for controlling results of model questions and answers through role definition
CN120804273A
DeepSeek-based role large model fine tuning corpus automatic generation method
CN120849555A