Pinned Project

RAG notebook deep dive

LangChain-powered RAG notebook with FAISS, FLAN-T5, MiniLM embeddings, PDF ingestion, and conversational memory.

JUPYTER NOTEBOOK
Repository
Default branch
main
Last pushed
Dec 08, 2025

Technologies Used

  • LangChain: Chains the document loaders, splitters, vector store, and LLM.
  • Hugging Face (Transformers & Embeddings): google/flan-t5-large for generation; sentence-transformers/all-MiniLM-L6-v2 for embeddings.
  • FAISS: Vector database for fast semantic search over chunks.
  • PyMuPDF: Parses uploaded PDFs into text.
  • PyTorch: Backend for the Hugging Face models.
  • ipywidgets: Interactive UI inside the notebook.

Notebook Flow

  1. Setup: Installs dependencies, detects GPU.
  2. Data Ingestion: Uploads a PDF and splits text with RecursiveCharacterTextSplitter.
  3. Vector Database: Embeds chunks and stores them in FAISS.
  4. Model Initialization: Loads flan-t5-large and creates a text-generation pipeline.
  5. Basic RAG: Retrieves context and answers single-turn questions.
  6. Conversational Memory: Rewrites follow-ups into standalone questions to keep chat history coherent.
  7. Final Interface: Chat UI showing responses plus history.
Need more detail?
Happy to walk through the implementation or roadmap.