How revanthk1001-jpg/ragbot-2 works
The product is a PDF-grounded RAG chatbot: users upload documents, then ask questions and receive answers with source references; optional evaluation scores responses. The graph separates the Streamlit interface, FastAPI workflows, document/index handling, and model/quality services. Both standard and streaming query paths are shown. The README documents capabilities such as local Hugging Face models and Langfuse tracing; source-level links are included where the excerpts show them.
Main entry points: streamlit_app.py Streamlit chat · main.py Query endpoint · faiss-index FAISS index
Components 19
Chat interface
- Streamlit chat
streamlit_app.py
API workflows
- FastAPI application
main.py - Ingest endpoint
main.py - Query endpoint
main.py - Streaming endpoint
main.py - Evaluation status
main.py - Context prompt
main.py - Evaluation results
main.py
Document knowledge
- PDF loading
main.py - Text splitting
main.py - FAISS index
faiss-index - Semantic retrieval
main.py
Models and quality
- Embedding model
main.py - LLM generation
main.py - Background evaluation
main.py
Other components
- Chat user
- Hugging Face models
- Langfuse tracing
- DeepEval metrics
Connections 22
- Chat user → Streamlit chat: uses
README.md - Streamlit chat → Ingest endpoint: uploads PDF
streamlit_app.py - Streamlit chat → Streaming endpoint: streams query
streamlit_app.py - Streamlit chat → Query endpoint: requests evaluation
streamlit_app.py - Streamlit chat → Evaluation status: fetches scores
streamlit_app.py - Ingest endpoint → PDF loading: loads PDF
main.py - PDF loading → Text splitting: splits pages
main.py - Text splitting → Embedding model: embeds chunks
main.py - Text splitting → FAISS index: builds and saves
main.py - Embedding model → FAISS index: indexes vectors
main.py - Query endpoint → Semantic retrieval: retrieves context
main.py - Streaming endpoint → Semantic retrieval: retrieves context
main.py - Semantic retrieval → FAISS index: searches index
main.py - Query endpoint → Context prompt: builds prompt
main.py - Streaming endpoint → Context prompt: builds prompt
main.py - Context prompt → LLM generation: supplies prompt
main.py - LLM generation → Hugging Face models: runs local model
README.md - LLM generation → Langfuse tracing: traces generation
main.py - Query endpoint → Background evaluation: schedules evaluation
main.py - Background evaluation → DeepEval metrics: measures responses
main.py - Background evaluation → Evaluation results: stores scores
main.py - Evaluation status → Evaluation results: reads scores
main.py