---
title: Basic LLM Chain
description: 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

## 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](/nodes/builtin/ai/aidependencies/llm/openai/), [Anthropic](/nodes/builtin/ai/aidependencies/llm/anthropic/), [Ollama](/nodes/builtin/ai/aidependencies/llm/ollama/) or an on-device [Web LLM](/nodes/builtin/ai/aidependencies/llm/wbellm/) model. Optionally connect an output parser to get structured data back instead of plain text.

## 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](/nodes/builtin/ai/aidependencies/outputparser/structuredoutputparser/) attached.

When the model must call tools or take actions, use [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/). To answer from your own documents, use [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/) or [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/).

## Inputs and settings

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

Each output item has these fields:

```json title="Shape of an output item"
{
  "response": null
}
```

`response` is the model's reply: text, or the structured data your output parser produced.

## Dependencies and credentials

The node has no credential of its own. The connected model holds the API key or connection.

## Example workflow

1. [Get Selected Text](/nodes/extension/getselectedtext/) reads what you highlighted, with **Output field name** `text`.
2. Basic LLM Chain with **Prompt** `Explain this in plain words: {{ $input.text }}`, and an [OpenAI](/nodes/builtin/ai/aidependencies/llm/openai/) model connected to **Model**.
3. [Display Markdown](/nodes/extension/displaymarkdown/) shows `{{ $input.response }}`.

## 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](/nodes/builtin/ai/aidependencies/outputparser/structuredoutputparser/), or ask for the format in the **System message**.

## Recipes with this node

## Related nodes

* [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/): a model that can call tools.
* [Information Extractor](/nodes/builtin/ai/aiagents/informationextractornode/): pull named fields out of text.
* [Summarization](/nodes/builtin/ai/aiagents/summarizationchainnode/): summarise long text.
* [Chrome AI](/nodes/builtin/ai/aidependencies/llm/chrome-ai/): a prompt to Chrome's built-in model, no model node needed.