{"slug": "pipeline-flow-or-chain-picking-the-right-tool-to-wire-llm-calls-together", "title": "Pipeline, Flow, or Chain? Picking the Right Tool to Wire LLM Calls Together", "summary": "A developer building LLM workflows argues that choosing between chaining libraries and general orchestrators depends on whether the problem is LLM glue or reliable execution. The developer built PromptKit, a 4D toolkit for chaining prompts, to explore trade-offs like state management and failure handling. The post advises naming workflows honestly—chain, pipeline, flow, or agent—based on how much autonomy the system has.", "body_md": "In the [previous post](https://phimage.github.io/blog/agents-as-planners/) I argued that agents are great\n\n*planners* and DAGs are great *executors*. This one is the practical follow-up: when\n\nyou actually sit down to wire several LLM calls together, **what tool do you reach\nfor?**\n\nBecause the moment one prompt's output feeds the next, you've built a workflow —\n\nwhether you call it that or not.\n\n```\ndownload transcript → summarize → translate\n       (tool)          (LLM)       (LLM)\n```\n\nThat tiny pipeline is already the whole problem in miniature: a non-LLM step (fetch a\n\nYouTube transcript), then a model call, then another model call that depends on the\n\nfirst. Run it as one giant prompt and you lose visibility; split it into steps and you\n\ngain debuggability — at the cost of more calls and more state to manage.\n\nHalf the confusion is vocabulary. The same idea ships under a dozen labels:\n\n| Name | What it whispers |\n|---|---|\n| Chain | sequential, output → input |\n| Pipeline | stages, data flowing through |\n| Flow | branches and conditions |\n| Workflow | general orchestration |\n| Agent workflow | the model also decides\n|\n\nThe word sets expectations. \"Chain\" promises a straight line; \"agent workflow\"\n\npromises the thing might re-plan on you mid-run. Pick the label that matches how much\n\nautonomy you're actually handing over — calling a deterministic two-step pipeline an\n\n\"agent\" only invites disappointment.\n\nThere are two families of tools, and they solve different problems.\n\n**LLM-native chaining libraries** — [LangChain](https://www.langchain.com/),\n\n[LlamaIndex Workflows](https://docs.llamaindex.ai/en/stable/module_guides/workflow/),\n\n[Azure Prompt Flow](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/),\n\nor visual layers like [Flowise](https://flowiseai.com/). These understand\n\n*LLM-specific* concerns out of the box: prompt templating, passing context between\n\nsteps, token budgets, streaming, retries on a flaky model.\n\n**General orchestrators** — [Airflow](https://airflow.apache.org/),\n\n[Prefect](https://www.prefect.io/), [AWS Step Functions](https://aws.amazon.com/step-functions/),\n\n[Azure Logic Apps](https://azure.microsoft.com/en-us/products/logic-apps). These treat\n\neach LLM call as just another task in a DAG, and give you the heavyweight reliability\n\nmachinery: durable state, scheduling, checkpointing, audit trails, human approval.\n\nThe rule of thumb that falls out of the last post:\n\n```\nFew prompts, mostly LLM glue   → chaining library\nMany steps, must not fail      → orchestrator (LLM call = one task)\nThe model decides the path     → agent, with one of the above underneath\n```\n\nDon't reach for a framework reflexively. If the task is genuinely simple, **one\nwell-crafted prompt** (few-shot or chain-of-thought) often beats a three-step pipeline\n\nTo get a feel for the moving parts I built [PromptKit](https://github.com/mesopelagique/PromptKit),\n\na small 4D toolkit where a chain is just named prompts piped together — the YouTube\n\nexample above, minus the download step:\n\n```\nvar $result:=$runner.newChain().prompt(\"summarize\").prompt(\"translate\").run($transcript)\n\n// $result.text     -> final translated summary\n// $result.outputs  -> each step's output, for inspection\n```\n\nNothing exotic — but writing it made the trade-offs tangible: where state lives, what\n\nhappens when step two fails, how you'd add a branch. Which is really the point. You\n\ndon't pick the tool by reading the marketing; you pick it by knowing whether your\n\nproblem is *LLM glue* or *reliable execution* — and most of the time, it's a bit of\n\nboth.\n\nMy take: \"chain vs. workflow vs. agent\" is less an architecture question than an\n\nhonesty question — how deterministic is your process, really? Name it accordingly,\n\nthen pick the lightest tool that survives the day you actually need a retry.", "url": "https://wpnews.pro/news/pipeline-flow-or-chain-picking-the-right-tool-to-wire-llm-calls-together", "canonical_source": "https://dev.to/phimage/pipeline-flow-or-chain-picking-the-right-tool-to-wire-llm-calls-together-46k5", "published_at": "2026-07-11 09:44:51+00:00", "updated_at": "2026-07-11 10:14:01.819670+00:00", "lang": "en", "topics": ["large-language-models", "developer-tools", "ai-agents", "mlops"], "entities": ["LangChain", "LlamaIndex", "Azure Prompt Flow", "Flowise", "Airflow", "Prefect", "AWS Step Functions", "PromptKit"], "alternates": {"html": "https://wpnews.pro/news/pipeline-flow-or-chain-picking-the-right-tool-to-wire-llm-calls-together", "markdown": "https://wpnews.pro/news/pipeline-flow-or-chain-picking-the-right-tool-to-wire-llm-calls-together.md", "text": "https://wpnews.pro/news/pipeline-flow-or-chain-picking-the-right-tool-to-wire-llm-calls-together.txt", "jsonld": "https://wpnews.pro/news/pipeline-flow-or-chain-picking-the-right-tool-to-wire-llm-calls-together.jsonld"}}