How jabbarabdul18/ai-rag-assistant works
This is a document-grounded RAG assistant: users upload documents, the application extracts and indexes their text, then answers questions with retrieved context and can stream responses. The README also advertises summarization and vector-database visualization; these are retained as application capabilities, though their implementation paths are not independently visible in the sampled excerpts. The tree and excerpts show both a Streamlit application and a separate browser script; their relationship is unclear, so that link is unverified.
Main entry points: app.py Assistant app · rag_engine.py Chunking and indexing · script.js Browser client · file_processor.py Text extraction
Components 14
User interaction
- Assistant app
backend/app.py - Browser client
static/script.js - Document summaries
backend/app.py - Vector visualization
backend/app.py
Document ingestion
- Uploaded files
- Text extraction
backend/file_processor.py - Text cleaning
backend/file_processor.py
RAG and answers
- Chunking and indexing
backend/rag_engine.py - FAISS index
backend/rag_engine.py - Similarity retrieval
backend/rag_engine.py - Answer generation
backend/rag_engine.py
Models and services
- Text embeddings
- OpenAI API
Other components
- User
Connections 14
- User → Assistant app: asks and uploads
README.md - User → Browser client: uses
static/script.js - Browser client → Assistant app: may call
- Assistant app → Text extraction: extracts uploads
backend/app.py - Text extraction → Text cleaning: cleans text
backend/file_processor.py - Assistant app → Chunking and indexing: adds documents
backend/app.py - Chunking and indexing → Text embeddings: embeds chunks
backend/rag_engine.py - Chunking and indexing → FAISS index: stores chunks
backend/rag_engine.py - Similarity retrieval → FAISS index: searches
backend/rag_engine.py - Answer generation → Similarity retrieval: retrieves context
backend/rag_engine.py - Answer generation → OpenAI API: requests completion
backend/rag_engine.py - Assistant app → Answer generation: requests streamed answers
backend/app.py - Assistant app → Document summaries: offers summarization
README.md - Assistant app → Vector visualization: offers vector visualization
README.md