Domain 2 β€” Module 3 of 11 27%
11 of 27 overall
Domain 2: Implement Generative AI and Agentic Solutions Free ⏱ ~12 min read

Workflows & Reasoning Pipelines

Single prompts aren't enough for complex tasks. Learn how to design tool-augmented flows, multistep reasoning pipelines, and orchestrated workflows that chain AI capabilities together.

Beyond single prompts

Simple explanation

A single prompt to an AI model is like asking one question. A workflow is like giving the AI a project plan with multiple steps.

Real-world tasks often need multiple steps: search for information, analyse it, make a decision, take an action, verify the result. Workflows chain these steps together β€” each step can use a different tool, model, or data source.

Three workflow patterns

Three workflow patterns
FeatureSimple ChainTool-Augmented FlowMultistep Reasoning
PatternStep A output becomes Step B inputModel calls external tools mid-generationModel breaks complex problem into sub-tasks
ControlDeterministic β€” you define each stepModel-driven β€” model decides when to call toolsModel-driven β€” model plans its own steps
ExampleTranslate text, then summariseSearch database, then generate reportAnalyse contract, identify risks, suggest changes
ComplexityLowMediumHigh
Best forPredictable, sequential tasksTasks needing real-time dataComplex analysis requiring reasoning

Tool-augmented flows

In a tool-augmented flow, the model can call tools (functions) during generation:

StepWhat Happens
1. User sends request”What’s the delivery status for order #12345?β€œ
2. Model reasonsDetermines it needs to look up the order
3. Tool callModel requests: call get_order_status(order_id="12345")
4. Your code executesYour function queries the database, returns status
5. Model receives resultGets the status data back
6. Model generatesProduces a natural-language response with the order status

Common tools in workflows

Tool TypeWhat It DoesExample
Code interpreterRuns Python code for data analysisCalculate statistics from CSV data
Web searchRetrieves current information from the webGet latest shipping rates
Custom functionCalls your own APIsCheck inventory, create ticket, send email
Knowledge retrievalSearches indexed documentsLook up company policies

Multistep reasoning pipelines

For complex problems, models can plan and execute multiple reasoning steps:

ComponentRoleExample
PlannerBreaks the task into sub-tasks”To analyse this contract: 1) Extract parties 2) Identify obligations 3) Flag risks”
ExecutorCarries out each sub-taskExtracts party names from Section 1
EvaluatorChecks quality of each step’s outputVerifies extracted names match document
AggregatorCombines sub-task results into final outputProduces complete contract analysis report
Real-world example: Atlas Financial's loan review pipeline

Atlas Financial automates loan application review with a multistep pipeline:

  1. Extract β€” Content Understanding pulls applicant data from the PDF application
  2. Retrieve β€” Azure AI Search finds relevant lending regulations
  3. Analyse β€” GPT-4o compares application against regulations
  4. Score β€” Model assigns a compliance score with justification
  5. Route β€” Score above threshold: auto-approve. Below: flag for human review

Each step produces structured output that feeds the next. The entire pipeline runs in under 30 seconds per application.

Exam tip: Workflow vs agent

The exam distinguishes between workflows and agents:

  • Workflow = pre-defined steps, deterministic control flow, you decide the sequence
  • Agent = model decides the sequence, plans dynamically, may retry or adapt

If the scenario needs predictable, repeatable execution β†’ workflow. If it needs adaptive, flexible reasoning β†’ agent.

Key terms

Question

What is a tool-augmented flow?

Click or press Enter to reveal answer

Answer

A workflow pattern where the AI model can call external tools (functions, APIs, databases) during generation. The model decides when it needs a tool, your code executes it, and the model uses the result to continue generating.

Click to flip back

Question

What is multistep reasoning?

Click or press Enter to reveal answer

Answer

A pipeline pattern where a complex task is broken into sub-tasks, each executed sequentially or in parallel. Each step's output feeds the next step's input, building toward a comprehensive final result.

Click to flip back

Question

What is a code interpreter tool?

Click or press Enter to reveal answer

Answer

A built-in Foundry tool that allows the model to write and execute Python code during a conversation. Used for data analysis, calculations, chart generation, and other tasks requiring computation.

Click to flip back

Knowledge check

Knowledge Check

MediaForge needs to process client briefs that arrive as PDFs. The workflow is: extract text from PDF, identify the target audience, generate 5 headline options, then translate headlines into 3 languages. What type of workflow is this?

Knowledge Check

A user asks Kai's logistics chatbot: 'How much would it cost to ship 500 packages from Auckland to Sydney next week?' The bot needs to check inventory, look up shipping rates, calculate volume discounts, and factor in the calendar for next week's availability. What's the best pattern?