All work

Lumina Thesis

A multi-agent research assistant that cites real papers instead of inventing them.

Role
Full-stack engineering
Year
2026
Discipline
AI product
Status
Live
Stack
Next.js · Python · FastAPI · LangGraph · Tailwind CSS · PostgreSQL · AI SDK
Lumina Thesis: AI PhD Thesis Assistant

The problem

A general-purpose chat model is an actively dangerous tool for doctoral writing. It will produce a plausible citation for a paper that does not exist, in the correct format, with a confident tone. A fabricated reference in a thesis is not a small error. The useful version of this tool has to be grounded in literature it can actually point at.

What I built

The backend is a FastAPI service orchestrated with LangGraph rather than a single prompt. Three agents with distinct jobs: an Extractor that pulls claims and citations out of source papers, an Architect that formulates and structures hypotheses, and an Editor that refines academic prose without touching the substance. Separating them means each one can be evaluated and changed independently; a single mega-prompt cannot be debugged.

Grounding comes from two services rather than the model's own memory. LlamaParse handles PDF ingestion, which is the unglamorous half of the problem: academic PDFs are two-column, footnote-heavy, and full of tables that destroy naive text extraction. Semantic Scholar supplies the citation graph, so references resolve against a real corpus.

Model choice is split by task. DeepSeek-R1 handles the reasoning-heavy steps where the chain of thought matters; Llama 3.3 handles the higher-volume rewriting passes where it does not. The trade-off is operational complexity (two providers, two sets of failure modes) against both cost and quality on the steps that actually need reasoning.

The frontend is Next.js with the Vercel AI SDK so that long multi-agent runs stream rather than blocking. A ten-second silent wait reads as broken; the same ten seconds with tokens arriving reads as working.

A detail worth explaining

Separating the agents is what makes the citations trustworthy

The single most important design decision is that the agent writing the prose is not the agent that produced the citations. The Extractor's output is a structured set of references pulled from documents that were actually ingested, and the Editor can only use what it is handed. That boundary is what turns 'please do not hallucinate sources', a request a model is free to ignore, into a structural property of the pipeline. The cost is that Lumina cannot cite a paper it has not read, which is the correct constraint for the job.

Outcome

Lumina Thesis runs as a deployed Next.js frontend against the FastAPI backend, ingesting papers through LlamaParse and resolving references against Semantic Scholar across the three-agent pipeline.