AI-based Help Bot for Information Retrieval from MOSDAC using a Knowledge Graph
Project description
Here's a professional, clean, and complete README.md for your ISRO HelpBot project, optimized for both GitHub and PyPI packaging:
# ๐ ISRO HelpBot
An AI-powered conversational assistant designed for information retrieval from ISRO's knowledge resources using a Knowledge Graph, Natural Language Processing (NLP), and semantic search. Built for the [ISRO Bharatiya Antariksh Hackathon 2025](https://www.isrohack.in/), this project aims to revolutionize access to space-related information.
---
## ๐ Features
- ๐ **Query Understanding**: Extracts intent and named entities from natural language queries.
- ๐ง **Knowledge Graph Builder**: Builds a semantic knowledge graph from `.txt`, `.pdf`, `.docx`, and `.xlsx` documents.
- ๐ **Geospatial Awareness**: Recognizes and links locations (e.g., "Bay of Bengal", "17ยฐN") from queries and documents.
- ๐ฌ **Frontend Chat UI**: Built using Streamlit with file upload and interactive conversation.
- โ๏ธ **Backend API**: FastAPI-powered backend to serve query results via RESTful endpoints.
- ๐ **Evaluation Metrics**: Real-time performance metrics to assess accuracy and responsiveness.
---
## ๐๏ธ Project Structure
ISRO HELPBOT/
โโโ __pycache__/ # Compiled Python bytecode
โโโ .vscode/ # VS Code settings for development
โ โโโ settings.json # Editor preferences and configurations
โ
โโโ api/ # FastAPI backend for handling API requests
โ โโโ __pycache__/
โ โโโ data/ # API-level data files (temporary or static)
โ โโโ static/ # Static assets for FastAPI (CSS, JS, etc.)
โ โโโ __init__.py # Marks directory as a Python package
โ โโโ main_api.py # Uvicorn entrypoint with FastAPI app instance
โ โโโ query_handler.py # Logic to handle and respond to queries via API
โ โโโ routes.py # API endpoint definitions and routing
โ
โโโ app/ # Supplementary app scripts
โ โโโ __pycache__/
โ โโโ main.py # Optional script for centralized app execution
โ
โโโ core/ # Chat logic and shared application functionality
โ โโโ __pycache__/
โ โโโ chat_engine.py # Core engine handling conversations and message flow
โ
โโโ data/ # Datasets and documents used in KG construction
โ โโโ clean_text/ # Cleaned versions of raw text documents
โ โโโ graph/ # Serialized Knowledge Graphs
โ โ โโโ knowledge_graph.pkl # Pickled NetworkX graph
โ โโโ html/ # Raw HTML files from scraped pages
โ โโโ mosdac_docs/ # Original documents (pdf/docx) from MOSDAC
โ โโโ mosdac_pages/ # Full saved MOSDAC HTML pages
โ โโโ raw_docs/ # Raw document input before cleaning
โ
โโโ raw_text/ # Preprocessed plain text documents
โ โโโ raw_docs # Raw text files for reference
โ โโโ test.text # Sample text used for testing
โ
โโโ evaluation/ # Evaluation scripts and outputs
โ โโโ eval_engine.py # Script for evaluating intent/entity/response performance
โ โโโ results/ # Output metrics and evaluation results
โ โโโ intent_results.json # JSON containing evaluation result details
โ โโโ false_positives.csv # Queries where intent classification failed
โ โโโ eval_summary.png # Bar chart visualization of evaluation metrics
โ
โโโ ingestion/ # Document parsing and scraping modules
โ โโโ docx_extractor.py # Parse and extract text from .docx
โ โโโ dynamic_scraper.py # Scrape JavaScript-rendered MOSDAC pages
โ โโโ html_scraper.py # Parse static HTML files
โ โโโ pdf_extractor.py # Extract content from PDFs
โ
โโโ intent_classifier/ # Intent classification model and routing
โ โโโ __pycache__/
โ โโโ __init__.py # Package initializer
โ โโโ intent_predictor.py # ML model that predicts user intent
โ โโโ intent_router.py # Maps intent labels to downstream task handlers
โ
โโโ isro_helpbot/ # Core pip-installable CLI module
โ โโโ __pycache__/
โ โโโ __init__.py # Package initializer
โ โโโ cli.py # CLI script to launch the bot via terminal
โ
โโโ kg_builder/ # Knowledge Graph construction modules
โ โโโ entity_extractor.py # Extracts named entities from documents/queries
โ โโโ relationship_mapper.py # Detects relationships among entities
โ โโโ response_generator.py # Forms responses from entities and graph traversal
โ โโโ text_preprocessor.py # Cleans, splits and processes raw text
โ
โโโ lib/ # External shared libraries (if any)
โ
โโโ model/ # Models and vector storage
โ โโโ __pycache__/
โ โโโ embedding_generator.py # Generates embeddings from textual input
โ โโโ faiss_store_docs.pkl # Serialized FAISS-compatible document store
โ โโโ faiss_store.index # FAISS binary index for fast semantic retrieval
โ โโโ kg_reasoner.py # Reasoning logic using KG + LLM
โ โโโ language_model.py # Wrapper for local or API-based language models
โ โโโ qa_pipeline.py # Complete pipeline from query to answer
โ โโโ vector_store.py # Vector DB abstraction for FAISS, Chroma, etc.
โ
โโโ tests/ # Unit and integration test scripts
โ โโโ test_intent_classifier.py # Tests for intent classification logic
โ โโโ test_kg.py # Tests for KG extraction and structure
โ โโโ test_scrapper.py # Tests for scraping functions
โ
โโโ ui/ # Streamlit-based frontend
โ โโโ __pycache__/
โ โโโ components/ # Streamlit component scripts (widgets, etc.)
โ โโโ static/ # Static images, graphs, etc.
โ โโโ templates/ # HTML templates (optional for hybrid UI)
โ โโโ index.html # Frontend base page
โ โโโ __init__.py # Marks UI as a package
โ โโโ streamlit_app.py # Streamlit chatbot UI interface
โ
โโโ venv/ # Python virtual environment (excluded from Git)
โโโ .env # API keys and environment variables
โโโ .gitignore # Exclude rules for Git
โโโ build_index.py # Builds FAISS index for semantic search
โโโ config.py # Centralized configuration file (e.g., paths, thresholds)
โโโ entrypoints.py # Unified entrypoints for CLI/API/Streamlit
โโโ LICENSE # License file (MIT in this case)
โโโ main.py # Optional main runner script
โโโ MANIFEST.in # Include non-Python files during packaging
โโโ mosdac_crawler.py # Crawler script to fetch data from MOSDAC
โโโ pyproject.toml # Modern Python packaging metadata
โโโ requirements.txt # Required dependencies for pip install
โโโ setup.py # Package installer configuration
Let me know if you want this as a downloadable .md or .txt file or integrated into your README.md.
---
## โ๏ธ Installation
```bash
pip install isro-helpbot
Or clone and run locally:
git clone https://github.com/Gaurav9693089415/ISRO-HelpBot.git
cd ISRO-HelpBot
pip install -e .
๐ Usage
๐ Launch Chatbot UI
isro-helpbot
This opens the Streamlit interface at http://localhost:8501/.
๐ Run Backend API
uvicorn backend.main:app --reload --port 8080
๐ Evaluation Metrics
Evaluation metrics like accuracy, precision, recall, and response latency are automatically logged and can be viewed in the Streamlit sidebar.
๐ Supported Document Types
.txtโ Plain text files.pdfโ Scanned and digital PDFs.docxโ Microsoft Word.xlsxโ Excel Sheets
Uploaded files auto-update the Knowledge Graph.
๐ป Technologies Used
| Category | Tools/Tech Stack |
|---|---|
| NLP | spaCy, NLTK, SentenceTransformers |
| KG + Search | NetworkX, FAISS, PyVis |
| UI | Streamlit |
| Backend | FastAPI, Uvicorn |
| Others | LangChain, OpenAI API, Selenium |
๐ฏ Objectives (As per ISRO Hackathon)
- Convert web portal content into machine-readable knowledge.
- Enable geospatial semantic search.
- Build a dynamic, AI-based helpbot interface.
- Provide API for external access to the system.
๐ Final Outcome
An end-to-end, modular AI HelpBot that:
- Parses ISRO content into a Knowledge Graph.
- Understands user questions contextually.
- Answers using accurate and semantically relevant data.
- Offers CLI + UI + REST API + pip packaging.
๐ก๏ธ License
MIT License. See LICENSE file.
๐ Acknowledgement
Special thanks to ISRO, IN-SPACe, and AICTE for organizing the Bharatiya Antariksh Hackathon 2025.
โจ Future Enhancements
- Voice interaction
- Image-based QnA using satellite maps
- Integration with live ISRO data streams
---
Let me know if you'd like me to:
- Add badges (PyPI, License, Build)
- Generate this as a downloadable file
- Translate it into Hindi (for local repo presentation)
Ready to proceed with packaging now?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isro_helpbot-1.0.0.tar.gz.
File metadata
- Download URL: isro_helpbot-1.0.0.tar.gz
- Upload date:
- Size: 17.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
599c25da5fd8edf8689c7305b241eb3ffc9df0e8f8f17951b6dcdd1b184caf63
|
|
| MD5 |
757b1ff09685838d74b7be3ddfeee125
|
|
| BLAKE2b-256 |
76897855d862a0f744f51410d006009e59aa605f85fb6c847b7f1cf68e373b95
|
File details
Details for the file isro_helpbot-1.0.0-py3-none-any.whl.
File metadata
- Download URL: isro_helpbot-1.0.0-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e46a40908d0f48dd5020b8f66aed1190da5eb7d2f76bfdcce24a6fb4651363c3
|
|
| MD5 |
f746323cd0a3cd95d3d19e8e9f1b018b
|
|
| BLAKE2b-256 |
b7a6ae16ce7a698eab4608bec6ce283094932de2ee40d3cb081e8dab9ca506aa
|