How mahesh-pepali/zepto-data-ai-platform works
The repository is a collection of three largely independent data/AI modules: a book-data pipeline, Titanic analytics and modeling, and a policy-support assistant. The main user-facing runtime is the assistant’s /ask API, which routes policy questions through retrieval and response generation. The README documents additional analytics and pipeline capabilities; their code paths are represented at module level where appropriate. Support-assistant wiring is based on sampled source; its README excerpt ends before the detailed module documentation.
Main entry points: graph.py Intent and answer workflow · 01_eda.py EDA and cleaning · 03_finalize.py Finalize model · ingest.py Embed and ingest policies
Components 24
Book Data Pipeline
- Scrape and clean
data_pipeline/code/scraper.py - Cleaned books CSV
data_pipeline/data/books_cleaned.csv - Build SQLite database
data_pipeline/code/database.py - Books database
data_pipeline/data/books.db - SQL and Pandas analysis
data_pipeline/code/queries.py
Titanic Analytics
- EDA and cleaning
analytics/code/01_eda.py - Raw Titanic data
analytics/data/raw/titanic_raw.csv - Cleaned Titanic data
analytics/data/cleaned/titanic_cleaned.csv - EDA visualizations
analytics/outputs - Modeling and evaluation
analytics/code/02_modeling.py - Models and results
analytics/models - Finalize model
analytics/code/03_finalize.py - Best model pipeline
analytics/models/best_model_pipeline.joblib
Policy Support
- FastAPI endpoints
support_assistant/code/main.py - Intent and answer workflow
support_assistant/code/graph.py - Policy documents
support_assistant/corpus - Embed and ingest policies
support_assistant/code/ingest.py - Policy vector store
- Policy prompt
support_assistant/code/prompt.py
Other components
- Books website
- Titanic dataset source
- Support requester
- Sentence embedding model
- OpenAI language model
Connections 24
- Books website → Scrape and clean: provides pages
- Scrape and clean → Cleaned books CSV: writes cleaned data
- Build SQLite database → Cleaned books CSV: reads
- Build SQLite database → Books database: writes
- SQL and Pandas analysis → Books database: queries
- Titanic dataset source → EDA and cleaning: provides dataset
- EDA and cleaning → Raw Titanic data: writes raw copy
- EDA and cleaning → Cleaned Titanic data: writes cleaned data
- EDA and cleaning → EDA visualizations: writes visualizations
- Modeling and evaluation → Cleaned Titanic data: reads
- Modeling and evaluation → Models and results: writes models and results
- Finalize model → Models and results: loads tuned model
- Finalize model → Cleaned Titanic data: loads sample data
- Finalize model → Best model pipeline: saves final pipeline
- Support requester → FastAPI endpoints: submits question
- FastAPI endpoints → Intent and answer workflow: runs graph
- Intent and answer workflow → FastAPI endpoints: returns answer
- Embed and ingest policies → Policy documents: reads documents
- Embed and ingest policies → Sentence embedding model: encodes documents
- Embed and ingest policies → Policy vector store: upserts embeddings
- Intent and answer workflow → Sentence embedding model: encodes query
- Intent and answer workflow → Policy vector store: queries policies
- Intent and answer workflow → Policy prompt: builds prompt
- Intent and answer workflow → OpenAI language model: generates answer