# 📝Prompts

#### 1)Chat Prompt Template

The Chat Prompt Template is used to structure prompts using system and human messages for chat-based models.

#### Key Features:

• Role-Based Prompting: Supports system and human messages\
• Structured Input: Separates instructions and user input\
• Dynamic Values: Allows variable placeholders\
• LangChain Hub Support: Import predefined templates

#### Setup Requirements:

1. Add Chat Prompt Template node to the canvas
2. Enter System Message (instructions for model)
3. Enter Human Message (user input format)
4. Configure Format Prompt Values if required
5. Connect to chat model

#### Use Cases:

• Chatbot development\
• Role-based AI conversations

<figure><img src="/files/hMTnTAtdYmvA3uR1Afhw" alt=""><figcaption></figcaption></figure>

#### 2)Few Shot Prompt Template

Prompt template you can build with examples.

#### Key Features:

• Example-Based Learning: Uses input-output examples\
• Better Accuracy: Improves response quality\
• Flexible Formatting: Supports prefix and suffix\
• Custom Separators: Controls example formatting

#### Setup Requirements:

1. Add Few Shot Prompt Template node to the canvas
2. Enter Example Prompt
3. Add Examples (input-output pairs)
4. Define Prefix and Suffix
5. Set Example Separator
6. Select Template Format
7. Connect to model

#### Use Cases:

• Training-like prompting\
• Improving response consistency

<figure><img src="/files/ZBnkK9UqM0k3i1AtvRLw" alt=""><figcaption></figcaption></figure>

#### 3)Prompt Template

Schema to represent a basic prompt for an LLM.

#### Key Features:

• Dynamic Variables: Supports placeholders like {input}\
• Simple Prompting: Easy to configure\
• Reusable Templates: Can be reused across workflows\
• LangChain Hub Support: Import templates

#### Setup Requirements:

1. Add Prompt Template node to the canvas
2. Enter Template (with variables)
3. Configure Format Prompt Values
4. Connect to model

#### Use Cases:

• Basic prompt generation\
• Reusable AI workflows

<figure><img src="/files/QjOUQ7Rw6U2hAPuItnXT" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thub.tech/langchain/prompts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
