Promptset Basics
While an AI prompt has become popular in the last 2 years to control the output generated from large language models, also commonly called as AI. For bulk code generation for generative software engineering, millions of prompts are created simultaneously. The mechanism for creating the bulk prompts is called promptset.
Folder Structure
The prompts are organized as by the folder in which their generated code file is going to be placed.
File based generation
The promptset is executed for each file in a separate context. That is why the system needs as many GPUs to generate as many files in the project. If the system is not able to find the required number of GPUs, it would distribute the code generation task across timespan.
Multiple Instances For Same File
It may happen that you need to add code in a file than just one type. Although having one type of code in one file is encouraged. But you are free to choose.
Prompt structure:
- Path - Storage location
- Ext
- File Name:
- Prefix
- PostFix
- Extension
- Gen Path
- Phase
- Prompt
- InitCode
File Naming
The file is named using the second part of Path option. You can select Ext or File(using the slider button) for Dynamic or Static file naming. For Ext(dynamic) naming, there are four parameters of which the first one is mandatory and other 3 are optional.
- AAAMP selection is mandatory
- Prefix is optional
- Postfix is optional
- Extension is optional
As the name suggest, Prefix and postfix are added to the selected AAAMP with file extension for final file. For example, if we want to build a NodejS/ExpressJS controller for a user, the files are often named as userController.js. Here we would set the Path as ACTOR, prefix as empty, postfix of “Controller” and extension as “js”. Now all the generator prompts set via Gen path and phase will add their code to this file.
Method Naming with @Function
The individual functions in a file like “userController.js” are often named based on the action and asset. For example if a user has to upload a file, it shall be named like “function fileUpload(…”. Here the same is calculated by the Gen Path where the selections are @Asset & @Action. The same is passed as @Function variable’s value in the generation process. The next section explains the Gen Path in detail.
Next: Gen Path & Phase
Updated: Oct 11, 2024