How disha4346/rag_ai_assisstant works
This is a browser-based conversational question-answering app grounded in a configured PDF. A user submits a question through the frontend; the backend runs a retrieval-augmented generation chain, returns an answer, and saves the exchange in conversation memory. On startup, the backend loads an existing FAISS index or builds one from the PDF. The README is empty, so documented capabilities beyond the sampled source cannot be assessed; loader, embedder, and memory internals were not sampled.
Main entry points: main.py RAG setup · rag_pipeline.py Conversational RAG · app.py Chat API · script.js Chat client
Components 18
Web interface
- Web page server
frontend/app.py - Chat page
frontend/templates/index.html - Chat client
frontend/static/script.js
Document indexing
- Configured PDF
backend/data/2604.12062v1.pdf - Document loader
backend/src/loaders/loader.py - Text preprocessing
backend/src/preprocessing/preprocess.py - Text chunking
backend/src/chunking/chunker.py - Embedding provider
backend/src/embeddings/embedder.py - FAISS vector store
backend/src/vectorstore/vectordb.py
Retrieval and answering
- MMR retriever
backend/src/retriever/retriever.py - Conversational RAG
backend/src/pipeline/rag_pipeline.py - Document reranker
backend/src/reranker/reranker.py - Conversation memory
backend/src/memory/memory.py - LLM client
backend/src/llm/llm.py
Other components
- User
- Groq service
Connections 29
- User → Web page server: opens page
- Web page server → Chat page: renders
- Chat page → Chat client: loads client
- User → Chat client: submits question
- Chat client → Chat API: POST chat/reset
- Chat API → RAG setup: initializes RAG
- RAG setup → Embedding provider: gets embeddings
- RAG setup → FAISS vector store: loads or builds
- RAG setup → Document loader: loads PDF
- Configured PDF → Document loader: document input
- RAG setup → Text preprocessing: cleans documents
- RAG setup → Text chunking: splits documents
- RAG setup → MMR retriever: creates retriever
- RAG setup → LLM client: creates client
- RAG setup → Conversation memory: creates memory
- RAG setup → Conversational RAG: builds chain
- Document loader → Text preprocessing: documents
- Text preprocessing → Text chunking: cleaned documents
- Text chunking → FAISS vector store: chunks
- Embedding provider → FAISS vector store: embeddings
- FAISS vector store → MMR retriever: searches index
- Chat API → Conversational RAG: invokes chain
- Conversational RAG → MMR retriever: searches query
- Conversational RAG → Document reranker: reranks results
- Conversational RAG → Conversation memory: loads history
- Conversational RAG → LLM client: sends prompt
- LLM client → Groq service: requests completion
- Chat API → Conversation memory: saves or clears
- Chat API → Chat client: returns response