← Back to work
MiniAug 2026Developer

Astronomy Object Chat Assistant

General-purpose chatbots can make up details about a specific star. This assistant answers questions about the 50 brightest named stars in the HYG database using only the records it retrieves, and tells you when a star or fact is not in its data.

A short build to test a full retrieval-augmented generation (RAG) pipeline from data to chat interface.

PythonLangChainStreamlitChroma
+4 moreGemini APIpandasHYG stellar databaseRAG
Astronomy Object Chat Assistant preview

The problem

Ask a language model about a specific star and it can produce a fluent answer that nothing supports. For someone learning astronomy that is hard to spot and easy to repeat. This assistant is built so that every answer comes from a record in its dataset, and a missing record produces an honest "I don't have that" instead of a guess.

How it answers

pandas turns a subset of the HYG stellar database into one document per star, converting distance from parsecs to light-years, and Chroma stores the vectors. A question is embedded with gemini-embedding-001, the four most similar star records come back, and gemini-3.6-flash writes the answer from those records and the recent conversation. System-prompt guardrails keep it inside the retrieved context, and a Streamlit chat keeps session history so follow-up questions make sense.

What it leaves out, on purpose

It runs over a fixed, curated dataset, with no live SIMBAD or Exoplanet Archive calls, no shared deployment and no per-user rate limiting. Those were kept out of scope to finish within the deadline of the Hacktiv8 x AVPN course on LLM-based tools and the Gemini API, for which this was the final project. The aim was to prove the retrieval-and-guardrail pattern in isolation before it goes near a larger system.

Where it leads

The assistant is a decoupled prototype for a future chat layer on top of Taraka Sutra. The pattern it proves, answer only from retrieved records and say so when nothing is retrieved, is the one that would carry over.