AI Systems & AgentsExperimental

DeepResearch Agent: A Critique-and-Reflection Graph

A six-node LangGraph research pipeline that plans questions, searches, critiques evidence, reflects, synthesizes, and annotates claims with citations.

View source
  • Python
  • LangGraph
  • Groq
  • Tavily
  • Streamlit
  • TypedDict

Technical highlightUses an explicit confidence-and-iteration router to bound the critic/reflection loop before synthesis, rather than relying on an open-ended autonomous cycle.

Contents

The Problem

A single search-and-summarize pass can miss contradictions and weak evidence. This project asks whether an explicit research graph can make revision visible and bounded.

Why This Approach?

LangGraph models the workflow as state transitions rather than a long prompt. Each node receives a typed shared state and returns a focused update, making the control flow inspectable.

Architecture

The graph runs planner → research → critic → reflection. A conditional edge returns to the critic while the iteration count is below the configured maximum and confidence remains below 0.75. It then proceeds through synthesis and citation nodes.

Implementation

State records the original query, plan, sub-questions, findings, sources, critiques, confidence, refined findings, iteration count, and final report. Tavily is the search integration, Groq provides the language model, and Streamlit presents node progress and the structured report.

The citation output classifies findings as fact, reasoning, or speculation and builds a bibliography. This is an epistemic label produced by the system, not independent fact verification.

Experiments and Results

The repository documents the architecture and runnable interfaces but does not contain a test suite or a measured evaluation set. Therefore this case study makes no accuracy, citation-quality, latency, or production-readiness claim.

What Failed?

Confidence is model-generated and the fixed 0.75 threshold is not calibrated against human judgments. Search quality depends on an external provider, while mock fallback behavior cannot establish real retrieval performance. A polished report can still contain weak evidence.

What I Learned

The strongest verified contribution is control-flow clarity: revision has a named state, a visible loop, and a hard stopping condition. The missing evaluation also shows why agent architecture and agent reliability must be reported separately.

Next Steps

  • Add a frozen question set with citation precision and coverage scoring.
  • Test loop decisions against human-rated report quality.
  • Preserve source excerpts and claim-to-source spans for auditability.
  • Add failure fixtures for unavailable search and malformed model output.

References

← All projects
Share