Agentic AI · Performance Analysis · MS Information Capstone

Agentic AI isn't about replacing engineers.
It's about fixing the right problems.

A capstone project for North River Diagnostics — a manufacturing company losing time, consistency, and quality coverage to manual process capability assessments. The answer was an agentic workflow that doesn't just automate the math; it enforces the analytical discipline engineers should follow but rarely have time for.

Azure AI Foundry Prompt Flow MCP Tools RAG · Azure AI Search GPT-4o Azure Blob Storage Python · Multimodal
70–85%
Estimated reduction in
time per analysis
5
Specialized agents
in one workflow
10–20 min
Estimated, from 1.5–2.5 hrs
of manual engineer work
Why trust it

The workflow refuses to interpret unstable processes: statistical stability checks gate every capability assessment, grounded in internal standards via RAG.

The problem

Three engineers. Three interpretations. One process.

North River Diagnostics' engineers spent most of each capability assessment on mechanical work — extracting data, cleaning spreadsheets, running calculations — and when they finally interpreted the numbers, they disagreed: the same Cpk was called "capable enough," "marginal," and "not capable at all." Underneath sat a deeper analytical failure. Capability indices like Cpk are only valid when the process is statistically stable, yet Cpk was routinely calculated and acted on without a stability check. That single failure sent improvement resources at the wrong problem: firefighting variation instead of redesigning capability.


How it works

Eight nodes. One decision pipeline.

Built in Azure AI Foundry Prompt Flow, with each node owning one responsibility. Numbers that have a right answer — Cp, Cpk, control limits — are computed deterministically in Python via MCP tools; the LLM handles only data normalization, visual chart reading, and narrative. The structural rule: a vision agent issues a stability verdict before the RAG-grounded aggregator interprets anything, and if the process is unstable, the workflow refuses to interpret Cpk at all. Every time, without exception.

Ingestion
1
data_access · Python
Cloud data retrieval
Connects to Azure Blob Storage and retrieves the process CSV. Decouples data access from analysis logic — the workflow pulls programmatically, mirroring real production systems.
2
process_data_formatter · LLM (GPT-4o)
Intelligent preprocessing
Uses an LLM with a Jinja2 prompt template to normalize raw CSV data — identifying measurement columns, aligning with spec limits (LSL, USL), and outputting a consistent data object for all downstream nodes.
Parallel analysis
3a
cap_metrics · Python + MCP Agent
Capability metrics calculation
On-the-fly agent with a Process Capability MCP tool. Computes Cp, Cpk, Pp, Ppk deterministically — not via LLM estimation. Results are auditable and identical across runs.
MCP · deterministic
3b
chart_creator · Python + MCP Agent
SPC chart generation
On-the-fly agent with a chart-generation MCP tool. Produces an Individuals chart and Moving Range chart showing process behavior over time. Outputs a URL for downstream visual interpretation.
MCP · visual artifact
↑ Nodes 3a and 3b run in parallel from the formatter output
Interpretation
4
process_behavior · Python + Multimodal Agent
Visual stability assessment
A vision-capable GPT-4o agent "looks at" the SPC chart image and applies process behavior rules — detecting points beyond control limits, runs, trends, and cycles. Produces a clear stability verdict before any capability interpretation begins.
Multimodal · vision reasoning
5
aggregator · Python → Persistent RAG Agent (Foundry)
Standards-grounded synthesis
Calls a persistent Aggregator Agent hosted in Azure AI Foundry with a RAG knowledge base built from NRD's internal capability guidelines. Synthesizes capability results and stability findings into a leadership-ready narrative — always referencing internal standards, never hallucinating thresholds.
RAG · governed interpretation
Output
6
report_generator + report_writer · Python
Structured report packaging
Transforms the aggregated narrative into a structured HTML report, publishable to Azure Blob Storage. Separates analysis logic from presentation — the same report format regardless of which process or dataset is analyzed.

Sample output

The run where the workflow refused to answer.

Real process data: 117 observations of Hot Metal Delivery Times, spec limits LSL 35 / USL 65. The process was unstable — and instead of reporting a capability number, the agent declined to interpret it.

Unstable and incapable
Hot Metal Delivery Times — Out of Control
Five points beyond control limits on the Individuals chart. Five violations on the MR chart. The mean has shifted to 64.25 — near the upper spec limit. The agent correctly refused to anchor recommendations on Cpk and redirected focus to finding and eliminating assignable causes first.
n observations117
process mean64.25 (near USL 65)
within σ13.97
Cp0.358 — incapable
Cpk0.018 — near zero
Pp / Ppk0.270 / 0.014
OOC points (I-chart)5 — unstable
MR violations5 — high instability

Agent verdict: Statistically unstable. Cpk of 0.018 is not reliable — do not use for decisions. Action: eliminate assignable causes before any capability interpretation.

Reflection
Behind the build

The most important decision was where to put the intelligence: deterministic math stayed in Python and MCP tools, and I used LLMs only where flexibility genuinely adds value — normalizing data, reading charts, writing narrative. The RAG-backed aggregator was where agentic AI clearly outperformed scripting, reconciling stability, capability, and recommended actions into a narrative any engineer would recognize as correct. The broader lesson: trust is built through clarity before control. A system that explains its reasoning and is honest about its limits gets adopted — one that doesn't, doesn't.

Interested in working together?

Get in touch