# Building a Production PDF RAG Chatbot with FastAPI, ChromaDB & Groq

> Source: <https://dev.to/adarshverma21/building-a-production-pdf-rag-chatbot-with-fastapi-chromadb-groq-15ne>
> Published: 2026-12-06 20:39:21+00:00

**Recommendation:** Structure RAG backends as separate auth, document, and retrieval services so you can swap ChromaDB or Groq for another provider without rewriting the app.
More in the playbook "Retrieval and RAG": <https://wpnews.pro/playbooks/rag-retrieval>

*A clean backend architecture for multi-PDF Q&A with JWT auth, persistent chat history, and fast inference.*

Most RAG tutorials stop at a single-file script. For **AI-RAG-Chatbot** ([GitHub](https://github.com/AdarshVerma21/AI-RAG-Chatbot)), I wanted a modular backend with real authentication, document management, and fast LLM responses.

`FastAPI` + `JWT`):` passlib` password hashing and `python-jose` JWT tokens.`pypdf` + `RecursiveCharacterTextSplitter`):` HuggingFaceEmbeddings` (`sentence-transformers`).` ChromaDB` + `SQLAlchemy`):` Groq` via `ChatGroq`):` auth_service.py`, `pdf_service.py`, and `rag_service.py` modular makes testing and swapping vector stores or LLM providers trivial.
**Check out the full code:** [AdarshVerma21/AI-RAG-Chatbot](https://github.com/AdarshVerma21/AI-RAG-Chatbot)
