RAG Assistant
Localized AI document Q&A system with OCR extraction and vector similarity search.

// CONTEXT & OBJECTIVE
RAG Assistant is a document Q&A application that runs on local servers, eliminating reliance on third-party cloud AI APIs.
The system processes uploaded documents, segments text into semantic chunks, generates vector embeddings, and feeds retrieved context to a local LLM to generate grounded answers.
Data Pipeline & Architecture Overview
Upload & Extraction
Accepts PDF/DOCX/Images, extracting text content via PyPDF and Tesseract OCR.
Chunking & Embedding
RecursiveCharacterTextSplitter creates 1000-char chunks and embeds via nomic-embed-text.
FAISS Vector Indexing
Stores embeddings in FAISS Index for rapid vector similarity retrieval.
Retrieval & Inference
Retrieves top matching context chunks and synthesizes response via Ollama Qwen2.5:7B.
Key Engineering Hurdles & Solutions
Multi-format Document Text Extraction
Coordinated PyPDF for native digital documents alongside Tesseract OCR for image-based scans.
Balancing Chunk Size and Overlap
Configured 1000-character chunks with 150-character overlap to preserve semantic context across chunk boundaries.