- Role
- Author
- Type
- Open source
- Stack
- Python
- FastAPI
- Qdrant
- BM25
- PostgreSQL
- Sentence Transformers
Backend for a SaaS where organizations create chatbots trained on their own documents and websites, then embed them on their sites. Each organization is fully isolated.
The problem
Organizations want a chatbot that knows their content, sits on their website and never leaks data between customers.
What I built
A FastAPI backend with a RAG engine: hybrid search over each organization’s knowledge, source attribution on every answer, and SaaS plumbing for teams, keys, limits and billing.
- 01IngestPDF, DOCX, sites
- 02EmbedMiniLM, local
- 03Hybrid searchQdrant + BM25
- 04RRF mergeThreshold, dedupe
- 05AnswerWith sources
Highlights
- 01
Hybrid search + RRF
Qdrant vector similarity and BM25 keyword search merged with Reciprocal Rank Fusion, then thresholded and de-duplicated.
- 02
Ingestion & crawling
PDF, DOCX, TXT and Markdown uploads plus website crawling with sitemap discovery and robots.txt compliance.
- 03
Multi-tenant SaaS
Tenant-isolation middleware, RBAC, JWT and API keys, usage limits per plan, audit log and analytics.
- 04
Embeddable widget
A chat widget served per bot with domain allow-listing, plus billing through Lemon Squeezy.