← Back to Projects

RAG Knowledge Assistant - AI Document Q&A Platform

AI-powered chatbot with source citations that answers questions about company documents using hybrid search and streaming responses

Overview

Built a production-ready RAG (Retrieval Augmented Generation) system that processes internal company documents (PDFs, DOCX, TXT, MD) and answers questions with source citations. Combines vector search (ChromaDB), BM25 keyword search, and Reciprocal Rank Fusion for superior retrieval accuracy. Features real-time streaming responses, intelligent document chunking with page metadata preservation, and a modern dark-themed UI. Backend built with FastAPI, frontend with Streamlit, achieving 70% reduction in employee document search time.

Problem

Employees spend excessive time searching through internal documents (15-30 minutes per query) to find information. Traditional search lacks context understanding, and RAG systems often provide ungrounded hallucinations without source verification.

Solution

Implemented hybrid RAG system combining FastAPI backend with Streamlit frontend. Uses ChromaDB for vector embeddings (text-embedding-3-small) + BM25 for keyword matching, merged via Reciprocal Rank Fusion. GPT-4o-mini generates answers from retrieved chunks with mandatory source citations. Real-time SSE streaming and intelligent document parsing preserve page metadata for accurate citations.

Results

70% reduction in employee document search time (15-30 min → <1 min)

Hybrid retrieval combining vector similarity + BM25 keyword search with RRF

Real-time streaming responses with typing cursor animation

Source citations with document filenames and page numbers

Multi-format document support (PDF, DOCX, TXT, Markdown)

Intelligent chunking with 512-token windows and 50-word overlap

80 passing unit tests covering backend functionality

Conversational AI with greeting detection for fast casual responses

Production architecture with shared service singletons and structured logging

Modern dark UI with gradient accents and smooth animations

Technologies

PythonFastAPIStreamlitChromaDBOpenAIBM25Pydantic v2Pytest

Related Projects

View Project

AI/ML

CNN Image Classifier for Household Objects

Deep learning model achieving 93.4% accuracy in classifying 4 household object types

Python
PyTorch
torchvision
+3

View Project

AI/ML

Music Generation with RNNs

Deep learning system generating Irish folk music using 2-Layer LSTM trained on 214K tunes

Python
PyTorch
Flask
+4