How this GPT Works
#Direct connection to three databases:
- supabase_postgres -> ODI cricket ball-by-ball (~2003-2025)
- neon_postgres -> T20 cricket ball-by-ball (~2005-2025)
- aiven_postgres -> Tour de France riders & stages (men: 1903-2025, women: 2022-2025)
Semantic layers are pre-mapped. GPT translates your question into SQL, executes silently, and explains results in plain language. Supports charts, aggregations, rankings, and detail lookups.
What It Can Do
#- Compute player stats: runs, strike rates, averages (ODI/T20)
- Generate rankings: top scorers, best bowlers, most wins
- Analyze Tour de France history: winners, distances, average speeds, jersey holders
- Create visualizations: bar charts, line charts, comparisons
- Always contextualizes answers by dataset coverage (e.g. ODI 2003-2025)
Important Note
ODI/T20 data = ball-by-ball but not every match globally. Tour de France = complete for men (1903-2025), women (2022-2025).
How to Use It
#- Click Chat Link (Custom GPT)
- Ask natural language questions:
- "Top 10 ODI strikers by runs off the bat?"
- "Tour de France winners 2015-2025 with avg speed?"
- Get results in tables + charts
- The GPT itself will guide you if the requested data is out of scope
Setup (for your own deployment)
#For full steps, see the README in the GitHub Repo link below.
Quick Overview
- Deploy FastAPI server (
app:app) - Set
.envwith your DB URLs + API Key - Update
CUSTOM_GPT_ACTION_SCHEMA.json-> server URL + API Key - Upload semantic layer files:
CRICKET_ODI_T20_DATA_SCHEMA.yamlCYCLING_TOUR_DE_FRANCE_SCHEMA.yaml
- Apply
CUSTOM_GPT_SYSTEM_INSTRUCTIONS.mdas system prompt - Connect action schema + knowledge files inside Custom GPT builder