Stop Prompting Claude Like It's 2024
Claude 4.x takes you literally. Here's how to use that to your advantage instead of fighting it.
Agentic AI gets all the attention, but most tasks are better served by a structured pipeline. Here's how to know which one you actually need.
Muunsparks
2026-03-12
The default assumption in 2026 is that agents are the sophisticated choice and pipelines are for people who haven't caught up yet. That assumption is wrong, and it's costing teams weeks of debugging time on systems that never needed to be autonomous in the first place.
Somewhere along the way, "agentic" became a proxy for "advanced." If you're building a pipeline, the implication goes, you're leaving capability on the table. If you're building an agent, you're doing serious AI engineering.
This is backwards. Pipelines are not a stepping stone to agents — they're a different tool for a different job. The engineers shipping the most reliable AI systems in production right now are the ones who reach for a pipeline by default and only escalate to an agent when they have a specific, concrete reason to.
The question isn't "how do I build an agent?" It's "does this task actually need one?"
A pipeline is a fixed sequence of steps. Each step takes an input, does something with it, and passes the result to the next step. The path is defined at build time. The model executes within each step; it doesn't control the sequence.
# Pipeline: fixed path, model executes within steps
def research_pipeline(topic: str) -> str:
raw_results = search_web(topic) # Step 1: always happens
filtered = filter_relevant(raw_results) # Step 2: always happens
summary = summarize(filtered) # Step 3: always happens
report = format_report(summary) # Step 4: always happens
return report
An agent is a loop. The model receives a task, decides which action to take, observes the result, and decides what to do next. The path is determined at runtime by the model's reasoning. You define the available tools and the stopping conditions — the sequence emerges.
# Agent: dynamic path, model controls the sequence
def research_agent(topic: str) -> str:
messages = [{"role": "user", "content": f"Research this topic: {topic}"}]
while not done:
response = model.call(messages, tools=available_tools)
if response.stop_reason == "end_turn":
return response.text # Model decided it's done
# Model chose a tool — execute it, feed result back
tool_result = execute(response.tool_call)
messages.append(tool_result)
The pipeline always takes the same path. The agent takes the path that makes sense given what it finds.
Run your task through these questions in order. Stop at the first one that gives you a definitive answer.
If you can write out every step the task requires before you run it — and those steps don't change based on intermediate results — you have a pipeline task.
"Summarize this document" is a pipeline task. The steps are: read document, chunk if needed, summarize each chunk, combine summaries. You know this before you start.
"Research this company and tell me whether we should partner with them" is an agent task. The steps depend entirely on what you find. A clean company might take three searches. A complex one might require digging through subsidiaries, press coverage, and regulatory filings in an order you can't predict.
If yes → pipeline. If no → continue.
Some tasks have a fixed path with occasional forks. "Process this support ticket: if it's billing, route to billing; if it's technical, route to engineering." Two branches. Trivially handled in a pipeline with an if/else.
As branches multiply, pipelines become unwieldy. A pipeline handling 15 different ticket types with sub-branches for priority, language, and customer tier starts to look like a decision tree with 50 nodes. At that point, the model's ability to reason about which path to take is genuinely useful.
The rough heuristic: fewer than 5-6 meaningful branches, handle it in a pipeline. More than that, consider an agent — but only if the branches are genuinely unpredictable. If you can enumerate all 15 ticket types in advance, you can still build a pipeline; it'll just be a bigger one.
If few branches → pipeline. If many unpredictable branches → continue.
In a pipeline, each step is independent. The output quality of step 3 doesn't change based on what step 2 produced — the step is the same regardless.
In some tasks, the right action genuinely depends on what you found earlier. A research task where you discover that the primary source is unreliable — so you need to find corroborating sources — can't be handled well in a fixed pipeline. The model needs to observe an intermediate result and adjust its plan.
If task quality depends on the model being able to reason about what it found and change its approach accordingly, you need an agent.
If steps are independent → pipeline. If steps depend on prior results → agent.
This question doesn't determine agent vs. pipeline — it determines how much autonomy you can afford to give the system regardless of which architecture you choose.
Agents are inherently less predictable than pipelines. An agent that goes wrong can go wrong in creative, hard-to-anticipate ways. If the task involves irreversible actions — sending messages, writing to databases, making purchases, modifying production systems — the unpredictability of an agent is a serious liability.
High error cost doesn't mean "don't build an agent." It means: build the agent with human checkpoints on irreversible actions, invest heavily in observability, and deploy incrementally. A well-architected agentic workflow with appropriate guardrails can handle high-stakes tasks. An agent thrown together over a weekend cannot.
Some tasks feel like they need agents but don't, once you think them through carefully.
"We need to process 10,000 contracts and extract key terms." This sounds like an agent task — there's variation, the contracts are different, the relevant terms might appear in different places. In practice, it's a pipeline: read document, extract fields using a structured prompt, validate output, write to database. The model executes within the extraction step; it doesn't need to control the sequence.
"Write a blog post: research the topic, outline it, draft it, revise it." Four steps, always in the same order, each one taking the output of the previous. This is a pipeline. The fact that it uses an LLM at each step doesn't make it an agent. An agent would be: "write the best possible blog post on this topic" — no specified steps, the model decides what research it needs, how many drafts to generate, when it's done.
"If this is a complaint, escalate it. If it's a question, answer it. If it's feedback, log it." This is an if/else with an LLM classifier at the branching point. It's a pipeline with a smart router. Build it as a pipeline.
After all the filtering above, agents are genuinely the right choice for a specific category of tasks:
Open-ended research. The task is: find out everything relevant about X. You don't know in advance how many sources you'll need, what follow-up questions will emerge, or when you have enough. The model needs to make these judgments in real time.
Autonomous debugging. Given a failing test and a codebase, find and fix the bug. The path depends entirely on what the model finds when it starts reading code — the right fix might require changes in three different files that couldn't have been identified without reading the first one.
Goal-directed task completion with unknown subtasks. "Book me a flight to Berlin for next Tuesday, under €400, and add it to my calendar." The subtasks — search flights, compare options, check calendar availability, handle payment — need to be orchestrated based on what's available and what conflicts exist. A pipeline would need to handle every permutation of availability and conflict in advance.
Adaptive customer interactions. A support agent that can not only answer questions but look up account details, process refunds, escalate to humans, and update records — where the right sequence of actions depends entirely on what the customer says next.
The most robust production systems are often neither pure pipelines nor pure agents — they're pipelines with agent steps at the points where autonomy is genuinely needed.
def hybrid_workflow(input_data: dict) -> dict:
# Step 1: Pipeline — deterministic preprocessing
cleaned = preprocess(input_data)
context = load_context(cleaned["id"])
# Step 2: Agent step — reasoning required here
analysis = run_agent(
task=f"Analyze this data and identify key risks: {cleaned}",
tools=[search_tool, calculate_tool],
max_iterations=5
)
# Step 3: Pipeline — deterministic postprocessing
report = format_report(analysis)
notify_stakeholders(report)
return report
The pipeline handles the parts where the path is known. The agent handles the part where reasoning about intermediate results is genuinely necessary. This pattern gives you most of the reliability of a pipeline with the flexibility of an agent where it matters.
If you're still unsure after running through the framework, use this: start with a pipeline and observe where it breaks.
Build the simplest fixed-path version of the task. Run it on real inputs. The places where the pipeline produces bad outputs because it couldn't adapt to what it found — those are your agent candidates. Now you have evidence that you need the complexity, not just intuition.
This approach also gives you a baseline. When you eventually build the agent, you can measure whether it actually outperforms the pipeline you replaced. More often than you'd expect, a better-designed pipeline beats a poorly-designed agent.
// RELATED ARTICLES
Claude 4.x takes you literally. Here's how to use that to your advantage instead of fighting it.
Models advertise 1M tokens but fall apart at 130K. The context window arms race is solving the wrong problem.
41% of code is now AI-generated. Code churn is up 41%. Refactoring has collapsed. The bill is coming due.