Method for generating prompt based on large language model low code programming

By constructing and optimizing the Prompt framework for large language models, the problems of inconsistent code generation formats and poor functional integrity are solved, and efficient and standardized code generation is achieved, which is suitable for fields such as software development and scientific research.

CN119847497BActive Publication Date: 2025-10-10SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411775897.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-10-10
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Large language models have problems with inconsistent formats and poor functional integrity in the code generation field, resulting in a lack of consistency and readability in code generation, which increases the debugging difficulty for R&D personnel.

Method used

Prompts are generated by constructing low-code programming based on a large language model, which is divided into four parts: roles, requirements, standards, and results. Task requirements and standards are described in detail, and the Prompt content is optimized to meet project needs. Composite, iterative, and contextual Prompt strategies are adopted until the quality and effect verification thresholds are reached.

Benefits of technology

It achieves the standardization and integrity of code generation, improves the readability and maintainability of the code, shortens the project cycle, and is suitable for fields such as software development and scientific research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847497B_ABST
    Figure CN119847497B_ABST
Patent Text Reader

Abstract

The application particularly relates to a method for generating a prompt based on a large language model low-code programming. The method for generating the prompt based on the large language model low-code programming constructs a prompt overall framework according to a functional requirement and a performance requirement of a project, subdivides the prompt overall framework into four parts of roles, requirements, standards and results, completes and optimizes content of the prompt framework, adds more detailed information capability description, optimizes the generated prompt, continuously adjusts and perfects content according to feedback of an output result of the large language model until a quality evaluation index and an effect verification index both reach a self-defined threshold to meet the project requirement. The method for generating the prompt based on the large language model low-code programming realizes intelligentization and high efficiency of programming and document generation, is high in flexibility, greatly enriches dimensions of programming output, shortens an overall cycle of a project from requirement analysis to test release, and has extremely high practical value.
Need to check novelty before this filing date? Find Prior Art

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 Models (LLMs) are a class of advanced AI models in the field of deep learning. They possess hundreds of billions or more parameters and are trained on massive amounts of text data. These models are not only capable of generating and understanding natural language text but are also adept at performing diverse natural language processing tasks such as translation and sentiment analysis. LLMs have demonstrated widespread application value in a variety of scenarios, including text writing, question-and-answer systems, and conversational interactions. Their potential and capabilities are evident in applications ranging from automated customer service to advanced scientific research.

[0003] Similarly, large language models also have some shortcomings and limitations in the field of code generation programming:

[0004] (1) Code generation formats are varied 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 requirements, including different versions and tool libraries suitable for different operating environments. This greatly weakens the practical 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 results in the code being unclear in conveying key information and data, affecting the overall readability and maintainability.

[0006] Prompt construction engineering is a natural language processing technology that uses carefully designed input prompts (i.e., prompts) to guide language models to generate text that meets specific requirements or styles. It leverages the model's ability to understand context to achieve more accurate and controllable text generation, and is widely used in question-answering systems, text creation, and other fields.

[0007] In order to solve the problems of inconsistent formats 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] The present application provides a simple and efficient method for generating Prompt based on large language model low-code programming to make up for the defects of the prior art.

[0009] The present application is realized by the following technical solutions:

[0010] A method for generating Prompt based on large language model low-code programming, comprising the following steps:

[0011] Step S1, according to the functional requirements and performance requirements of the project, the overall framework of Prompt is constructed, and the overall framework of Prompt is divided into four parts of role, requirement, standard and result;

[0012] Among them, the role is used to define the identity and ability of the large language model when executing the task, the requirement is used to clearly describe the problem or task to be solved, the standard is used to propose specific requirements and restrictions on the output result, and the result is used to clearly define the specific target and expected result of the task;

[0013] Step S2, for the four parts of role, requirement, standard and result, respectively complete and optimize the content of Prompt framework, and add more detailed information ability description;

[0014] In the step S2, the implementation steps are as follows:

[0015] Step S2.1, in the role part, the role played by the large language model is self-defined and set, and the professional technical skills possessed by the role are listed in detail, which are used as the ability reference of the large language model when executing the task;

[0016] Step S2.2, in the requirement part, the task or problem to be solved by the large language model is described in detail, including task background, target, constraint condition and key point;

