FloatChat lets researchers ask questions like 'show me salinity profiles near the equator in 2015' and get real answers from oceanographic data: 79,934 records from 451 Argo floats spanning 23 years. Natural language goes in, validated SQL runs against PostgreSQL, and the results render as maps, depth profiles, and a 3D globe.
Architecture
Next.js frontend with a FastAPI backend. LangChain orchestrates Mistral 7B via HuggingFace for SQL generation, with Supabase providing PostgreSQL and vector storage for retrieval.
Features
Natural language to SQL over a scientific schema
Retrieval-augmented generation for contextual follow-up questions
ETL pipelines ingesting NetCDF datasets into PostgreSQL
Interactive 2D maps, 3D globe, and depth profile visualizations
Challenges & Solutions
Getting a 7B model to produce reliable SQL over a scientific schema. The answer was constraint: schema-aware prompting, query validation before execution, and retrieval of similar past queries as context.
Tradeoffs
A hosted 7B model instead of a frontier LLM. Slightly weaker generation, but predictable cost and latency, which matters when every chat message triggers inference.
Performance
The dataset is pre-processed once through the ETL pipeline, so queries hit indexed PostgreSQL tables instead of raw NetCDF files. Visualization data is shaped server-side to keep the client light.