Kirtan001/satellite-rag
๐ฐ๏ธ Space Satellite Assistant: Intelligent Data Expert
   
Space Satellite Assistant is a Retrieval-Augmented Generation (RAG) system designed to democratize access to complex satellite specifications. It transforms unstructured technical data from Gunter's Space Page into a structured, queryable knowledge base, allowing users to ask natural language questions about satellite orbits, operators, and technical payloads.
๐ Problem Statement
Satellite data is often fragmented across nested web directories, PDF datasheets, and inconsistent HTML tables. For researchers and enthusiasts, finding specific technical details (e.g., "What is the resolution of Gaofen-1?") requires navigating deep page hierarchies and manually parsing unstructured text.
The Solution: An end-to-end data engineering pipeline that scrapes, structures, and indexes this data into a semantic search engine, powered by a Large Language Model (LLM) for accurate, grounded answers.
๐๏ธ System Architecture
The system follows a modern ETL + RAG architecture:
graph LR
A[Web Source] -->|BeautifulSoup Scraper| B(Structured JSON)
B -->|Recursive Splitting| C[Markdown Chunks]
C -->|BGE-Small Embeddings| D[ChromaDB Vector Store]
E[User Query] -->|Similarity Search| D
D -->|Retrieved Context| F[Llama-3 LLM]
F -->|Grounded Answer| G[Streamlit UI]๐ ๏ธ Tech Stack & Methodology
1. Data Acquisition (The Scraper)
- Tools:
BeautifulSoup4,Requests - Challenge: The source site has a 4-level deep hierarchy (Country -> Category -> Satellite List -> Detail Page).
- Strategy: Implemented a robust crawler that traverses the tree, handling varying table structures for specifications and launch history.
- Output: A clean, unified
satellites_detailed.jsonserving as the ground truth.
2. Knowledge Base (The Index)
- Vector Store: ChromaDB (Local, persistent).
- Embeddings:
BAAI/bge-small-en-v1.5(Optimized for retrieval performance vs. latency). - Chunking:
- Converted raw JSON to Markdown to preserve structural semantics (Headers, Lists).
- Used
RecursiveCharacterTextSplitterwithchunk_size=1000to maintain context window integrity. - Enrichment: Injected satellite names into every chunk to prevent "context drifting" during retrieval.
3. Inference Engine (The Brain)
- Model: Llama-3.3-70b (via Groq API).
- Reasoning: Selected for its high reasoning capability and fast inference speed on the Groq LPU.
- Prompt Engineering: Strict system prompts enforce "answer only from context" to minimize hallucinations, critical for technical data.
4. Deployment (DevOps)
- Containerization: Fully Dockerized application ensuring reproducibility.
- Self-Healing: Implemented a "lazy-build" mechanism. On a fresh cloud instance (stateless), the system detects a missing index and automatically rebuilds it from the source JSON on startup.
๐ Live Demo
Experience the agent in action on Hugging Face Spaces:
๐ [Kirtan001/satellite-rag](https://huggingface.co/spaces/Kirtan001/satellite-rag)
Created by Kirtan
