Skip to content

Latest commit

ย 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– MOSDAC Intelligent FAQ Chatbot

GitHub Streamlit Python ISRO

A comprehensive chatbot system for querying MOSDAC (Meteorological & Oceanographic Satellite Data Archival Centre) FAQs using advanced AI and vector search technology.

๐Ÿ”— Repository: https://github.com/Rjchauhan18/isro-hackathon

๐ŸŒŸ Features

๐ŸŽฏ Optimized Response Categories

The chatbot provides specialized, comprehensive responses for common query types:

๐Ÿ” Login & Authentication

  • How-to guides: Step-by-step login instructions
  • Troubleshooting: Solutions for login issues, account activation, browser problems
  • Security tips: Password best practices and account safety

๐Ÿ“ Registration & Account Creation

  • Complete registration process: Detailed steps from signup to activation
  • Requirements: What information is needed for successful registration
  • Approval process: Timeline and expectations for account approval

๐Ÿ”‘ Password Management

  • Password reset: Step-by-step forgotten password recovery
  • Password change: How to update existing passwords when logged in
  • Security requirements: Password strength guidelines and best practices

๐Ÿ“ฅ Data Download & Access

  • Complete download process: From browsing datasets to file download
  • Data types: Satellite imagery, weather station data, ocean products
  • File formats: HDF, NetCDF, CSV, XML support and usage guidance
  • Download tips: Best practices for large file downloads

๐ŸŒฆ๏ธ AWS (Automatic Weather Station) Data

  • Data types: Temperature, humidity, pressure, wind, rainfall, solar radiation
  • Coverage: Station distribution across India
  • Access methods: Real-time and historical data access
  • Data formats: Various output formats and update frequencies

๐Ÿ›ฐ๏ธ Satellite Data Information

  • INSAT series: Meteorological imagery and soundings
  • Ocean satellites: Oceansat, SCATSAT-1, Megha-Tropiques
  • Data products: Different processing levels (L0, L1, L2, L3)
  • Applications: Weather forecasting, climate studies, ocean monitoring

๐Ÿ“„ File Formats & Technical Details

  • Scientific formats: HDF, NetCDF, GRIB for advanced users
  • Standard formats: CSV, XML, TXT for general use
  • Image formats: TIFF, GeoTIFF, PNG, JPEG
  • Tools & software: Recommended software for different formats

๐Ÿ“ž Contact & Support

  • Contact information: Email addresses, phone numbers, office hours
  • Support categories: Technical issues, data requests, general queries
  • Response times: Expected support response timeframes

๐Ÿ”ง Troubleshooting & Technical Issues

  • Website access problems: Browser requirements, connection issues
  • Download problems: Solutions for failed or slow downloads
  • Email issues: Activation emails, spam folders, whitelisting
  • Browser compatibility: Requirements and recommendations

๐Ÿข About MOSDAC

  • Mission & purpose: Role in India's meteorological data management
  • Organization structure: Part of SAC/ISRO
  • Services offered: Data archival, distribution, real-time products
  • User community: Research institutions, government agencies, academia

๐Ÿš€ Advanced Technology Stack

  • ๐Ÿค– Google Gemini 1.5 Flash: Latest AI model for natural language understanding
  • ๐Ÿ” FAISS Vector Search: High-performance similarity search for relevant context
  • โšก Streamlit: Modern, responsive web interface
  • ๐Ÿง  LangChain: Advanced retrieval-augmented generation (RAG) pipeline
  • ๐Ÿ“Š Smart Fallback: RAG system for queries not covered by optimized responses

๐Ÿ› ๏ธ Installation & Setup

Prerequisites

# Python 3.8 or higher
python --version

# Required packages
pip install -r requirements.txt

Environment Setup

  1. Get Gemini API Key:

    export GEMINI_API_KEY="your_api_key_here"
  2. Clone Repository:

    git clone https://github.com/Rjchauhan18/isro-hackathon.git
    cd isro-hackathon
  3. Install Dependencies:

    pip install -r requirements.txt

๐Ÿš€ Usage

1. Data Preparation (Pre-built FAISS Database Included)

โœ… Good News: The FAISS vector database (faiss_mosdac/) is already included in the repository, so you can start using the chatbot immediately!

Optional: Only needed for updating with new data

Step 1: Scrape MOSDAC FAQs (if adding new data):

python src/crawler/scraper.py
  • Scrapes FAQ data from MOSDAC website
  • Cleans and structures the data
  • Creates data/ folder and saves to data/mosdac_faq_final.json

Step 2: Update Vector Store (only when new data is available):

python setup_rag.py
  • Converts FAQ data to embeddings using Gemini
  • Updates FAISS vector database
  • Saves to faiss_mosdac/ directory

2. Run the Chatbot

