Skip to main content

Prompt Customization

The prompt template allows users to create prompts and define variables that provide control over instructing the model.

Docusaurus themed imageDocusaurus themed image

Variables can be used to define instructions, questions, context, inputs, or examples for the model and can be created with any chosen name in curly brackets, e.g., {variable_name}. They act as placeholders for parts of the text that can be easily modified.

Docusaurus themed imageDocusaurus themed image

Once inserted, these variables are immediately recognized as new fields in the prompt component. Here, you can define their values within the component itself or leave a field empty to be adjusted over the chat interface.

Docusaurus themed imageDocusaurus themed image

You can also use documents or output parsers as prompt variables. By plugging them into prompt handles, they’ll disable and feed that input field.

Docusaurus themed imageDocusaurus themed image

With this, users can interact with documents, webpages, or any other type of content directly from the prompt, which allows for seamless integration of external resources with the language model.

If working with an interactive (chat-like) flow, remember to keep one of the input variables empty to behave as the chat input.

Docusaurus themed imageDocusaurus themed image

Hi, how can I help you?