Final Report – AstroAI

Project Goals

The AstroAI project emerged from an intersection of artificial intelligence and astronomy, specifically targeting the domain of exoplanet habitability analysis.

The primary problem that AstroAI set out to solve were the significant gaps in raw astronomical data, which are ruining AI and human analysis of exoplanet habitability. Mainstream chatbots such as ChatGPT cannot infer automatically, therefore, they always say: “We need more information to find out”. AstroAI aims to break that barrier and successfully give a definitive answer/score.

AstroAI was conceived as a solution that could make access to exoplanet habitability analysis simpler. First and foremost, the project aimed to provide instant, AI-powered analysis of exoplanet habitability factors, eliminating the need for users to perform complex calculations or possess specialized knowledge of astronomical data interpretation. By leveraging artificial intelligence to process and analyze data from sources like the NASA Exoplanet Archive, AstroAI could offer immediate insights that would otherwise require significant time and expertise to generate.

Another critical goal was making complex astronomical data accessible through natural language interaction. Rather than requiring users to navigate complicated interfaces or understand technical query languages, AstroAI was designed to accept simple, conversational questions like “How habitable is TRAPPIST-1 e?” or “Find planets similar to Earth.” This natural language approach significantly lowers the barrier to entry for exploring exoplanet science, making it accessible to a much wider audience.

Visualization represented another key goal of the project. Scientific data about exoplanets—such as orbital parameters, temperature ranges, and comparative metrics—can be difficult to conceptualize from raw numbers alone. AstroAI aimed to transform this abstract data into intuitive visual representations that could immediately convey important habitability factors. These visualizations would help users develop an intuitive understanding of what makes a planet potentially habitable and how different exoplanets compare to one another and to Earth.

Project Contraints

AstroAI was designed for a diverse range of users, presenting significant constraints on the interface design, language complexity, and depth of information provided. The system needed to be simultaneously sophisticated enough for researchers and educators while remaining approachable for students and the general public.

Furthermore, AstroAI was developed within a relatively tight two-month timeframe. This compressed schedule created significant constraints on the project’s scope and implementation approach. With only eight weeks from conception to completion, time management and prioritization was essential in completing the project. It also necessitated efficient development practices, with minimal time available for extensive prototyping or multiple major revisions.

Beyond user diversity and time limitations, AI capabilities was also a massive constraint. The project initially aimed to create a fully custom AI model specifically trained on exoplanet data. However, this approach proved too ambitious given the time constraints and technical complexity involved. Instead, the project pivoted to leveraging existing AI models through the Ollama API, with customization provided through carefully crafted system prompts rather than custom model training.

Project Expectations

At its foundation, AstroAI was designed to function as an interactive chatbot that could respond to queries about exoplanet habitability. Users could ask questions about specific exoplanets (e.g., “What is the habitability of Kepler-186 f?”), request comparative analyses (e.g., “Find planets similar to Earth”), or seek explanations of habitability factors (e.g., “Why is Kepler-186 f habitable?”). The system would then process these queries, analyze relevant astronomical data, and provide informative responses.

Process

The project began with an ambitious and vague vision: creating/inventing an specialized AI that can infer. However, early in the development process, it became clear that this approach would be impractical within the two-month timeframe. Training a specialized AI model would require extensive datasets, significant computational resources, and specialized expertise in machine learning—all of which exceeded my abilities. This realization prompted a critical pivot in the development approach.

Rather than developing a custom AI model from scratch, I decided to shift my attention into leveraging existing language models through the Ollama API, with customization provided through a carefully crafted system prompt (which sometimes the AI STILL doesn’t follow). This approach maintained the core functionality—AI-powered analysis of exoplanet habitability—while significantly reducing development complexity and time requirements.

