Fixed graph vs LLM supervisor: lessons from building a 7-step paper writer in LangGraph

I built a LangGraph workflow that turns an assignment brief into a cited research paper, then ran it live against Groq, OpenAlex and Crossref. The biggest lesson was to keep routing in plain code and not let an LLM choose the next step.

The graph has seven roles: brief analyst, topic strategist, source scout, thesis writer, outliner, drafter and critic. The order is fixed. The only dynamic decisions are two human approvals (topic and thesis) and the critic choosing between “rewrite” and “find more sources”.

Why I went this way:

  • It is cheaper, easy to test, and fits free-tier rate limits.
  • Citations are checked in code. A source is kept only if its DOI resolves in Crossref and the title and year match. The writer can only cite verified ids, and code builds the reference list, so the model cannot invent an entry.
  • Progress is checkpointed in Postgres after every node, so a run resumes after a crash or deploy.

Live runs found problems my tests did not:

  • One prompt was 8,779 tokens against an 8,000 limit. I capped sources at 15, trimmed abstracts, and showed the critic only the body plus the sources it cites.
  • 42 verified sources included an edge-computing paper for a last-mile delivery query. I now rank by relevance first, then verify in rank order.
  • The critic flagged a “12% fuel reduction” that no source supported.

What I have not measured: paper quality, and whether each sentence is faithful to its source. That is judged only by an LLM reviewer, which is not proof. Every live run that finished was flagged for human review, mostly for word count.

My question: for people running LangGraph in production, do you checkpoint into your own Postgres tables like this, or keep run state elsewhere and use checkpoints only for the graph?

Code: GitHub - Prekshabarjatya/research-desk: LangGraph workflow that turns an assignment into a cited research paper. Citations verified against Crossref in code, human approval gates, resumable runs on Postgres, FastAPI + web UI. · GitHub
Write-up: research-desk/docs/CASE_STUDY.md at main · Prekshabarjatya/research-desk · GitHub