Notebook-RAG is a RAG application that lets you organize documents into separate notebooks, automatically process them, and chat with them using various LLM providers. It has been tested with software engineering papers from this GitHub repository, but you can use it with any text, markdown, or PDF files.
What is this about? (Purpose)
Notebook-RAG solves the problem of organizing and interacting with multiple document collections through a conversational interface. It enables users to:
Create and manage separate notebooks for different document collections or projects
Upload and automatically embed documents and store them in a vector database
Chat with documents using state-of-the-art retrieval-augmented generation
Configure different LLM providers based on needs and availability
This tool is designed for researchers, knowledge workers, and developers who need to interact with multiple document collections through natural language.
Why does it matter? (Value/Impact)
Notebook-RAG addresses several key challenges in document management and retrieval:
Information Overload: Helps users extract relevant information from large document collections through natural language queries
Context Organization: Allows separation of different document contexts into distinct notebooks
Flexibility: Supports multiple LLM providers, allowing users to choose based on performance, cost, or privacy requirements
Persistence: Maintains document organization and processing status across sessions
Efficiency: Prevents redundant processing of documents, saving time and computational resources
Unlike single-context RAG applications, Notebook-RAG's multi-notebook architecture enables users to maintain separate document contexts for different projects or domains, improving retrieval relevance and reducing context confusion.
Features
Multiple Notebooks: Create and manage separate notebooks for different document collections
Document Upload: Upload PDF, TXT, and MD files with automatic organization into notebook-specific directories
Automatic Processing: Document extraction, chunking, and embedding with intelligent status tracking
Persistent Storage:
ChromaDB vector collections for document embeddings
SQLite database for notebook and file metadata
Organized file storage in notebook-specific directories
Interactive Chat: Natural language interaction with documents using RAG
Multi-LLM Support: Configure and switch between LLM providers:
Groq (default cloud provider)
Ollama (local models for privacy and offline use)
Technical Architecture
Notebook-RAG follows a modular, object-oriented architecture that separates concerns and enables easy maintenance and extension:
Core Components
Document Processing Pipeline
Extracts text from various document formats using specialized extractors
Chunks text into manageable segments using LangChain text splitters
Embeds chunks using Sentence Transformers for semantic search
Vector Store Management
Interfaces with ChromaDB for efficient vector storage and retrieval
Maintains separate collections per notebook for context isolation
Implements robust deletion with multi-step fallback strategies
Conversation Management
Abstracts LLM provider interfaces for consistent API access
Implements provider-specific initialization and API calls
Handles prompt construction and response generation
Database Management
Maintains notebook and file metadata in SQLite
Tracks processing status to prevent redundant operations
Enforces data integrity with proper validation
File System Management
Organizes uploaded files in notebook-specific directories
Implements robust file operations with proper error handling
This ensures persistence across application restarts and prevents reprocessing of already processed files.
License
This application is open-source and is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. See the LICENSE file for details.