Skip to main content
工作流应用

Large Language Model (LLM) Node

The Large Language Model (LLM) node enables calling large language models within workflows. By configuring prompts and model parameters, it generates text responses based on input data. It supports both single-item processing and batch processing modes—ideal for content generation, multi-turn conversations, and similar use cases.

Adding the Node

Method 1: Add via the Plus (+) Button

  • Click the plus (+) button at the end of any existing node on the canvas.
  • Select the LLM node from the pop-up node list.
  • The node is automatically added to the canvas and connected to the upstream node.

Method 2: Drag-and-Drop

  • Locate the LLM node in the left-hand node library.
  • Drag it onto the desired position on the canvas.
  • Manually connect it to an upstream node (drag the output port of the upstream node to the input port of the LLM node).

Core Configuration

Processing Mode

The LLM node supports two execution modes:
ModeDescription
Single-Item Processing ModeThe node runs once, processes a single input, and returns a single result. Supports memory, failure retries, and exception handling.
Batch Processing ModeThe node runs multiple times, sequentially processing each element in an array as defined by the batch variable. Does not support memory, failure retries, or exception handling.
Additional parameters required in Batch Processing Mode:
ParameterRangeDefaultDescription
Max Batch Count1–10050Maximum number of batch executions. Actual count equals the smaller of the input array length and this limit.
Parallel Execution Count1–105Number of concurrent batch executions. Setting to 1 enforces serial execution.
Batch VariableConfigures the variable to be batch-processed—including its name, reference method, and value.

Model Configuration

Model Selection

Select a large language model (e.g., Qwen series) from the model dropdown. If your target model isn’t listed, click More Models to open the model selection dialog and search for and select it.

Model Parameters

Click the configuration icon (⚙️) next to the model selector. After enabling the parameter panel, configure the following:
ParameterDefaultDescription
Max Output Length1024Maximum number of tokens in the model’s output.
top_p0.80Controls output diversity—higher values yield more varied outputs.
temperature0.70Controls output randomness—higher values yield more stochastic outputs.
enable_thinkingEnabledEnables deep reasoning mode; outputs step-by-step reasoning traces.
thinking_budget4000Maximum number of tokens allowed for reasoning chain output (in thinking mode).
result_formatmessageFormat of returned result.
enable_searchDisabledEnables web search capability.

Prompt Configuration

Prompt TypeDescription
System PromptDefines the model’s role and behavioral guidelines. Example: “You are a professional Q&A assistant. Your answers must be professional, concise, and directly address the question. If you don’t know the answer, respond with ‘I don’t know.’”
User PromptContains user-provided input passed to the model. Supports variable references via ${node_name/variable_name}. Example: “Answer the user’s question: ${Start/query}” (where ${Start/query} references the built-in query variable from the Start node).
Inserting Variables: In the prompt editor, type / to trigger the variable selector popup. Choose output variables from upstream nodes. Syntax: ${node_name/variable_name}, e.g., ${Start/query}.

Memory

Enabled by default. When enabled, the model retains conversation history—supporting multi-turn dialogue scenarios.
Cache TypeDescription
Node-Level CacheThe model remembers only the dialogue history within this node. Configure Memory Rounds (1–50, default: 3), where one round = one input + one output.
Custom CacheThe model retains global context. Requires selecting a context variable (e.g., built-in historyList).

Output Variables

Single-Item Processing Mode:
Output VariableTypeDescription
resultStringText content generated by the model.
reasoningContentStringReasoning trace (output only when thinking mode is enabled).
Batch Processing Mode:
Output VariableTypeDescription
resultArray<String>Array containing results from each batch item.
reasoningContentArray<String>Array containing reasoning traces per batch item.

Retry on Failure

Disabled by default. Automatically retries the node upon timeout or error. When disabled, failures cause immediate workflow errors.
ParameterRangeDefaultDescription
Max Retry Count1–103Maximum number of retries on request failure.
Retry Interval300–10,000 ms500Delay between consecutive retries.

Exception Handling

Disabled by default. Defines behavior when the node fails.
Handling StrategyDescriptionDefault
Return preset default values on failure (requires per-output-variable defaults).Routes execution to an exception branch, allowing downstream nodes to handle the error case.Enabled

Common Integration Patterns

Paired NodeTypical Use Case
Knowledge Base Node → LLM NodeRetrieve from knowledge base, then pass results to the LLM node for RAG-enhanced Q&A.
LLM Node → Conditional NodeBranch logic based on the result output—for example, routing to different business paths.
LLM Node → Workflow Output NodeEmit LLM-generated output mid-workflow to enable streaming-style responses.