Workflow or AI Agent? The 5-Question Test I Use Before Adding an LLM Node
说明与用途
五个问题的测试帮助决定在 n8n 中使用普通工作流、单个 LLM 步骤还是完整 AI 代理。结果是一个固定流程,包含一个结构化 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