A simple plugin template
There are two simple ways of creating prompt templates.
The first is to generate the prompt from a string variable inside your code. This way is simple and convenient. We covered this method in the Running a simple prompt section of Chapter 1.
The second is to use Semantic Kernel to help separate the development function from the prompt engineering function. As you saw in Chapter 1, you can create your requests to LLMs as functions in plugins. A plugin is a directory that contains multiple sub-directories, one per function. Each subdirectory will have exactly two files:
- A text file called
skprompt.txt
that contains the prompt - A configuration file called
config.json
that contains the parameters that will be used in the API call
Since the prompt is maintained separately from the code, you, as an application developer, can focus on the code of your application and let a specialized prompt engineer work on the skprompt.txt
files.
In...