Skip to content

Case study · Conversational explorer for ARGO ocean data

Float-Chat

Ask questions about ARGO oceanographic data in plain English: a local LLM writes PostgreSQL/PostGIS queries using RAG context from ChromaDB, and a Streamlit dashboard plots the results. Built for Smart India Hackathon 2025.

By · Updated

Float-Chat dashboard answering “What are the nearest floats to Delhi, India?” and plotting ARGO float locations on a map

The problem

ARGO floats record temperature, salinity and pressure profiles across the world’s oceans, but the data is distributed as multidimensional NetCDF files that are hard to explore without both oceanography and programming experience.

Smart India Hackathon 2025 problem statement SIH25040, from the Ministry of Earth Sciences, asked for a conversational interface to this data. Float-Chat is my implementation: users, from researchers to policymakers, ask a question in plain English and get an answer, the underlying data and a visualisation.

Data pipeline

  • xarray opens each raw ARGO NetCDF file; the processor extracts temperature, salinity, pressure, time and location and flattens them into tables with pandas.
  • Rows are inserted in bulk into a PostgreSQL table with a PostGIS geometry column, so questions about locations become fast spatial queries.
  • For every float, a short plain English summary of its metadata is generated, embedded and stored in ChromaDB as retrieval context.

How a question is answered

  • The question is embedded and matched against the float summaries in ChromaDB (retrieval augmented generation, or RAG).
  • A prompt combining rules and examples for writing SQL, the database schema, the retrieved context and the question is sent to a locally served LLM through Ollama and LangChain.
  • The model returns a PostgreSQL query, which is executed against the database.
  • The results go back to the model for a summary in plain language, and the Streamlit dashboard shows the answer, a data table and Plotly charts: a geospatial map, depth profiles and time series.

Design decisions

  • Generating SQL instead of recalling numbers: the vector store only holds float metadata for context, while exact values come from SQL run against the measurements, so answers are computed from the data itself.
  • PostGIS for spatial questions such as “What are the nearest floats to this location?”.
  • Local and private: the model runs on the developer’s machine through Ollama, so there are no paid API keys and the data stays local.

Limitations and next steps

Float-Chat was built as a hackathon prototype and runs on a local machine with PostgreSQL and Ollama installed. The repository lists the next steps: exporting results to NetCDF and ASCII, adding more in situ datasets such as BGC floats, gliders and buoys, supporting satellite data, and caching frequent questions.