Node Input

  • role (string): Defines the role for which the node will generate a prompt. It can be provided as a single string or a list of strings.

Node Output

  • prompt (string): A prompt generated based on the role is returned as a string.

Functionality

The PromptGenerator node generates prompts for a language model based on the given role. This node creates appropriate system prompts based on the role, assisting the language model to perform the given task effectively.

When to use?

This node is useful when a prompt is needed for a language model to perform a specific role or task. For example, it can be used when generating a prompt for a language model to act as a translator. The node provides a tailored prompt based on the user-defined role, ensuring that the model receives clear and specific instructions.

The PromptGenerator node can enhance the performance of the language model by generating prompts suited to various roles.