How leosumanth3-source/swarnasky_chatbot works
This repository implements a Swarnasky website chatbot backed by retrieval-augmented generation, with a separate crawler and document-indexing toolchain. The user workflow is browser question → FastAPI chat handler → retrieval → LLM answer → browser display. The crawler extracts website pages; validation, chunking, embedding, and indexing support preparing searchable content. The README is empty, and the excerpts do not show how the offline pipeline stages are orchestrated or connected, so those links are omitted. Dashed edges mark integrations whose exact call sites were not shown.
Main entry points: main.py Chat API · app.js Chat interface · crawler.py Site crawler · retreiver.py Context retrieval
Components 15
Website acquisition
- Site crawler
crawler/crawler.py - Page extractor
crawler/extractor.py - Document schema
crawler/models.py
Index preparation
- Document validation
pipelines/validate_documents.py - Text chunking
pipelines/chunker.py - Local embeddings
pipelines/embedder.py - Vector indexing
pipelines/indexer.py
Chat services
- Qdrant store
- Chat API
main.py - Context retrieval
pipelines/retreiver.py - Groq client
app/llm/client.py
User interface
- Chat interface
frontend/app.js
Other components
- Chat user
- Swarnasky site
- Groq service
Connections 12
- Chat user → Chat interface: asks
frontend/app.js - Chat interface → Chat API: posts question
frontend/app.js - Chat API → Chat interface: serves interface
main.py - Chat API → Context retrieval: retrieves context
main.py - Chat API → Groq client: generates answer
main.py - Groq client → Groq service: requests completion
app/llm/client.py - Context retrieval → Qdrant store: queries vectors
- Site crawler → Swarnasky site: fetches pages
crawler/crawler.py - Site crawler → Page extractor: extracts pages
crawler/crawler.py - Document validation → Document schema: validates against
pipelines/validate_documents.py - Vector indexing → Qdrant store: writes vectors
pipelines/indexer.py - Local embeddings → Qdrant store: vectors eventually indexed