[0017] Step S2.3, in the standard part, the standard and requirement of the output result of the large language model are self-defined and specified, including code running environment requirement, output format requirement, content architecture requirement;

[0018] In the step S2.3, the programming language characteristics, data structure and algorithm logic are introduced to convert the abstract standard into specific executable requirement.

[0019] Step S2.4, in the result part, the evaluation standard and verification method of the output result are self-defined and set;

[0020] According to the project requirements, the quality evaluation and effect verification of the output result are carried out;

[0021] Step S3: Optimize the generated prompt and continuously adjust and improve 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 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: Based on the problems and deficiencies identified in the preliminary assessment, optimize Prompt according to 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 problems more efficiently;

[0029] (2) Iterate 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 responses.

[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 based on the project's functional and performance requirements, 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 propose 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: 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, define the role played by the large language model and list the professional and technical skills of the role in detail. This will serve as a reference for the large language model's ability to perform tasks.

[0037] Step S2.2: In the requirements section, describe 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 section, 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 structure 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. Based on the output feedback of the large language model, it continuously adjusts and improves the content 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. 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: Based on the problems and deficiencies identified in the preliminary assessment, optimize Prompt according to 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. 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 problems more efficiently;

[0050] (2) Iterate 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 computer programs, 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 following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.

[0056] Attachment 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] Attachment Figure 2 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 of 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 embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.

[0059] Prompt is an AI-powered instructional technology that guides the output of language models through explicit and specific guidance. By asking questions, Prompt enables language models to clearly understand requirements, standards, goals, and expected outcomes. Based on this fundamental concept, the structured Prompt framework is designed to standardize the output of large-scale language models, ensuring they produce 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 Prompt framework based on the functional and performance requirements of the project, and subdivide the overall Prompt framework 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 propose 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 Prompt framework 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. Instead, they can leverage the underlying capabilities by introducing roles.

[0065] Requirements: These are the most directly relevant parts of the task. They must clearly describe what the user wants the large model to do so that it can produce the most accurate output. In addition to a clear and unambiguous description, task decomposition is particularly important for complex tasks.

[0066] Standards: These 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 results that users expect 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 range

[0070] a) Role: Software Development Engineer

[0071] b) Requirement: For any integer interval with upper and lower limits input, output the number of prime numbers in the interval.

[0072] c) Standard: Generate Java code based on requirements. The operating environment is Java 8. The code content should contain detailed comments. Each comment should be 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 an arbitrary integer interval

[0080] a) Role: Test Engineer

[0081] b) Requirement: Generate unit test cases for the function of inputting the upper and lower limits of an arbitrary integer range and outputting the number of prime numbers in the range.

[0082] c) Standard: 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: Complete and optimize the Prompt framework content for the four parts: roles, requirements, standards, and results, and add more detailed information capability descriptions;

[0085] In step S2, the implementation steps are as follows:

[0086] Step S2.1, in the role part, customize the role played by the large language model, such as including solution architects, software development engineers and test engineers, etc. And list the professional technical skills possessed by the role in detail, which is the ability reference when the large language model executes the task;

[0087] Step S2.2, in the requirement part, specifically describe the task or problem that needs to be solved by the large language model, including task background, target, constraint condition and key point;

[0088] Step S2.3, in the standard part, customize and specify the standards and requirements of the output results of the large language model, including code running environment requirements, output format requirements, content architecture requirements;

[0089] In the step S2.3, the programming language characteristics, data structure and algorithm logic are introduced to convert the abstract standard into specific executable requirements.

[0090] Step S2.4, in the result part, customize and set the evaluation standard and verification method of the output result;

[0091] According to the project requirements, the quality evaluation and effect verification of the output result are carried out;

[0092] Specifically, the following template can be used to supplement "role information":

[0093] Now you are an excellent {{role identity noun}} with {{basic technical skill level}} and {{knowledge category}}, your work content is {{work content related to demand}} and you have the following abilities {{supplementary ability}}.

[0094] Specifically, "demand" is the most information-intensive part of Prompt, and it is also the most relevant part of the task. The decomposition of complex tasks is often very effective in supplementing information to the "demand" part, which not only improves the reasoning ability of the large model, but also makes the output of the large model more in line with the requirements of the user. With the help of the idea of Planning in Agent, let the large model help to split a complex task. The following template can be used:

