Retrieval-augmented generation, end to end

Chat with Your Documents. Understand What’s Inside.

Upload a PDF, Word file or plain text, then ask questions in your own words. Every answer is generated from retrieved passages in your files — and shown with the sources it came from.

Built with LangChain · ChromaDB · FastAPI · Groq Embeddings run locally

Illustrative preview of the chatbot workflow.

What it does

Answers you can trace back to the page

This is a focused RAG application, not a general chatbot. It reads your documents, retrieves the passages that matter, and answers from that context only.

Grounded by design

The prompt instructs the model to use only the retrieved context. If the answer is not there, it says so instead of guessing.

PDF, TXT, DOCX — and pasted text

PyPDF, Docx2txt and plain-text loaders feed one ingestion pipeline. Pasted notes are chunked and embedded the same way.

Local embeddings

Chunks are embedded on your machine with all-MiniLM-L6-v2 (384 dimensions). No embedding API key, no per-chunk cost.

Sources with every answer

Each response lists the retrieved chunks with filename, chunk index and page metadata when the loader provides it.

Scoped retrieval

Search the whole library or tick specific documents, and choose how many chunks to retrieve (1–20) for each question.

A library that survives restarts

ChromaDB persists vectors to local disk. Content-based SHA-256 IDs make re-uploading the same file safe rather than duplicated.

The pipeline

Eight stages from file to grounded answer

Uploads and questions travel different paths through the same system. The tour walks through every stage with the real implementation details.

1 Upload PDF, TXT or DOCX
2 Extraction Loader reads text
3 Chunking 1000 chars, 200 overlap
4 Embeddings MiniLM, 384-dim
5 ChromaDB Persisted vectors
6 Retrieval Similarity search
7 LLM Groq generation
8 Answer With sources
Tech stack

The actual tools behind the app

No hidden services. These are the pinned libraries and models the project runs on.

FastAPI + UvicornTyped API, validation and static hosting
LangChain 1.x (LCEL)Loaders, splitter, retriever and chain
ChromaDBLocal persistent vector collection
Groq · gpt-oss-20bChat generation at temperature 0
sentence-transformersMiniLM embeddings on CPU
Vanilla HTML, CSS, JSNo framework and no build step
Pydantic settingsEnvironment-driven configuration
pytestIsolated tests with fake LLM and embeddings

Chat inference uses the Groq API; document embeddings are computed locally. No API keys are exposed to the browser.

Ready to Explore Your Documents?

Open the chatbot and upload your first file, or take the guided tour first to see exactly how retrieval and generation fit together.