MiRAG: Multi-Input Retrieval-Augmented Generation
Project Description
MiRAG is a multi-modal RAG (Retrieval-Augmented Generation) tool built using Streamlit and LangChain. It enables interactive question-answering and summarization from diverse content sources: web pages, PDFs, YouTube videos, and custom text.
Features
- Web QA: Extracts and processes content from public URLs (JS and non-JS) for contextual Q&A and summarization
- PDF QA: Upload PDFs for question answering, summarization, and chat export via FPDF
- YouTube QA: Uses video transcripts for contextual queries and summarization
- Custom Text QA: Raw text input with temporary vector store creation and chat history export
- Chain routing and conditional fallback between direct LLM QA and RAG pipelines
- Dynamic chat memory using RunnableParallel for conversational context
Technical Stack
- Language: Python 3.10+
- Frameworks: LangChain, Streamlit
- Vector Store: FAISS
- LLM: Google Gemini API
- APIs: YouTube Transcript API
- Tools: FPDF, VS Code, Git, Google Colab
How It Works
- Scrape or load data from web, PDFs, videos, or raw text.
- Text is embedded into semantic vectors using Gemini embeddings.
- FAISS performs efficient chunk retrieval.
- LangChain routes queries to the appropriate retriever and LLM pipeline.