Workflow or AI Agent? The 5-Question Test I Use Before Adding an LLM Node
Описание и применение
Проверка пяти вопросов помогает определить, использовать ли в n8n простую цепочку, один шаг LLM или полноценного агента. Результат – фиксированный поток с одним LLM‑запросом, парсером и правилами IF/Switch.
Задача
Deciding whether to use a plain workflow, a single LLM step, or an AI agent in n8n automations.
Результат
Using the five‑question test consistently produces deterministic workflows with a single LLM step, avoiding the risks of full AI agents while still leveraging LLMs for parsing messy text.
Рабочий процесс
- 1. Trigger (Webhook or Schedule)
- 2. Config (Code node) – set baseUrl and model
- 3. Build Prompt (Code node) – strict system prompt with JSON schema
- 4. LLM (HTTP Request) – POST to chat/completions with response_format json_object and low temperature
- 5. Parse (Code node) – extract JSON, validate, handle errors
- 6. Decide (IF/Switch) – deterministic rules on parsed fields
Доказательства
Every one of my workflows ends the LLM step with the same small Parse node: …
If I can describe the decision as a rule a new hire could follow without judgment, it doesn't need a model.
Models are good at turning unstructured text into structured fields: a review into sentiment plus topics, a meeting transcript into decisions and owners, a PDF invoice into vendor, totals and line items.
- Дата записи: 2026-10-15T13:41:33.850Z