How chandanghub/rag_project works
This is a Streamlit RAG chatbot: users upload PDFs and chat in separate threads, while the backend indexes document chunks and uses a tool-enabled language model to answer questions. The README also advertises generating content from the web; the backend includes web search, arithmetic, and stock-price tools. The backend excerpt shows PDF indexing, retrieval, graph routing, and SQLite checkpointing. The Streamlit excerpt shows upload and thread-metadata calls; the chat invocation is not visible in the sampled lines, so that link is marked unverified.
Main entry points: rag_chatbot_backend.py Tool dispatcher · streamlit_rag_chatbot.py Streamlit chat
Components 20
Chat interface
- Streamlit chat
streamlit_rag_chatbot.py - PDF upload
streamlit_rag_chatbot.py - Thread history UI
streamlit_rag_chatbot.py
PDF retrieval
- PDF ingestion
rag_chatbot_backend.py - PDF loader
rag_chatbot_backend.py - Text chunking
rag_chatbot_backend.py - FAISS index
rag_chatbot_backend.py - Thread retriever
rag_chatbot_backend.py
Assistant runtime
- Chat graph
rag_chatbot_backend.py - LLM chat node
rag_chatbot_backend.py - Gemini model
rag_chatbot_backend.py - Tool dispatcher
rag_chatbot_backend.py - PDF RAG tool
rag_chatbot_backend.py - Web search
rag_chatbot_backend.py - Calculator
rag_chatbot_backend.py - Stock lookup
rag_chatbot_backend.py
Conversation state
- SQLite checkpoints
rag_chatbot_backend.py
Other components
- User
- Alpha Vantage
- DuckDuckGo
Connections 21
- User → Streamlit chat: sends prompts
streamlit_rag_chatbot.py - User → PDF upload: uploads PDF
streamlit_rag_chatbot.py - PDF upload → PDF ingestion: ingests file
streamlit_rag_chatbot.py - PDF ingestion → PDF loader: loads PDF
rag_chatbot_backend.py - PDF ingestion → Text chunking: splits pages
rag_chatbot_backend.py - PDF ingestion → FAISS index: indexes chunks
rag_chatbot_backend.py - PDF ingestion → Thread retriever: builds retriever
rag_chatbot_backend.py - Streamlit chat → Chat graph: streams chat
streamlit_rag_chatbot.py - Chat graph → LLM chat node: routes messages
rag_chatbot_backend.py - Chat graph → Tool dispatcher: dispatches tools
rag_chatbot_backend.py - Tool dispatcher → LLM chat node: returns tool results
rag_chatbot_backend.py - LLM chat node → Gemini model: requests response
rag_chatbot_backend.py - Tool dispatcher → PDF RAG tool: executes tool
rag_chatbot_backend.py - PDF RAG tool → Thread retriever: retrieves context
rag_chatbot_backend.py - Tool dispatcher → Web search: executes tool
rag_chatbot_backend.py - Web search → DuckDuckGo: searches web
rag_chatbot_backend.py - Tool dispatcher → Calculator: executes tool
rag_chatbot_backend.py - Tool dispatcher → Stock lookup: executes tool
rag_chatbot_backend.py - Stock lookup → Alpha Vantage: fetches quote
rag_chatbot_backend.py - Chat graph → SQLite checkpoints: persists checkpoints
rag_chatbot_backend.py - Thread history UI → SQLite checkpoints: lists threads
rag_chatbot_backend.py