In prompt structure, various components come together to create a prompt.
These components include:
To illustrate these elements, consider the following prompt example for a text classification task:
Prompt
Determine the mood of the following statement as either joyful, sorrowful, or indifferent.
Text: The weather today makes me feel gloomy.
Mood:
In the example above, the task description is to "Determine the mood of the following statement as either joyful, sorrowful, or indifferent", which directs the classification process. The input data is "The weather today makes me feel gloomy.", and the output label is indicated by "Mood:".
While this simple illustration doesn't incorporate contextual information, adding such details could enhance the prompt. For example, providing additional mood classification examples within the prompt can assist the model in better grasping the assignment and guiding the expected output type.