Built to order

Agentic AI Research Assistant using LangGraph and Ollama

This project builds an agentic AI research assistant that answers questions over the user's own documents using a five-agent LangGraph graph — planner, retriever, researcher, critic and synthesizer — running on Llama 3.2 3B locally through Ollama, so no document leaves the machine. Every answer cites the retrieved passages, and a critic agent rejects any claim it cannot source before the answer is shown. It ships with a working demo, the graph code and the full report. Suitable for B.E./B.Tech final-year projects in Computer Science, IT and AI & Machine Learning.

Chat on WhatsApp — get a quotation

AI & Machine Learning PythonHTML CSS JavaScript frontendFastAPI backendnomic-embed-text embeddingsLangGraph StateGraphOllama Llama 3.2 3BLangChain ChatOllamaChromaDB vector storeSoftware
Agentic AI Research Assistant using LangGraph and Ollama — project thumbnail preview
More project photos (2)

The problem

An agentic AI research assistant using LangGraph and Ollama is a research helper built from five agents that work as one LangGraph state machine: a planner that breaks a question into sub-questions, a retriever that fetches the matching passages from the user's own documents, a researcher that drafts claims from those passages, a critic that checks every claim against its cited passage, and a synthesizer that writes the final cited answer. The system runs on Llama 3.2 3B through Ollama locally, so research documents never leave the user's computer and no cloud API key is needed. Unlike a single chat prompt, the graph makes every step visible and checkable: the trace shows which passages were retrieved, which claims the critic rejected, and which sources support the final answer. That structure is the point of the project — it turns a language model from a confident answer machine into an auditable research pipeline a student can explain, test and defend.

Students researching a topic usually juggle PDFs, notes and browser tabs, then paste fragments into a chatbot and receive an answer with no evidence trail. When the model invents a reference or misreads a passage, there is no way to catch it. This project addresses that gap with retrieval grounding plus a critic loop: answers come only from the supplied documents, and anything unsourced is rejected before it reaches the user.

SYSTEM FLOW

7 components 6 connections

Live flow
Drag to explore
100%
storageLocal documents

The user's own PDFs and text files, chunked and embedded locally. The demo corpus holds 6 documents and 388 words.

Follow the working sequence

How it works

A research run moves through the graph in one continuous pass. The user types a question and selects documents, and the planner node breaks the question into two or three sub-questions and writes them into the shared state. The retriever embeds each sub-question with nomic-embed-text, searches the ChromaDB index, and returns the top passages into the state. The researcher reads those passages and drafts claims, tagging each claim with the document it came from. The critic then checks every claim against its cited passage: claims that match pass, claims without a source are rejected, and a rejection routes the graph back to the researcher for more evidence. Once the draft passes, the synthesizer writes the final answer from the verified claims only, with inline citations and a source list. The whole trace stays visible, so the user can see exactly what was retrieved, what was rejected and why.

  1. The user adds documents (PDF or text); each file is split into chunks of approximately 500 words (design target), embedded with nomic-embed-text and stored in a ChromaDB index.
  2. The user asks a question; the planner node decomposes it into two or three sub-questions and writes them into the shared graph state.
  3. The retriever embeds each sub-question and fetches the top 3 passages per sub-question (design target) from the vector index into the state.
  4. The researcher reads the retrieved passages and drafts claims, tagging each claim with the document and passage it came from.
  5. The critic verifies every claim against its cited passage; a failed claim routes the graph back to the researcher, with a maximum of 2 retries per run (design target).
  6. The synthesizer writes the final answer from the verified claims only, with inline citations and a source list, and the run is saved with its full trace.

Tech stack:

  • Python 3

  • LangGraph · StateGraph

  • Ollama · Llama 3.2 3B

  • LangChain · ChatOllama

  • nomic-embed-text embeddings

  • ChromaDB vector store

  • FastAPI backend

  • HTML · CSS · JavaScript frontend

  • Dataset: The user's own research-document corpus — PDFs and text files supplied by the buyer. There is no fixed public dataset: the assistant retrieves over whatever documents are added, so corpus size depends on the documents supplied. The demo build ships a 6-document, 388-word corpus (Measured in the demo build).

  • Task: Retrieval-grounded question answering; input = a research question plus the local document corpus, output = a cited answer with a source list.

  • Model: Llama 3.2 3B through Ollama (ollama run llama3.2, 2.0 GB download; 1B variant 1.3 GB, Ollama library values). Embeddings use nomic-embed-text (137M parameters, 768 dimensions, 274 MB download, Ollama library values). The LangGraph graph has 5 nodes and 6 edges.

  • Metrics: Citation coverage, faithfulness and completeness, checked per run by the critic agent against the retrieved passages. No accuracy figure is claimed: answer quality depends on the supplied documents and the local model, and the report documents the achieved citation coverage measured on the buyer's own corpus after the build.

Parameter Value
Graph nodes 5 (Planner · Retriever · Researcher · Critic · Synthesizer)
Graph edges 6 (4 forward edges + critic loop-back + critic-to-synthesizer edge)
Local model Llama 3.2 3B via Ollama — 2.0 GB download (Ollama library value)
Embedding model nomic-embed-text — 137M parameters · 768 dimensions · 274 MB download (Ollama library values)
Demo corpus 6 documents · 388 words (Measured in the demo build)
Chunk size Approximately 500 words per chunk (design target)
Retrieval depth Top 3 passages per sub-question (design target)
Critic retries Maximum 2 researcher retries per run (design target)
Response time Design target: under 60 seconds per research run on a mid-range laptop CPU
Minimum RAM Approximately 8 GB (design target; the 3B model plus embeddings fit a mid-range laptop)
Runs offline Yes — after ollama pull llama3.2 and ollama pull nomic-embed-text; no cloud key needed

Project features

The assistant's strongest capabilities are its five-agent LangGraph graph, its citation-first answers, and its fully local execution. The graph itself is the centrepiece: five nodes — planner, retriever, researcher, critic and synthesizer — share one typed state, and conditional edges let the critic send the workflow back to the researcher when evidence is missing, so a weak draft is reworked instead of published. Citation-first answering means every factual claim in the final answer points at a passage from the user's own documents, with a source list the reader can open and check. Local execution through Ollama keeps the corpus private: Llama 3.2 3B and the nomic-embed-text embedding model both run on the user's machine, with no cloud account, no API key and no per-query cost. A visible agent trace ties it together, showing each agent's step, the retrieved passages and the critic's verdict in real time.

  • [Five-agent LangGraph graph] Planner, retriever, researcher, critic and synthesizer run as nodes of a compiled StateGraph sharing one typed state, with conditional edges routing the workflow between them.
  • [Critic gate with retry loop] The critic checks every draft claim against its cited passage and rejects unsourced claims; a rejection routes the graph back to the researcher for more evidence instead of letting the answer guess.
  • [Citation-first answers] Every factual claim in the final answer carries an inline citation to a retrieved passage, with a source list naming the document each claim came from.
  • [Local Ollama inference] Llama 3.2 3B runs on the local machine through Ollama, so the research corpus never leaves the user's computer and no cloud API key or per-query payment is needed.
  • [Document ingestion] The user's PDFs and text files are split into chunks, embedded with nomic-embed-text and stored in a ChromaDB vector index for similarity retrieval.
  • [Visible agent trace] Each run shows the planner's sub-questions, the retrieved passages, the critic's verdict and the synthesizer's output as they happen, so the whole reasoning chain can be inspected.
  • [Session history] Completed research runs are saved with their question, agent trace and source list, so earlier answers can be reopened and re-checked.
  • [Web search tool (Optional customization)] Not part of the base build. A web-search tool can be added so the researcher can also consult live web sources alongside the local corpus.

What is included

  • Complete LangGraph graph code (5 nodes, 6 edges, checkpointer) with FastAPI backend
  • Document ingestion pipeline (chunking, nomic-embed-text embeddings, ChromaDB index)
  • Working web demo with visible agent trace, corpus panel and cited answers
  • Demo corpus of 6 documents used to verify the build end to end
  • Project report PDF (background, LangGraph theory, graph design, methodology, results)
  • PPT presentation for final review
  • Viva Q&A preparation document (graphs, state, reducers, conditional edges, RAG, local LLMs)

