节点 / builtin / ai / aiagents
Basic LLM Chain
A simple chain to prompt a LLM and return the response
此内容尚不支持你的语言。
Send a prompt to a chat model and get its answer. The simplest way to use AI in a workflow.
Try it
Section titled “Try it”Explain Like I'm 5:包含 4 个步骤的工作流,从 Right-click a selection 开始,到 Show the explanation 结束。
What it does
Section titled “What it does”Basic LLM Chain sends Prompt to the chat model connected to its Model slot and returns the reply as { response }. There are no tools, no memory and no document lookup: one prompt in, one answer out.
You must connect a chat model, for example OpenAI, Anthropic, Ollama or an on-device Web LLM model. Optionally connect an output parser to get structured data back instead of plain text.
When to use it
Section titled “When to use it”- Rewrite, translate, classify or summarise text from earlier nodes.
- Draft an email, a reply or a title from page data.
- Turn free text into fields, with a Structured Output Parser attached.
When the model must call tools or take actions, use Tools Agent. To answer from your own documents, use RAG Agent or Q&A Agent.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Prompt (必填) | Text | |
| Options | Group | The options for the node. |
| Options › System message | Long text | The system message to use. |
Use expressions in Prompt to include data, for example Write a one-line summary of: {{ $input.text }}. Add a System message under Options to set tone or rules (“Answer in French”, “Reply in under 50 words”).
Outputs
Section titled “Outputs”-
Output
Each output item has these fields:
| Field | 类型 | What it holds |
|---|---|---|
| response | Any | The model reply; the parsed result when an output parser is connected |
{ "response": null}response is the model’s reply: text, or the structured data your output parser produced.
Dependencies and credentials
Section titled “Dependencies and credentials”| Slot | Accepts | Connections |
|---|---|---|
| Model (必填) | chat model | One node. |
| Output Parser | output parser | One node. |
The node has no credential of its own. The connected model holds the API key or connection.
Example workflow
Section titled “Example workflow”- Get Selected Text reads what you highlighted, with Output field name
text. - Basic LLM Chain with Prompt
Explain this in plain words: {{ $input.text }}, and an OpenAI model connected to Model. - Display Markdown shows
{{ $input.response }}.
Common issues
Section titled “Common issues”- “Dependency model is required”. Connect a chat model to the Model slot.
- “Model not found”. The connected model node is not set up: open it and choose a model and its credential.
- The reply is not in the shape you need. Attach a Structured Output Parser, or ask for the format in the System message.
Recipes with this node
Section titled “Recipes with this node”Related nodes
Section titled “Related nodes”- Tools Agent: a model that can call tools.
- Information Extractor: pull named fields out of text.
- Summarization: summarise long text.
- Chrome AI: a prompt to Chrome’s built-in model, no model node needed.