Super RAG
A Modular Multi-Phase Retrieval-Augmented Generation (RAG) Engine Built for multimodal reasoning, hybrid retrieval, and structured answer synthesis.
Overview
Super RAG is a fully modular Retrieval-Augmented Generation system that combines:
Text Retrieval
Knowledge Graph Reasoning
Vector Database Search
Visual Retrieval
Speech-to-Text Processing
Reranking & Answer Synthesis
Unlike traditional RAG systems that follow a simple embed β retrieve β generate flow, Super RAG introduces a structured, multi-layer pipeline designed for deeper reasoning and reduced hallucination.
Architecture Input (Text / Audio / Visual) β Phase 2: Perception Layer - Speech to Text - Vision Language Processing β Phase 3: Knowledge Graph Construction β Phase 4: Vector & Visual Retrieval β Phase 5β7: Hybrid Retrieval Engine β Phase 8: Reranking β Phase 9: Answer Synthesis Project Structure Super_Rag/ β βββ app.py βββ app4.py β βββ phase2a_stt.py βββ phase2b_vlm.py β βββ phase3_kg.py β βββ phase4_vector_db.py βββ phase4_visual_db.py β βββ phase5_rag_engine.py βββ phase6_text_kg_retrieval.py βββ phase7_visual_retrieval.py β βββ phase8_rerank.py βββ phase9_answer_synthesis.py β βββ splicer.py
Each phase is modular and can be executed independently.
Features
Modular architecture
Multimodal input support
Knowledge graph integration
Hybrid text + structured retrieval
Reranking for improved precision
Structured answer synthesis
Easily extendable
Installation
- Clone Repository git clone https://github.com/consolelogram/Super_Rag.git cd Super_Rag
- Create Virtual Environment python -m venv venv source venv/bin/activate
- Install Dependencies pip install -r requirements.txt
If requirements.txt is missing:
pip freeze > requirements.txt Environment Configuration
Create a .env file in the root directory:
OPENAI_API_KEY=your_api_key VECTOR_DB_URL=your_vector_database_url KG_ENDPOINT=your_knowledge_graph_endpoint
Add any additional API keys required for speech or vision models.
Running the System Run Main Application python app.py
or
python app4.py Running Individual Phases Speech-to-Text python phase2a_stt.py --input audio.wav Knowledge Graph Construction python phase3_kg.py --input text.txt Vector Retrieval python phase4_vector_db.py --query "Explain Super RAG" Reranking python phase8_rerank.py Final Answer Synthesis python phase9_answer_synthesis.py Core Concepts
- Multimodal Perception
Processes text, audio, and visual inputs.
- Knowledge Graph Reasoning
Extracts entities and relationships for structured retrieval.
- Semantic Vector Search
Uses embeddings for contextual similarity search.
- Hybrid Retrieval
Combines:
Vector results
Knowledge graph results
Visual retrieval results
- Reranking
Improves precision using scoring and cross-encoder logic.
- Answer Synthesis
Generates structured, grounded responses using retrieved evidence.
Use Cases
Enterprise knowledge assistants
Research document reasoning
Multimodal AI systems
Hackathon demos
Advanced RAG experimentation
Video or visual RAG extensions
Extending the Project
You can:
Integrate FAISS, Pinecone, or Weaviate
gtihub readme
Here is a clean, professional GitHub-ready README.md formatted properly for GitHub rendering:
π Super RAG
A Modular, Multi-Phase Retrieval-Augmented Generation (RAG) Engine
Super RAG is a structured, multi-layer RAG system that combines semantic search, knowledge graphs, multimodal processing, reranking, and answer synthesis into one extensible pipeline.
Unlike traditional RAG systems that follow a simple:
Embed β Retrieve β Generate
Super RAG introduces a multi-phase reasoning architecture:
Perception β Knowledge Structuring β Hybrid Retrieval β Reranking β Answer Synthesis π Features
π§ Modular multi-phase architecture
π Vector database retrieval
π Knowledge graph construction & traversal
π Speech-to-text support
πΌ Vision-language processing
π Reranking for higher precision
π Structured answer synthesis
π§ Easily extensible
π Architecture Input (Text / Audio / Visual) β Phase 2: Perception Layer - Speech to Text - Vision Language Model β Phase 3: Knowledge Graph Construction β Phase 4: Vector & Visual Retrieval β Phase 5β7: Hybrid Retrieval Engine β Phase 8: Reranking β Phase 9: Answer Synthesis π Project Structure Super_Rag/ β βββ app.py βββ app4.py β βββ phase2a_stt.py βββ phase2b_vlm.py β βββ phase3_kg.py β βββ phase4_vector_db.py βββ phase4_visual_db.py β βββ phase5_rag_engine.py βββ phase6_text_kg_retrieval.py βββ phase7_visual_retrieval.py β βββ phase8_rerank.py βββ phase9_answer_synthesis.py β βββ splicer.py
Each phase is independently runnable and modular for experimentation.
βοΈ Installation 1οΈβ£ Clone the Repository git clone https://github.com/consolelogram/Super_Rag.git cd Super_Rag 2οΈβ£ Create Virtual Environment python -m venv venv source venv/bin/activate 3οΈβ£ Install Dependencies pip install -r requirements.txt
If requirements.txt does not exist:
pip freeze > requirements.txt π Environment Setup
Create a .env file in the root directory:
OPENAI_API_KEY=your_api_key VECTOR_DB_URL=your_vector_db_url KG_ENDPOINT=your_kg_endpoint
Add any additional API keys required for speech or vision APIs.
or
python app4.py π§ͺ Running Individual Phases Speech-to-Text python phase2a_stt.py --input audio.wav Knowledge Graph Construction python phase3_kg.py --input text.txt Vector Retrieval python phase4_vector_db.py --query "Explain Super RAG" Reranking python phase8_rerank.py Answer Synthesis python phase9_answer_synthesis.py π§ Core Concepts Multimodal Perception
Processes text, audio, and visual data.
Knowledge Graph Reasoning
Extracts entities and relationships for structured retrieval.
Semantic Search
Uses embeddings to retrieve contextually similar data.
Hybrid Retrieval
Combines vector search + knowledge graph + visual retrieval.
Reranking
Improves answer quality using scoring and filtering.
Answer Synthesis
Generates grounded, structured responses from retrieved evidence.
π Use Cases
Enterprise knowledge assistants
Multimodal AI systems
Research document reasoning
Hackathon prototypes
Advanced RAG experimentation
π§ Extending Super RAG
You can easily:
Replace vector DB with FAISS, Pinecone, or Weaviate
Integrate Neo4j for graph storage
Add local LLMs (LLaMA, Mistral, etc.)
Add streaming or agent-based reasoning
Each phase is isolated to support experimentation and research.
π€ Contributing
Fork the repository
Create a new feature branch
Commit changes
Open a pull request
Please ensure:
Clean modular code
No hardcoded API keys
Updated documentation