Limitations & prerequisites

  • Answer quality depends entirely on the supplied documents; an empty or thin corpus produces thin answers.
  • A small local model (3B parameters) reasons less reliably than a large cloud model; the critic mitigates invented claims but cannot eliminate them.
  • The demo build retrieves by keyword overlap over its 6-document corpus; the delivered build uses embedding retrieval (nomic-embed-text + ChromaDB).
  • Retrieval is text-only; scanned image PDFs need OCR first, listed as an optional customization.
  • Response time depends on local hardware; under 60 seconds per run is a design target on a mid-range laptop, not a measured guarantee.
  • The assistant is an academic research aid, not a substitute for reading the primary sources; every citation should be checked before it is quoted.

Frequently Asked Questions

Which model is used and where does it run?

Llama 3.2 3B runs locally through Ollama — the 3B download is 2.0 GB and it starts with ollama run llama3.2, with a 1.3 GB 1B variant for weaker machines. The 3B model is the default for this build. Both run entirely offline once downloaded, so documents never leave the machine.

Which documents does it research over?

The user's own documents: PDFs and text files added to the corpus are chunked, embedded and indexed locally. There is no fixed dataset, so the corpus can be research papers, notes or reports on any topic. Papers, lecture notes and reference material all work, and the demo build ships with a 6-document sample corpus.

How does the critic stop invented facts?

The critic compares every draft claim with its cited passage and rejects any claim without a source, routing the graph back to the researcher for more evidence. A claim that matches its passage passes; a claim that contradicts it or has no source is rejected. Rejected claims never reach the final answer, and the trace shows what was rejected.

Can it search the web?

Not in the base build — it answers only from the local corpus, which is what keeps the answers checkable. That boundary is deliberate: answers stay grounded in documents the user owns. If live sources are needed, the optional web-search tool can be added on request.

Is this project suitable for a final-year project?

Yes — for Computer Science, IT and AI & Machine Learning programs. It demonstrates LangGraph state machines, retrieval-augmented generation, local LLM deployment and evaluation discipline in one working system. The graph, retrieval pipeline and critic gate give the viva real technical depth, and the visible trace makes the system easy to demonstrate live.

Components & software requirements
  • Python 3
  • LangGraph · StateGraph
  • Ollama · Llama 3.2 3B
  • LangChain · ChatOllama
  • nomic-embed-text embeddings
  • ChromaDB vector store
  • FastAPI backend
  • HTML · CSS · JavaScript frontend
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Related guides

All guides

Machine Learning Final Year Project Ideas with Datasets

This guide lists 30+ machine learning final-year project ideas grouped by type — tabular prediction, NLP, computer vision, and time series — each paired with a well-known public dataset from the UCI ML Repository or Kaggle. Pick a dataset with 1,000 to 50,000 rows: large enough to train a real model, small enough to iterate on a laptop. Confirm the license allows academic use and that it has a clear target column. Build a baseline model in week 1 so you always have something working. Avoid collecting your own dataset unless you have 2+ months to spare.

Read guide

Test Set Leakage: The Silent Mistake That Inflates Your ML Accuracy

Test set leakage is the reason so many student models report impressive accuracy and then embarrass their authors on fresh data. This guide explains what leakage is, the five ways it sneaks into typical student pipelines (scaling before the split, feature selection on the full dataset, duplicated rows, future-derived features, and shuffled time-series), how to detect it in code you already wrote, and the pipeline discipline that prevents it.

Read guide

Best 10 AI & Machine Learning Projects for 2026

The ten AI/ML builds worth your final year in 2026: every one trains or fine-tunes a real model on a named public benchmark — FaceForensics++, MIT-BIH, LIAR, ShanghaiTech — with defensible evaluation and a working demo. No inflated accuracy claims; every entry links to its live project page.

Read guide
Get a quotation