How aryanchougule/supportiq works
SupportIQ loads and validates a support-ticket CSV into DuckDB, then serves analytics through FastAPI and a mounted Gradio interface. For natural-language questions, the answer service asks Gemini for a schema-constrained plan, runs deterministic DuckDB queries or anomaly detection, and asks Gemini to explain the computed result. Separate REST routes expose health, summary, and anomaly results. The graph reflects the shown application wiring and README-described capabilities; the Gradio excerpt is partial, so unshown UI interactions are not inferred.
Main entry points: main.py App setup · gemini_client.py Gemini planner and explainer · answer_service.py Answer orchestration · database.py Ticket database
Components 17
Application entrypoints
- App setup
app/main.py - Query API
app/api/routes_query.py - Health and summary API
app/api/routes_health.py - Anomaly API
app/api/routes_anomaly.py - Gradio UI
app/ui/gradio_app.py
Ticket data
- CSV validation
app/data/validator.py - Ticket database
app/data/database.py
Query and answers
- Answer orchestration
app/services/answer_service.py - Query executor
app/services/query_executor.py
Anomaly analytics
- Anomaly detection
app/services/anomaly_service.py
Configuration and AI
- Gemini planner and explainer
app/llm/gemini_client.py - Planner prompts
app/llm/prompts.py - Query-plan schemas
app/llm/schemas.py - Application settings
app/core/config.py - Logging setup
app/core/logging_config.py
Other components
- User
- Google Gemini
Connections 24
- User → Gradio UI: asks questions
README.md - User → Query API: submits queries
README.md - User → Anomaly API: requests anomalies
README.md - App setup → CSV validation: loads CSV
app/main.py - App setup → Ticket database: loads tickets
app/main.py - App setup → Query API: mounts route
app/main.py - App setup → Health and summary API: mounts route
app/main.py - App setup → Anomaly API: mounts route
app/main.py - App setup → Gradio UI: mounts UI
app/main.py - App setup → Application settings: loads settings
app/main.py - App setup → Logging setup: sets up logging
app/main.py - Query API → Answer orchestration: calls answer
app/api/routes_query.py - Gradio UI → Answer orchestration: submits question
app/ui/gradio_app.py - Health and summary API → Ticket database: checks and summarizes
app/api/routes_health.py - Anomaly API → Anomaly detection: requests detection
app/api/routes_anomaly.py - Answer orchestration → Gemini planner and explainer: plans and explains
app/services/answer_service.py - Answer orchestration → Query executor: executes plan
app/services/answer_service.py - Answer orchestration → Anomaly detection: dispatches detection
app/services/answer_service.py - Gemini planner and explainer → Planner prompts: uses prompt
app/llm/gemini_client.py - Gemini planner and explainer → Query-plan schemas: validates plan
app/llm/gemini_client.py - Gemini planner and explainer → Application settings: uses settings
app/llm/gemini_client.py - Gemini planner and explainer → Google Gemini: requests plans and explanations
app/llm/gemini_client.py - Query executor → Ticket database: queries tickets
app/services/query_executor.py - Anomaly detection → Ticket database: reads tickets
app/services/anomaly_service.py