How thatguy4u/docs-bot works
This is a Streamlit PDF question-answering assistant. Users upload PDFs to create a searchable knowledge base, then ask questions; the app retrieves supporting chunks, optionally gates low-confidence results, and generates grounded answers with source excerpts. The graph preserves PDF ingestion, embeddings and local storage, vector and hybrid search, follow-up handling, Gemini generation, and chat presentation. Relationships are limited to calls or flows shown in excerpts or documented by the README; the app excerpt omits some upload and mode-selection logic.
Main entry points: app.py Streamlit chat · generator.py RAG orchestration · embedder.py Embedding and store access · retriever.py Vector retrieval and gate
Components 12
User interface
- Streamlit chat
app.py - Answer and citations
app.py
PDF ingestion
- PDF chunking
loader.py
Knowledge and search
- Embedding and store access
embedder.py - Local Chroma store
- Vector retrieval and gate
retriever.py - BM25 hybrid search
retriever.py
Answer generation
- RAG orchestration
generator.py - Follow-up condensation
generator.py
Other components
- PDF user
- Uploaded PDFs
- Gemini model
Connections 18
- PDF user → Streamlit chat: uploads and asks
README.md - Streamlit chat → Uploaded PDFs: accepts upload
README.md - Streamlit chat → PDF chunking: chunks PDF
app.py - PDF chunking → Embedding and store access: provides chunks
embedder.py - Streamlit chat → Embedding and store access: adds documents
app.py - Embedding and store access → Local Chroma store: embeds and persists
embedder.py - Vector retrieval and gate → Embedding and store access: loads store
retriever.py - Vector retrieval and gate → Local Chroma store: searches chunks
retriever.py - BM25 hybrid search → Embedding and store access: loads store
retriever.py - BM25 hybrid search → Local Chroma store: runs vector search
retriever.py - RAG orchestration → Follow-up condensation: condenses follow-up
generator.py - Follow-up condensation → Gemini model: rewrites question
generator.py - RAG orchestration → Vector retrieval and gate: retrieves scored chunks
generator.py - RAG orchestration → BM25 hybrid search: optionally searches
generator.py - RAG orchestration → Gemini model: generates answer
generator.py - Streamlit chat → RAG orchestration: requests answer
app.py - Streamlit chat → Answer and citations: renders answer and sources
app.py - RAG orchestration → Answer and citations: returns chunks and scores
generator.py