The development of the backend Flask API proceeded relatively smoothly, though not without challenges. Debugging the API integration consumed more time than initially anticipated, particularly in handling edge cases where the AI responses didn’t perfectly match the expected format (which caused the entire response to fall on its head). The JSON system needed structured data for visualizations, but language models sometimes produced inconsistent output formats. The solution involved both refining the system prompt to emphasize format requirements and implementing parsing logic in the backend that could handle minor variations in response structure.

The frontend development process revealed its own set of challenges. Creating an intuitive chat interface was straightforward, but developing the visualization components required more specialized expertise(which is where I spent most of my time).

Testing revealed additional challenges, particularly around edge cases in user queries. While the system handled straightforward questions about known exoplanets well, it sometimes struggled with ambiguous queries or questions about very recently discovered exoplanets not covered in its training data. I addressed this by refining the system prompt to include better handling of uncertainty and clearer communication.

User feedback during testing and our trip to the University of Victoria highlighted the importance of the visualization components. Early users found the early AI visuals (only text) quite annoying to understand, prompting me to allocate most of my time around that after our trip.

Solution Design

AstroAI was designed as an integrated web application that combines natural language processing, AI-powered analysis, and visualizations to make exoplanet habitability analysis accessible to diverse users.

At its core, AstroAI employs a client-server architecture with a clear separation between frontend and backend components. The backend is built using Flask, a lightweight Python web framework that provides the necessary API endpoints and handles communication with the Ollama AI service. This Flask server processes user queries, formats them appropriately with a specialized system prompt, sends them to the AI model, and then parses and structures the responses before returning them to the frontend.

The frontend is developed using React, a modern JavaScript library for building user interfaces. This component provides an intuitive chat interface where users can enter natural language queries about exoplanet habitability. The React application handles user input, displays AI responses, and renders appropriate visualizations based on the response type. The frontend communicates with the backend through API calls, sending user queries and receiving structured responses that include both textual information and data for visualizations.

The AI processing is handled through integration with the Ollama API, which provides access to powerful language models capable of understanding and responding to complex queries about exoplanet habitability. Rather than training a custom AI model—which would have exceeded the project’s time and resource constraints—AstroAI leverages existing models through Ollama, with customization provided via a carefully crafted system prompt that guides the AI’s responses.

This system prompt represents a critical design element, essentially functioning as the “brain” of AstroAI. It instructs the AI to respond to queries about exoplanet habitability by synthesizing available data, considering factors like stellar properties, orbital parameters, and physical characteristics. The prompt also specifies a structured JSON response format that enables the system to generate both natural language explanations and data for visualizations.

The visualization components form another key aspect of the solution. AstroAI includes several specialized visualization types:

  1. Temperature Range Visualization: Displays equilibrium temperature data for exoplanets, contextualizing it within ranges relevant to habitability.
  2. Similarity Graph: Shows how similar various exoplanets are to a reference planet (often Earth), helping users understand relative habitability potential.
  3. Orbital Path Visualization: Illustrates the orbital positions of planets relative to their star’s habitable zone, providing intuitive understanding of a critical habitability factor.
  4. Planet Explanation Visualization: Presents key planetary characteristics that influence habitability in a visually accessible format.

Final Words

I apologize for the wordy blog, but I appreciate you future readers for coming along with me in my journey of the STEM world.

HERE is the github link to my progress if you want to take a look at it (everything is in the folder + download Ollama).

Hanger out.



Comments

One response to “Final Report – AstroAI”

  1. mcrompton Avatar
    mcrompton

    You talk a great game, Felix! This project sounds amazing and it seems like you’ve done a ton of development work to get it to work. The big thing that is lacking is any kind of demonstration of the product itself. I hope to actually set up AstroAI using your GitHub repository, but that will take some time and will have to wait. This post would be more effective with at least screen shots of the working app. A link to an online version that a reader could interact with would be ideal, but I get that that would involve having webhosting set up to ensure it was available 24/7. I hope that you keep working on this project and I look forward to actually using it!

Leave a Reply

Your email address will not be published. Required fields are marked *