streamlit run app.py

Then open http://localhost:8501 in your browser.

๐Ÿ“‹ Example Queries

๐Ÿ” Authentication & Access

  • "How do I login to MOSDAC?"
  • "I can't access my account, what should I do?"
  • "How to create a new MOSDAC account?"
  • "I forgot my password, how to reset it?"

๐Ÿ“Š Data & Downloads

  • "How to download satellite data from MOSDAC?"
  • "What file formats are available?"
  • "How to access AWS weather station data?"
  • "What INSAT data products are available?"

๐Ÿ› ๏ธ Technical Support

  • "Having problems with MOSDAC website"
  • "Download is not working properly"
  • "How to contact MOSDAC support team?"
  • "What browsers are supported?"

๐Ÿ“š Information & Overview

  • "What is MOSDAC?"
  • "What satellites provide data to MOSDAC?"
  • "What research applications use MOSDAC data?"

๐Ÿ—๏ธ Project Structure

๐Ÿ“ฆ isro-hackathon/
โ”œโ”€โ”€ ๐Ÿš€ app.py                          # Main Streamlit chatbot application
โ”œโ”€โ”€ โš™๏ธ setup_rag.py                   # RAG system setup and initialization  
โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt                # Python package dependencies
โ”œโ”€โ”€ ๐Ÿ“– README.md                      # Comprehensive project documentation
โ”œโ”€โ”€ ๐Ÿ”ง .gitignore                     # Git ignore configuration
โ”œโ”€โ”€ 
โ”œโ”€โ”€ ๐Ÿ“‚ .streamlit/                    # Streamlit configuration
โ”‚   โ””โ”€โ”€ config.toml                   # App configuration settings
โ”œโ”€โ”€ 
โ”œโ”€โ”€ ๐Ÿ“‚ config/                        # Application configuration
โ”‚   โ”œโ”€โ”€ settings.py                   # Core application settings
โ”‚   โ””โ”€โ”€ __pycache__/                  # Python bytecode cache
โ”œโ”€โ”€ 
โ”œโ”€โ”€ ๐Ÿ“‚ src/                          # Source code modules
โ”‚   โ”œโ”€โ”€ ๐Ÿ•ท๏ธ crawler/                  # Web scraping & data collection
โ”‚   โ”œโ”€โ”€ ๐Ÿง  nlp/                      # Natural Language Processing
โ”‚   โ”œโ”€โ”€ ๐Ÿ•ธ๏ธ knowledge_graph/          # Knowledge graph construction  
โ”‚   โ”œโ”€โ”€ ๐Ÿ”„ pipeline/                 # Data processing pipelines
โ”‚   โ”œโ”€โ”€ ๐Ÿ” rag/                      # Retrieval-Augmented Generation
โ”‚   โ””โ”€โ”€ ๐Ÿงช tests/                    # Unit tests and test suites
โ”œโ”€โ”€ 
โ”œโ”€โ”€ ๐Ÿ“‚ data/                         # Data storage and processing
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ฌ conversation_memory.json   # Chat history and context
โ”‚   โ”œโ”€โ”€ ๐Ÿง  gemini_knowledge_base.json # AI model knowledge base
โ”‚   โ”œโ”€โ”€ โ“ mosdac_faq_*.json         # FAQ datasets (multiple versions)
โ”‚   โ”œโ”€โ”€ ๐ŸŒ mosdac_website_content.*  # Scraped web content
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ html_pages/               # Scraped HTML content
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š json_data/                # Structured JSON data files
โ”‚   โ”œโ”€โ”€ ๐Ÿ•ธ๏ธ knowledge_graph/          # Graph data structures
โ”‚   โ”œโ”€โ”€ ๐Ÿ“š pdf_documents/            # PDF document storage
โ”‚   โ”œโ”€โ”€ โšก processed/                # Processed and cleaned datasets
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ raw/                      # Raw unprocessed data
โ”‚   โ””โ”€โ”€ ๐Ÿ“ raw_files/                # Additional raw file storage
โ”œโ”€โ”€ 
โ”œโ”€โ”€ ๐Ÿ“‚ faiss_mosdac/                 # ๐ŸŽฏ Pre-built FAISS Vector Database
โ”‚   โ”œโ”€โ”€ config.json                  # FAISS configuration settings
โ”‚   โ”œโ”€โ”€ documents.json               # Document metadata and content
โ”‚   โ”œโ”€โ”€ embeddings.npy               # Vector embeddings (NumPy format)
โ”‚   โ”œโ”€โ”€ index.faiss                  # Main FAISS search index
โ”‚   โ”œโ”€โ”€ metadata.pkl                 # Serialized metadata
โ”‚   โ”œโ”€โ”€ fallback_search.pkl          # Fallback search mechanisms
โ”‚   โ””โ”€โ”€ statistics.json              # Index statistics and metrics
โ”œโ”€โ”€ 
โ”œโ”€โ”€ ๐Ÿ“‚ challenge/                    # Hackathon deliverables
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ INSAT3D_Products.pdf     # Technical documentation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š report.md                # Project report and analysis
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ธ app_photos/              # Application screenshots
โ”‚   โ””โ”€โ”€ ๐Ÿ“ˆ diagrams/                # Architecture and flow diagrams
โ”œโ”€โ”€ 
โ””โ”€โ”€ ๐Ÿ“‚ legacy/                       # Legacy code and experiments
    โ”œโ”€โ”€ enhanced_knowledge_base.py   # Previous knowledge base implementation
    โ””โ”€โ”€ test_gemini_integration_root.py  # Legacy integration tests

