> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dume.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM Node

> Use Large Language Model (LLM) nodes to generate dynamic, AI-powered content in your workflows. Complete guide to AI text generation and content automation.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/stackgrid/oY4hBaRY8pxXJFIw/images/light/workflow/sample-nodes/llm.png?fit=max&auto=format&n=oY4hBaRY8pxXJFIw&q=85&s=780852673d82e643a9bd5f5d2753abff" alt="Workflow Dume.ai LLM node" title="Dume.ai Workflow LLM node" width="200" data-path="images/light/workflow/sample-nodes/llm.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/stackgrid/MMXhwtNTjHEo285E/images/dark/workflow/sample_nodes/llm.png?fit=max&auto=format&n=MMXhwtNTjHEo285E&q=85&s=f554d5a731c34c278cd7e50ed63c42b2" alt="Workflow Dume.ai LLM node" title="Dume.ai Workflow LLM node" width="200" data-path="images/dark/workflow/sample_nodes/llm.png" />
</Frame>

import { Alert, Card } from './components'; // Example of MDX component import

<Info>
  **Key Feature:** The LLM node's core strength is its ability to use dynamic variables from previous nodes, making your prompts context-aware and highly reusable.
</Info>

The **Large Language Model (LLM) Node** is the powerhouse of your Dume AI workflow, enabling you to integrate advanced AI capabilities for a wide range of tasks. Whether you need to generate creative text, summarize complex information, translate languages, or extract structured data, the LLM node provides a flexible and powerful interface to state-of-the-art AI models.

You can chain multiple LLM nodes together to build sophisticated pipelines, where the output of one node becomes the contextual input for the next, allowing for highly refined and specific results.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/stackgrid/oY4hBaRY8pxXJFIw/images/light/workflow/nodes/llm_node.png?fit=max&auto=format&n=oY4hBaRY8pxXJFIw&q=85&s=b1b61351047fcda6ace6b46eeb87459d" alt="Workflow Dume.ai LLM node" title="Dume.ai Workflow LLM node" width="200" data-path="images/light/workflow/nodes/llm_node.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/stackgrid/F6GDMY5YwnHIovR6/images/dark/workflow/nodes/llm_node.png?fit=max&auto=format&n=F6GDMY5YwnHIovR6&q=85&s=958573660abd3745eaff7fa6a88f5c5e" alt="Workflow Dume.ai LLM node" title="Dume.ai Workflow LLM node" width="200" data-path="images/dark/workflow/nodes/llm_node.png" />
</Frame>

## Configuration Panel

To use the LLM node, you need to configure its properties. The panel is divided into three main sections:

### 1. Model

This dropdown menu allows you to select the AI model that will process your request. Each model may have different strengths, such as proficiency in specific languages, coding ability, or creative writing.

* **Example:** For generating marketing copy, you might select **Dume AI Chat**, which is optimized for conversational and creative text generation.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/stackgrid/oY4hBaRY8pxXJFIw/images/light/workflow/nodes/llm_node/llm_options.png?fit=max&auto=format&n=oY4hBaRY8pxXJFIw&q=85&s=a67ba9f9cc5b56331d44750ce9a4833e" alt="Workflow Dume.ai LLM options" title="Dume.ai Workflow LLM options" width="200" data-path="images/light/workflow/nodes/llm_node/llm_options.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/stackgrid/F6GDMY5YwnHIovR6/images/dark/workflow/nodes/llm_node/llm_options.png?fit=max&auto=format&n=F6GDMY5YwnHIovR6&q=85&s=90a4d766fd4f1fcc05fd2f133d7fcb8f" alt="Workflow Dume.ai LLM options" title="Dume.ai Workflow LLM options" width="200" data-path="images/dark/workflow/nodes/llm_node/llm_options.png" />
</Frame>

### 2. Messages (The Prompt)

This is where you provide the instructions for the AI. A well-crafted prompt is crucial for getting the desired output. You can add one or more messages to simulate a conversation or provide layered context.

**Dynamic Variables:**
The most powerful feature here is the ability to insert data from previous nodes. To reference a variable, use the format `{type NODE_NAME/field_name}`. The node will dynamically substitute this placeholder with the actual data when the workflow runs.

* **Example Prompt:**
  Write body content using tone: tring INPUT tone, goal: string INPUT goal for audience: string INPUT audience\_type

In this example, the prompt pulls the `tone`, `goal`, and `audience_type` from a preceding **Input Node** to generate highly targeted content.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/stackgrid/oY4hBaRY8pxXJFIw/images/light/workflow/nodes/llm_node/llm_input.png?fit=max&auto=format&n=oY4hBaRY8pxXJFIw&q=85&s=81df75440f2c1681bed6d4e22c9a1da5" alt="Workflow Dume.ai LLM input" title="Dume.ai Workflow LLM input" width="200" data-path="images/light/workflow/nodes/llm_node/llm_input.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/stackgrid/F6GDMY5YwnHIovR6/images/dark/workflow/nodes/llm_node/llm_input.png?fit=max&auto=format&n=F6GDMY5YwnHIovR6&q=85&s=a8b1af8762ec27cc35953948dc8026b6" alt="Workflow Dume.ai LLM input" title="Dume.ai Workflow LLM input" width="200" data-path="images/dark/workflow/nodes/llm_node/llm_input.png" />
</Frame>

### 3. Output Schema

This section defines the structure of the data that the LLM node will return. You have two options:

* **Simple Output (Default):** The node returns a single text string in a field named `answer`. This is useful for straightforward text generation.

* **Structured Output:** You can define a specific JSON schema for the output. This is incredibly useful when you need the AI to return data in a predictable format with multiple fields, such as extracting names, dates, and summaries from a block of text.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/stackgrid/oY4hBaRY8pxXJFIw/images/light/workflow/nodes/llm_node/output_schema.png?fit=max&auto=format&n=oY4hBaRY8pxXJFIw&q=85&s=599db74184ff9821fd5e5f7bbcfa6396" alt="Workflow Dume.ai LLM schema" title="Dume.ai Workflow LLM schema" width="200" data-path="images/light/workflow/nodes/llm_node/output_schema.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/stackgrid/MMXhwtNTjHEo285E/images/dark/workflow/nodes/llm_node/output_schema.png?fit=max&auto=format&n=MMXhwtNTjHEo285E&q=85&s=7dd40b8c8b4b164cda44d7c3466407fe" alt="Workflow Dume.ai LLM schema" title="Dume.ai Workflow LLM schema" width="200" data-path="images/dark/workflow/nodes/llm_node/output_schema.png" />
</Frame>

You specify the schema of the output in the JSON format, or get it generated from AI using the **Generate with AI** option at the top.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/stackgrid/oY4hBaRY8pxXJFIw/images/light/workflow/nodes/llm_node/schema_editor.png?fit=max&auto=format&n=oY4hBaRY8pxXJFIw&q=85&s=b5cbceb6b559d0a0cfa4173cbdacdb67" alt="Workflow Dume.ai LLM schema editor" title="Dume.ai Workflow LLM schema editor" width="200" data-path="images/light/workflow/nodes/llm_node/schema_editor.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/stackgrid/MMXhwtNTjHEo285E/images/dark/workflow/nodes/llm_node/schema_editor.png?fit=max&auto=format&n=MMXhwtNTjHEo285E&q=85&s=4af493b79d1a900b842fbe0ee6c883a7" alt="Workflow Dume.ai LLM schema editor" title="Dume.ai Workflow LLM schema editor" width="200" data-path="images/dark/workflow/nodes/llm_node/schema_editor.png" />
</Frame>

## Examples in Practice

Let's explore how to use the LLM node in a real-world content creation workflow. Here we'll use a LinkdIn post generator as an example.

### Example 1: The Hook Generator

The first step in creating engaging content is a strong opening. We can build a dedicated LLM node for this.

<Card title="Hook Generator Node">
  * **Goal:** Generate 2-3 engaging hook lines for a social media post.
  * **Model:** `Dume AI Chat`
  * **Prompt:** `Write 2-3 hook lines for a LinkedIn post on: {string INPUT/post_topic}`
  * **Output:** A single string containing the generated hooks.
</Card>

### Example 2: The Body Content Generator

Once you have a hook, the next step is to write the main body of the post. This node takes multiple inputs to tailor the content precisely.

<Card title="Body Content Generator Node">
  * **Goal:** Generate the main content for a LinkedIn post based on specific parameters.
  * **Model:** `Dume AI Chat`
  * **Prompt:** `Write body content using tone: {string INPUT/tone}, goal: {string INPUT/goal} for audience: {string INPUT/audience_type}`
  * **Output:** A single string containing the generated post body.
</Card>

### Example 3: Hashtag and CTA Suggester

To complete the post, a final LLM node can suggest relevant hashtags and a strong call-to-action (CTA). This node would use the outputs from the previous two.

<Card title="Hashtag & CTA Suggester Node">
  * **Goal:** Suggest relevant hashtags and a compelling CTA for the generated post.
  * **Model:** `Dume AI Chat`
  * **Prompt:** `Based on the following post, suggest 5 relevant hashtags and a strong call-to-action. Post: {string Hook_Generator/answer} {string Body_Content_Generator/answer}`
  * **Output:** A single string with the suggested hashtags and CTA.
</Card>

This chained approach ensures that each part of the content is coherent and builds upon the previous step, resulting in a high-quality, ready-to-publish post.
