An autonomous AI research agent that searches the web and your own documents, judging its own gaps until a report clears its own quality bar.
Motivation & what it does
This started as a real problem, not a portfolio exercise: during my MBA, research for coursework and my capstone kept eating hours I didn't have, searching the web, digging through documents, then manually pulling it all into a structured report. I also wanted to go deeper than prompt engineering and actually understand how modern AI systems get built. Groundwork solved my own problem and forced me to learn the real infrastructure in the process: agent loops, RAG pipelines, multi-provider orchestration, and production-grade evaluation.
Groundwork is an AI research agent that decides for itself when it has enough information. Point it at the open web or a folder of your own documents, and it searches, reads, judges its own gaps, and keeps going until a synthesis report clears its own quality bar, then exports it to Word or PowerPoint.
- Runs multi-turn research sessions over the open web or your own uploaded documents.
- Judges its own information gaps and decides whether to search again or synthesize.
- Scores its own report across quality dimensions and regenerates only the weakest one.
- Exports a polished, quality-audited report to Word or PowerPoint.
System architecture
Agent loop
A LangGraph state machine that alternates between web search or RAG retrieval, self-critiques its information gaps, and decides whether to search again or synthesize.
Multi-provider model routing
LiteLLM routes cheap classification and tool-routing calls to Claude Haiku, synthesis to Claude Sonnet, and independent evaluation to GPT-4o-mini, so no single provider grades its own homework.
Retrieval
Local sentence-transformer embeddings, so there's no per-query API cost or external dependency, indexed into a fresh ChromaDB collection per session.
Evaluation layer
A separate LLM-as-judge pass scores each report across multiple quality dimensions and triggers targeted regeneration of only the weakest dimension, rather than a full re-run.
Observability & cost
Prompt caching, cost guardrails, and full LangSmith tracing across every run.
Export
A two-stage deterministic export pipeline into Word and PowerPoint, so formatting doesn't depend on the model getting layout right in one shot.
Decisions & tradeoffs
Why a separate judge model, not the synthesizer grading itself
Early versions had Sonnet both write and score its own report, and the scores were predictably generous. Moving evaluation to a different provider (GPT-4o-mini) removed that conflict of interest and made the quality signal something I could actually act on, at a fraction of the synthesis cost.
Why regenerate one dimension, not the whole report
A full re-run after a bad score wastes everything the report got right. Instead, the judge flags the weakest scoring dimension specifically, and only that section gets targeted regeneration and re-splicing. It's a smaller, cheaper fix that keeps the parts that already worked.
Why local embeddings instead of an embeddings API
For a tool meant to run cheaply and repeatedly during a research session, a per-call embeddings API fee adds up fast and adds a dependency that can rate-limit or fail mid-session. Sentence-transformers running locally trade a small amount of retrieval quality for zero marginal cost and no external failure mode.
Concepts, skills & tools
AI & ML infrastructure
Frameworks & tools
Concepts & patterns
Screenshots

A generated research report, synthesized and structured automatically

LLM-as-judge scoring a report before export, with a one-click regenerate