Back to projects
PROJECT 01 / RAG APPLICATION

DocuMind.

Intelligent Document Q&A System

From a PDF to a grounded answer: a document intelligence platform with semantic retrieval, citation-backed responses, and reusable MCP tools.

LangChainAWS BedrockChromaDBHuggingFaceFastAPIReactMCPLoRA / QLoRA

01 / Overview

From a PDF to a grounded answer: a document intelligence platform with semantic retrieval, citation-backed responses, and reusable MCP tools.

02 / Problem

Documents contain useful information, but finding a precise answer requires more than keyword search. The system needs to retrieve relevant passages and keep generated answers connected to their sources.

03 / Solution

I built a RAG pipeline that parses PDFs with PyMuPDF, creates overlapping chunks, embeds them with HuggingFace all-MiniLM-L6-v2, and retrieves relevant context from ChromaDB. LangChain and AWS Bedrock generate citation-backed answers through a FastAPI backend and React chat interface.

04 / Architecture

PDF / PyMuPDF

Parse uploaded PDFs into text for downstream retrieval.

MCP exposes document search and summarization through the existing ingestion and retrieval logic.

05 / How it works

  1. Upload a PDF and extract its text with PyMuPDF.
  2. Create overlapping chunks and compute sentence-transformer embeddings.
  3. Index the chunks in ChromaDB.
  4. Embed the question and retrieve relevant context.
  5. Orchestrate response generation with LangChain and AWS Bedrock.
  6. Display the answer with source citations. MCP clients can also call document search and summarization tools directly.

06 / Technology stack

PyMuPDF

Parses PDF content into the text needed by the retrieval pipeline.

HuggingFace

Provides the all-MiniLM-L6-v2 embedding model used for semantic similarity.

ChromaDB

Stores embeddings and supplies relevant chunks at query time.

LangChain + Bedrock

Connect retrieval context to model-powered answer generation.

FastAPI + React

Separate the backend pipeline from the chat experience.

MCP

Makes document search and summarization reusable outside the REST interface.

LoRA / QLoRA

Supports parameter-efficient adaptation of an open-source model for domain-specific responses.

07 / Engineering challenges

  • Context across chunk boundaries: overlapping chunks retain surrounding information for retrieval.
  • Grounding: retrieval and citations connect generated responses back to source passages.
  • Tool reuse: the MCP server exposes existing ingestion and retrieval logic to compatible clients.
  • Domain relevance: LoRA / QLoRA fine-tuning improved relevance over base-model prompting.

08 / Key features

  • Natural-language PDF questions
  • Semantic search and source citations
  • React chat interface and FastAPI backend
  • MCP document search and summarization
  • Domain-specific LoRA / QLoRA fine-tuning

09 / Load-test observations

~2 s

Average response time during load testing

15–20

Concurrent users in load testing

The FastAPI backend and React interface supported natural-language document queries with citation-backed answers during load testing.

10 / Engineering takeaways

The implementation connects ingestion, retrieval, generation, and source attribution as one system. Exposing the same logic through REST and MCP demonstrates how a retrieval pipeline can support multiple client interfaces.