Lesson 12 / 25
Basic LLM Chain and Prompts
Send a single prompt to a model with the Basic LLM Chain and build the prompt from workflow data.
One prompt in, one answer out
The Basic LLM Chain node sends one prompt to a chat model sub-node (for example OpenAI or Anthropic) and returns the text. It has no tools and no loop, so it is the right choice for tasks like summarising, rewriting or classifying. Build the prompt with expressions so each item's data is inserted, and keep the instructions in the system message.
Model, memory, tools
AI nodes plug together: a chat model provides reasoning, memory keeps context, and tools let it act.
A prompt built from item data
The system message states the rules; the user message injects the email text. Delimiters make it clear which part is data.
System:
You summarise customer emails in two sentences. Reply with the summary only.
User:
Email subject: {{ $json.subject }}
<email>
{{ $json.body }}
</email>Use a small model for easy work
Summaries and simple classification rarely need the largest model. Start with a smaller, cheaper one and upgrade only if quality is not enough on real examples.
Quick check: When is a Basic LLM Chain a better fit than an AI Agent?
- When many tools must be chosen dynamically
- When the task is one prompt and needs no tools
- When you want an endless loop
- Never
Answer
When the task is one prompt and needs no tools — A single prompt step is cheaper and more predictable than an agent loop.