How vinayakpnandi/insightai works
InsightAI is a Streamlit analytics and decision-support application. Its main workflow takes an uploaded dataset through quality checks and profiling, then supports SQL analysis, visualization, automated model training, predictions, explainability, and business reporting. A separate document workflow ingests PDFs into a vector store for question answering. The graph follows documented capabilities and source-index references; unsampled implementation details are represented only where README capabilities support them, and their internal links are omitted when unverified.
Main entry points: app.py Streamlit App · service.py ML Analysis Service · sql_agent.py Natural-Language SQL · loader.py Dataset Loader
Components 24
Application
- Streamlit App
app.py
Dataset Analytics
- Dataset Loader
src/database/loader.py - Data Quality
src/tools/data_quality.py - Dataset Profiler
src/ml/profiler.py - SQLite Database
src/database/database.py - Natural-Language SQL
src/database/sql_agent.py - Schema Formatter
src/database/schema.py - Visualization
src/tools/visualizer.py
Machine Learning
- ML Analysis Service
src/ml/service.py - Model Training
src/ml/predictor.py - Preprocessing
src/ml/preprocessor.py - Candidate Models
src/ml/models.py - Leakage Analysis
src/ml/leakage.py - Feature Importance
src/ml/explainability.py - Interactive Prediction
src/ml/prediction.py - Business Insights
src/ml/business_insights.py
Document Q&A
- PDF Ingestion
src/rag/ingest.py - Document Loading
src/rag/document_loader.py - Vector Store
src/rag/vector_store.py - Embeddings
src/rag/embeddings.py - Document Retriever
src/rag/retriever.py - Document Q&A
src/rag/qa.py
Other components
- Analyst
- Local Ollama LLM
Connections 27
- Analyst → Streamlit App: uses
README.md - Streamlit App → Dataset Loader: loads datasets
app.py - Dataset Loader → Data Quality: checks quality
src/database/loader.py - Dataset Loader → SQLite Database: writes dataset
README.md - Streamlit App → Natural-Language SQL: submits questions
app.py - Natural-Language SQL → Schema Formatter: formats schema
src/database/sql_agent.py - Natural-Language SQL → Local Ollama LLM: generates SQL
src/database/sql_agent.py - Natural-Language SQL → SQLite Database: executes query
src/database/sql_agent.py - Streamlit App → Visualization: requests charts
app.py - Streamlit App → ML Analysis Service: runs analysis
app.py - ML Analysis Service → Dataset Profiler: profiles data
src/ml/service.py - ML Analysis Service → Model Training: trains models
src/ml/service.py - ML Analysis Service → Leakage Analysis: checks leakage
src/ml/service.py - ML Analysis Service → Feature Importance: computes importance
src/ml/service.py - Model Training → Preprocessing: builds preprocessing
src/ml/predictor.py - Model Training → Candidate Models: selects candidates
src/ml/predictor.py - Streamlit App → Interactive Prediction: collects inputs
app.py - Streamlit App → Business Insights: requests report
app.py - Business Insights → Local Ollama LLM: generates report
src/ml/business_insights.py - Streamlit App → PDF Ingestion: ingests PDFs
app.py - PDF Ingestion → Document Loading: loads and splits
src/rag/ingest.py - PDF Ingestion → Vector Store: stores chunks
src/rag/ingest.py - Vector Store → Embeddings: uses embeddings
src/rag/vector_store.py - Streamlit App → Document Q&A: asks document questions
app.py - Document Q&A → Document Retriever: retrieves context
src/rag/qa.py - Document Q&A → Local Ollama LLM: answers question
src/rag/qa.py - Document Retriever → Vector Store: searches chunks
src/rag/retriever.py