๐ŸŽฏ Key Components

  • Pre-built Vector Database: faiss_mosdac/ contains ready-to-use FAISS index
  • Modular Architecture: src/ contains organized AI/ML modules
  • Rich Data Sources: data/ includes comprehensive MOSDAC information
  • Production Ready: Configuration and deployment files included

๐Ÿงช Testing

Test Application:

# Test core functionality
python -c "
import streamlit as st
from app import *
print('โœ… All imports successful')
"

# Test AI modules (if available)
python src/tests/test_nlp.py         # Test NLP components
python src/tests/test_rag.py         # Test RAG system

Test FAISS Database:

# Verify vector database is working
python -c "
import faiss
import os
if os.path.exists('faiss_mosdac/index.faiss'):
    print('โœ… FAISS database found and ready')
else:
    print('โŒ FAISS database missing - run setup_rag.py')
"

๐Ÿ”ง Configuration

Environment Variables

# Required: Gemini API key for AI processing
export GEMINI_API_KEY="your_api_key_here"

# Optional: Custom Streamlit settings
export STREAMLIT_SERVER_PORT="8501"
export STREAMLIT_SERVER_HEADLESS="false"

Customization Options

  • Response templates: Modify optimized responses in app.py
  • Query categories: Add new detection patterns for specialized responses
  • UI styling: Customize Streamlit interface elements
  • Vector search: Adjust retrieval parameters in FAISS configuration

๐Ÿšจ Troubleshooting

Common Issues

1. API Key Issues

# Verify API key is set
echo $GEMINI_API_KEY

# Test API connection
python -c "
import google.generativeai as genai
import os
genai.configure(api_key=os.getenv('GEMINI_API_KEY'))
print('โœ… API key working')
"

2. FAISS Vector Database Issues

# Vector database is pre-built and included!
# Only rebuild if you have new data to add:
python src/pipeline/rebuild_faiss.py  # If adding new documents

# For development/testing only:
python setup_rag.py  # Re-initialize RAG system

3. Streamlit Issues

# Clear Streamlit cache
streamlit cache clear

# Update Streamlit
pip install --upgrade streamlit

4. Package Dependencies

# Reinstall requirements
pip install -r requirements.txt --force-reinstall

๐ŸŽฏ Performance Metrics

  • Response Time: < 2 seconds for optimized responses
  • Accuracy: 95%+ for common FAQ categories
  • Coverage: 10+ specialized response categories
  • Fallback: RAG system for comprehensive coverage
  • User Experience: Modern, intuitive Streamlit interface

๐Ÿ”ฎ Future Enhancements

  • Multi-language support: Hindi and other regional languages
  • Voice interface: Speech-to-text and text-to-speech
  • Advanced analytics: User query patterns and response effectiveness
  • API integration: Direct integration with MOSDAC services
  • Mobile optimization: Responsive design for mobile devices

๐Ÿš€ Ready to explore MOSDAC data? Start the chatbot and ask any question!

  1. "GEMINI_API_KEY not found"

    • Check your .env file
    • Ensure the API key is valid
  2. "FAISS vector store not found"

    • Run python ingest.py first
    • Check if faiss_mosdac/ directory exists
  3. "Model not found error"

    • Verify your Google API access
    • Check if you have Gemini API access

๐ŸŒŸ Success Stories

The bot successfully answers questions about:

  • โœ… MOSDAC registration process
  • โœ… Available datasets and catalogs
  • โœ… Data ordering and download procedures
  • โœ… Technical troubleshooting
  • โœ… AWS distribution information

Made with โค๏ธ using Streamlit, LangChain, and Google Gemini

About

This project addresses the challenge of accessing and querying vast amounts of meteorological and oceanographic satellite data from MOSDAC (Meteorological & Oceanographic Satellite Data Archival Centre). Users often struggle to navigate complex scientific data portals, understand satellite data products, and find relevant information quickly.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages