How ahsaanjameel595/document-rag-chatbot works
This is a PDF question-answering chatbot: users ask questions in a browser, the API retrieves relevant document context, generates an answer with sources, and stores the exchange by session. The frontend also fetches document metadata and supports starting a fresh chat. The tree identifies document-loading, splitting, embedding, vector-store, and answer-generation modules, but their implementations and wiring were not sampled; those components are shown without speculative links. The README is empty.
Components 14
Chat frontend
- App state
- Chat window
Backend API
- FastAPI app
- Chat endpoint
- Document endpoint
- Conversation endpoint
RAG pipeline
- PDF loader
- Text splitter
- Embeddings
- Vector store
- Retriever
- Answer generator
Conversation state
- Chat history
Other components
- User
Connections 13
- User → Chat window: asks questions
- App state → Chat window: provides session
- App state → Document endpoint: fetches metadata
- Chat window → Chat endpoint: posts question
- FastAPI app → Chat endpoint: mounts route
- FastAPI app → Document endpoint: mounts route
- FastAPI app → Conversation endpoint: mounts route
- Chat endpoint → Chat history: saves messages
- Chat endpoint → Retriever: retrieves context
- Retriever → Vector store: creates retriever
- Chat endpoint → Answer generator: generates answer
- Conversation endpoint → Chat history: reads history
- Chat endpoint → Chat history: reads history