Prompt Snippets

Snippets lets you add predefined and reusable text to prompts.

Prompt snippets are saved text to be used within your prompts. This is useful for text that you want to appear within multiple prompts. Furthermore, this lets you edit one snippet to update multiple prompts at the same time.

Creating a Prompt Snippet

Head to Prompt Library then Select Create > Snippet. You are then asked to fill in a key that will be used to reference your snippet. You can then configure your snippet, defining its language, and using tags to classify its use case.

Creating a self-checking snippet that can be added to most prompts to reduce hallucinations.

Creating a self-checking snippet that can be added to most prompts to reduce hallucinations.

Using Prompt Snippets

To reference a snippet, use {{snippet.snippet_name}} within your prompt, you will see snippets correctly loaded if they are shown in blue within your prompt. At generation time, snippets will be replaced by the previously entered configuration.

Using the previously created snippet to enrich a configured prompt.

Using the previously created snippet to enrich a configured prompt.


Updating Prompt Snippets

Prompt Snippets are fully version-controlled, making it easier to track changes and correct mistakes, especially in collaborative environments. Be aware that updates to snippets will automatically apply to all Deployments using them, so ensure any changes are intentional and properly tested.