← all projects

Agentic LLM workflow suite (LangGraph)

Python · LangGraph · LangChain · Pydantic · Streamlit

Why graphs instead of chains

A linear chain is fine until the workflow needs to make a decision, do two things at once, or loop until a quality bar is met. LangGraph models the workflow as a state graph, which makes those three cases first-class rather than something you fake with control flow around the LLM.

I built 10+ applications across four patterns to work through where each one actually earns its complexity:

Prompt chaining — sequential refinement where each step's output is the next step's input. The baseline; anything more is unnecessary unless the workflow needs it.

Parallel execution — independent sub-tasks fanned out and joined. Latency win, and it prevents the model from letting one sub-task's reasoning contaminate another's.

Conditional routing — a classifier node directs input down different branches. The customer-review triage pipeline uses this: sentiment and category determine which handling path a review takes.

Evaluator–optimizer loops — a generator node produces output, an evaluator node scores it against criteria, and the graph loops until the score passes or a cap is hit. The automated essay grader and the iterative content-refinement agent both run on this. It is the pattern that most improves output quality, and the one most likely to run away without a hard iteration ceiling.

Structured outputs are the reliability lever

Every node returns Pydantic-validated structured output rather than free text. This matters more than any prompt tuning: a node whose contract is a validated schema either produces conforming data or fails loudly. Parsing prose downstream is where these systems silently break.

Memory and interface

A Streamlit chat interface with real-time response streaming, backed by LangGraph checkpointers for persistent, thread-scoped conversation memory — so a conversation survives a page reload and separate threads never bleed into each other.

Stack

Python · LangGraph · LangChain · OpenAI GPT-4o-mini · Pydantic · Streamlit · Jupyter