Skip to content

Senimtra/starstuff-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Professor Starstuff πŸš€βœ¨

Professor Starstuff

🌌 Bringing Astronomy to Life for Kids

Professor Starstuff is a multimodal AI chatbot that makes learning about space fun and interactive for children. This chatbot leverages natural language processing, vector-based retrieval, and podcast-style responses to engage young minds with fascinating space facts.


πŸ”₯ Features

  • 🧠 Natural Language Processing (NLP): Understands and responds to kids' astronomy questions.
  • πŸ“š Vector-based Knowledge System: Retrieves accurate space facts from YouTube video transcripts.
  • πŸ“‘ NASA Image API: Fetches real images of celestial objects for better visualization.
  • πŸŽ™οΈ Podcast-Style Responses: Generates engaging storytelling audio from text-based answers.
  • πŸ—‚οΈ ChromaDB Integration: Efficient search and retrieval of astronomy knowledge.
  • πŸ”Š OpenAI TTS: Converts text responses into audio format.
  • πŸš€ Deployabled on Heroku: Django-based backend with an HTML/CSS/JavaScript frontend.

πŸ—οΈ Tech Stack

Backend:

  • 🟒 Django - Main backend framework
  • πŸ”΅ SQLite (ChromaDB) - Vector database for storing astronomy facts
  • πŸ”΄ Redis - Cloud memory storage for conversation context
  • 🟣 Heroku - Deployment platform

AI & Retrieval:

  • πŸ€– GPT-4 & GPT-3.5 Turbo - Language models for chatbot responses
  • πŸ“Œ ChromaDB - Vector storage for RAG (Retrieval-Augmented Generation)
  • πŸ“‘ NASA API - Fetches real space images
  • πŸ”Š OpenAI TTS - Text-to-speech for podcast-style responses

Frontend:

  • 🌐 HTML, CSS, JavaScript - Simple, interactive UI
  • 🎨 Bootstrap - Styling framework

πŸ“Š Dataset & Processing

Professor Starstuff is built on a dataset extracted from YouTube astronomy video transcripts:

  1. Transcript Extraction: Uses youtube_transcript_api to fetch video transcripts (~8 hours of content).
  2. Chunking Strategy:
    • Chunk size: 500 tokens
    • Overlap: 100 tokens for better context retention
  3. Vector Embeddings:
    • Uses text-embedding-3-large from OpenAI for high-quality embeddings.
  4. Storage:
    • Stored in ChromaDB with metadata (e.g., video titles) for efficient retrieval.

πŸ“‘ System Architecture

  1. User Input: Professor Starstuff processes questions and determines if they are related to astronomy.
  2. Decision Making (GPT-4):
    • If the question is astronomical, it proceeds to retrieval.
    • If general, it provides a direct response.
  3. Retrieval & Response Generation:
    • ChromaDB fetches relevant facts.
    • NASA Image API retrieves space-related images.
    • OpenAI TTS converts responses into audio.
  4. Final Output:
    • Provides a text response, space images, and an audio podcast snippet.
LangGraph Analysis

πŸš€ Deployment

Django + ChromaDB on Heroku

  1. Clone the repository:
    git clone https://github.com/Senimtra/astronomy-bot.git
    cd astronomy-bot
  2. Install dependencies:
    pip install -r requirements.txt
  3. Run the application locally:
    python manage.py runserver
  4. Deploy to Heroku:
    heroku create professor-starstuff
    git push heroku main

πŸ“ˆ Evaluation & Optimization

Professor Starstuff is continuously evaluated using LangSmith:

  • ⚑ Inference Time: Measures response speed.
  • πŸ“š Retrieval Efficiency: Ensures accurate fact retrieval.
  • πŸ”§ Tool Efficiency: API calls (NASA, ChromaDB, OpenAI TTS).
  • πŸ“Š Model Selection:
    • GPT-4: Best for decision-making.
    • GPT-3.5 Turbo: Faster for general responses.
LangSmith Evaluation

🌟 Future Improvements

  • πŸ“‘ Live Space Event Integration: Fetch real-time astronomy news.
  • πŸ”Š Voice Interaction: Enable full voice-based conversation.
  • πŸ›  Streaming Responses: Faster and smoother podcast delivery.
  • πŸŽ“ Educational Quizzes: Make learning more interactive.
  • πŸ‘€ User Profiles: Personalize experience based on learning history.

πŸŽ‰ Thanks for Exploring with Professor Starstuff!

Made with πŸ’™ for young space explorers! 🌠

About

An AI chatbot that makes space fun for kids with astronomy facts, images, and podcast-style responses. πŸŒŒπŸŽ™οΈπŸŒ 

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors