Skip to main content

Prompts

A prompt serves as the input to a language model, comprising multiple components that can be parameterized using prompt templates.

Prompt templates provide a systematic approach for generating prompts, allowing for reproducible customization through defined input variables.

Parameters​

Inputs​

NameDisplay NameInfo
templateTemplateCreate a prompt template with dynamic variables.

Outputs​

NameDisplay NameInfo
promptPrompt MessageThe built prompt message returned by the build_prompt method.

Langchain Hub Prompt Template​

This component fetches prompts from the Langchain Hub.

When a prompt is loaded, the component generates input fields for custom variables. For example, the default prompt "efriis/my-first-prompt" generates fields for profession and question.

Parameters​

Inputs​

NameDisplay NameInfo
langchain_api_keyYour LangChain API KeyThe LangChain API Key to use.
langchain_hub_promptLangChain Hub PromptThe LangChain Hub prompt to use.

Outputs​

NameDisplay NameInfo
promptBuild PromptThe built prompt message returned by the build_prompt method.

Hi, how can I help you?