John WalpoleAI systems engineering & reliability

architecture

Workflow-Oriented AI Systems with LangGraph

Many AI applications are built around a simple interaction model:

Type
Architecture
Last updated
2026-06-04
ai-systemslanggraphorchestrationarchitecturereliabilityautomation

Overview

Many AI applications are built around a simple interaction model:

A user submits a prompt and a language model generates a response.

This approach works well for straightforward questions, but operational systems often require more structure.

Engineering workflows frequently involve:

  • gathering context
  • retrieving documentation
  • evaluating sources
  • summarizing information
  • applying business rules
  • generating recommendations
  • validating outputs

Treating all of those activities as a single prompt can make systems difficult to understand, debug, govern, and improve.

For this reason, the architecture used throughout this AI and Reliability Engineering Lab favors workflow-oriented AI systems rather than prompt-oriented AI systems.

Why Workflows Matter

As AI systems become more capable, the challenge often shifts from generating answers to managing the process that produces those answers.

A language model may be able to answer a question, but an operational system must also determine:

  • What information should be retrieved?
  • Which sources should be trusted?
  • Which workflow should be executed?
  • What level of confidence exists?
  • Should citations be attached?
  • Should recommendations be generated?
  • Is human review required?

These decisions are typically workflow decisions rather than model decisions.

Workflow orchestration creates a structured path through those decisions.

What Does "Graph" Mean?

For many people, the word "graph" brings to mind mathematics, graph paper, coordinate systems, or visualizations such as sine and cosine waves.

That is not what the term means in LangGraph.

In computer science, a graph is a structure composed of nodes and connections between those nodes.

Examples include:

  • social networks
  • transportation systems
  • dependency trees
  • workflow engines
  • state machines

LangGraph uses this computer science definition of a graph.

Each node represents a step in a workflow.

Examples might include:

  • retrieve information
  • classify intent
  • summarize content
  • evaluate confidence
  • generate recommendations
  • request human review

The connections between nodes determine how the workflow progresses.

Unlike a traditional linear process, a graph can support branching paths, conditional logic, loops, retries, and multiple possible outcomes.

For example:

User Question

Intent Detection

Retrieve Sources

Confidence Check

├── High Confidence → Generate Answer │ └── Low Confidence → Request More Context

This flexibility is one of the reasons graph-based workflows are well suited for AI systems.

AI interactions are often dynamic. Different questions may require different paths through the system.

The term "LangGraph" therefore refers to a graph of workflow steps rather than a mathematical graph or chart.

The value comes from making complex workflows visible, understandable, and controllable.

Understanding this definition of a graph is important because it explains why LangGraph is useful for AI systems.

Rather than treating AI interactions as isolated prompts, LangGraph allows those interactions to be represented as connected workflow steps with clear execution paths, decision points, and outcomes.

Why LangGraph

LangGraph provides a graph-based approach to workflow orchestration.

Instead of treating an AI interaction as a single step, LangGraph allows systems to model a series of connected activities.

Examples include:

  • retrieval
  • classification
  • summarization
  • reasoning
  • recommendation
  • evaluation

Each activity becomes a node within a larger workflow.

This structure makes complex AI systems easier to understand and maintain.

Prompts vs Systems

A common misconception is that better prompts automatically produce better AI systems.

Prompt quality is important, but prompt engineering alone is not enough for operational AI systems.

As AI systems become more capable, the engineering challenge shifts from writing better requests to designing better context, clearer intent, stronger specifications, and more reliable workflows.

In practical terms, mature AI systems require several disciplines working together:

  • clear prompting
  • curated context
  • explicit intent
  • well-defined specifications
  • observable workflows
  • human review

Prompting defines the request.

Context defines what the system knows.

Intent defines what the user is actually trying to accomplish.

Specifications define constraints, acceptance criteria, edge cases, expected behavior, and what success looks like.

Workflow orchestration defines how the system moves through retrieval, reasoning, validation, citation, recommendation, and review.

This matters because modern AI systems can do more than return a single answer. They can inspect files, call tools, synthesize across multiple sources, generate code, compare alternatives, execute workflows, and operate over large bodies of information.

That increased capability creates a new operational risk.

If intent is unclear, context is weak, specifications are incomplete, or source material is unreliable, the system may confidently do the wrong thing faster.

A strong system may include:

  • retrieval
  • workflow routing
  • source validation
  • intent clarification
  • specification checks
  • reasoning steps
  • confidence evaluation
  • citations
  • recommendations

Many of these capabilities exist outside the prompt itself.

As systems grow, workflow quality often becomes more important than prompt complexity.

The AI field evolves rapidly.

Practices that were considered advanced a year ago often become baseline expectations as models, tooling, and workflows mature.

This does not mean earlier approaches were incorrect. It means the discipline continues to evolve.

Prompt engineering remains valuable, but many organizations eventually discover that better prompts alone cannot compensate for weak context, unclear intent, incomplete specifications, poor source material, or weak operational workflows.

As AI systems mature, the focus increasingly shifts from individual prompts toward the design of the broader system surrounding those prompts.

The goal is not to abandon prompting.

The goal is to recognize that prompts are only one layer of a larger AI system.

Architectural Pattern

The architecture used in this project follows a workflow-oriented model.

High-level flow:

User Question

Intent Detection

Retrieval

Workflow Selection

Reasoning

Citation Assembly

Recommendations

Response

The language model participates in the workflow but does not control the workflow.

This distinction is intentional.

Workflow Selection

Different questions require different workflows.

Examples:

Ask My Work

Purpose:

Answer questions using portfolio content.

Workflow:

  • identify intent
  • retrieve portfolio content
  • rank sources
  • generate answer
  • attach citations
  • suggest follow-up questions

Architecture Explainer

Purpose:

Explain system architecture and design decisions.

Workflow:

  • retrieve architecture content
  • identify relevant components
  • generate explanation
  • highlight tradeoffs
  • attach supporting references

Experience Explorer

Purpose:

Help visitors understand experience areas and projects.

Workflow:

  • identify requested topic
  • retrieve related projects
  • summarize experience
  • recommend related content

Prompt Variant Lab

Purpose:

Compare prompting approaches.

Workflow:

  • select variants
  • execute variants
  • evaluate outputs
  • summarize differences

Each workflow follows a different path through the system.

Benefits of Workflow-Oriented Design

Explainability

Workflows make system behavior easier to understand.

Rather than asking:

"Why did the model answer this way?"

it becomes possible to ask:

"Which steps produced this answer?"

Observability

Individual workflow stages can be measured independently.

Examples:

  • retrieval latency
  • source quality
  • workflow execution time
  • confidence scores
  • recommendation quality

This improves troubleshooting and optimization.

Governance

Workflow boundaries create natural control points.

Examples:

  • source validation
  • approval requirements
  • policy enforcement
  • safety checks

These controls are often easier to implement at the workflow level than inside prompts.

Maintainability

Individual workflow stages can evolve independently.

Examples:

  • changing retrieval engines
  • replacing models
  • adding evaluation steps
  • introducing new workflows

without redesigning the entire system.

Human-in-the-Loop Design

Not every workflow should end with automation.

Some workflows should end with review.

Examples include:

  • publishing content
  • modifying knowledge sources
  • approving recommendations
  • operational decisions

Human review is treated as a workflow stage rather than an exception.

This aligns with the broader trust and governance principles used throughout this project.

Observability and Reliability

Reliability principles apply to AI workflows in the same way they apply to traditional systems.

Questions worth asking include:

  • Which workflow executed?
  • Which sources were retrieved?
  • Which node failed?
  • Where was time spent?
  • What confidence level was produced?
  • Which recommendations were generated?

Workflow visibility improves operational trust.

An observable workflow is easier to improve than a black box.

Extension Points

The workflow model can expand by adding bounded steps and measurable review gates.

Useful extension points include:

  • retrieval evaluation workflows
  • corpus quality analysis
  • recommendation engines
  • content gap detection
  • workflow performance scoring
  • automated draft generation
  • human review pipelines

The goal is not to create autonomous agents.

The goal is to create reliable, observable, and explainable AI workflows.

Key Design Principle

The value of AI systems is not determined solely by the intelligence of the model.

It is determined by the quality of the workflow surrounding the model.

A well-designed workflow can improve trust, observability, governance, and maintainability.

For operational systems, workflow quality often matters more than prompt quality.

A well-designed prompt can improve a response.

A well-designed workflow can improve the entire system.

Sources

  • Workflow-Oriented AI Systems with LangGraph

    Public architecture document. Last updated: 2026-06-04.