[0095] "What steps do you need to do the task, how to split / think about it?"

[0096] Specifically, the information supplement of "standard" focuses on putting the standard at the end of Prompt. The essence of large language model is text completion, and the output of the latter text will be more inclined to the context closer to it. The algorithm analysis of "LIME" model explains that the weight between the texts closer to each other is often larger, which can be clearly shown in the Attention weight of Transofrmer model.

[0097] Step S3: Optimize the generated prompt and continuously adjust and improve 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 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: Based on the problems and deficiencies identified in the preliminary assessment, optimize Prompt according to 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 on 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 problems more efficiently;

[0106] For example, when building a method to find the number of prime numbers in an arbitrary integer range, you can design the following compound prompt:

[0107] Please provide a Java method that can accept user input data and then calculate the number of prime numbers in a range based on this data. Ensure that this method has user data validation function.

[0108] (2) Iterate Prompt to adjust the question statement;

[0109] When the initial Prompt result does not meet expectations, you can improve the result by iteratively optimizing 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 previously discovered errors.

[0112] (3) Contextual Prompt to provide contextual information. In complex tasks, providing contextual information can significantly enhance the quality of AI responses.

[0113] For example, the above functional requirements should include the following code details:

[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 based on 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 based on the project's functional and performance requirements, 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 propose 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: 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, define the role played by the large language model and list the professional and technical skills of the role in detail. This will serve as a reference for the large language model's ability to perform tasks.

[0122] Step S2.2: In the requirements section, describe 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 section, 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 structure 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. Based on the output feedback of the large language model, it continuously adjusts and improves the content 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. 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: Based on the problems and deficiencies identified in the preliminary assessment, optimize Prompt according to 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 on 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. 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 problems more efficiently;

[0136] (2) Iterate 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, which implements the above method steps when executed by a processor.

[0140] This method of generating prompts based on low-code programming of large language models cleverly combines large language model technology with customized prompt generation strategies, realizing fast and efficient integrated generation of code and solutions.

[0141] Compared to traditional code generation techniques that rely on a single large language model, this method for generating prompts through low-code programming based on a large language model not only outputs structured and stable code, but also assists in the simultaneous generation of comprehensive documentation for designs, annotations, and test cases. This not only greatly enriches the dimensions of programming output but also significantly shortens the overall project cycle from requirements analysis to test release. Through the deep understanding capabilities of a large language model and customized prompt design, this method ensures intelligent and personalized generation of code and solutions. It is widely applicable to multiple fields such as software development, data analysis, and system maintenance, demonstrating 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 by: The following steps are involved: Step S1: Construct the overall Prompt framework based on the functional and performance requirements of the project, and subdivide the overall Prompt 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 propose specific requirements and restrictions on output results, and results are used to clarify the specific goals and expected results of the tasks; Step S2: Complete and optimize the Prompt framework content for the four parts: roles, requirements, standards, and results, and add more detailed information capability descriptions. The implementation steps are as follows: Step S2.1: In the Role section, define the role played by the large language model and list the professional and technical skills of the role in detail. This will serve as a reference for the large language model's ability to perform tasks. Step S2.2: In the requirements section, describe 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 section, 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 structure 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 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 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: Based on the problems and deficiencies identified in the preliminary assessment, optimize Prompt according to 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 of 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 Prompt to adjust the question statement; (3) Context Prompt to provide context information.

5. A device for generating prompts based on low-code programming using a large language model, characterized by: 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 based on the project's functional and performance requirements, 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 propose 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: 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, define the role played by the large language model and list the professional and technical skills of the role in detail. This will serve as a reference for the large language model's ability to perform tasks. Step S2.2: In the requirements section, describe 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 section, 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 structure 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. Based on the output feedback of the large language model, it continuously adjusts and improves the content 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 using 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 using a large language model according to claim 5, characterized in that: The Prompt optimization module optimizes, adjusts and improves the generated Prompt. 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: Based on the problems and deficiencies identified in the preliminary assessment, optimize Prompt according to 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 using 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 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 by: 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

  • 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