Technical Implementation

Enhanced RAG System

Your Intelligent Research Assistant for PDFs - Production-ready system with comprehensive documentation

What It Does in Plain English

This system acts like a specialized search engine for your own PDF documents. It reads, understands, and answers your questions with precise, source-verified information.

1

Reads PDFs

Ingests and comprehends the content of your documents.

2

Remembers

Stores information in an intelligent vector database.

3

Answers

Finds relevant context to answer your specific questions.

4

Shows Sources

Provides exact page and location for every piece of data.

Two Powerful Ways to Use It

Whether you need instant answers or a comprehensive report, the system adapts to your workflow.

Interactive Mode (Chat)

A real-time, conversational interface for exploring your documents. Ask questions and get immediate, sourced answers.

  • Perfect for learning and discovery
  • Immediate feedback loop
  • Shows page numbers and locations

Batch Mode (Report)

Automatically processes a list of questions and saves all answers to a structured file for later analysis.

  • Ideal for comprehensive analysis
  • Run large jobs unattended
  • Generates shareable reports

Understanding System Capacity

While there's no hard limit on the number of PDFs, performance depends on document size and available hardware resources.

Estimated Processing Time per PDF

GPU Memory Limit

5-10

Large PDFs (100+ pages)

System Memory Limit

10-20

Medium PDFs (10-50 pages)

Test Benchmark

1,737

Nodes from 5 PDFs

Quick Start on the HPC

Follow these four steps to get the system up and running on the Dartmouth HPC cluster.

Step 1: Upload Files

Transfer scripts and PDF documents to your project directory on the HPC using `scp`.

Step 2: Setup Environment

Run the setup script to create the Conda environment and install all necessary packages.

bash setup_env.sh

Step 3: Test the System

Launch an interactive session or submit a batch job to process your documents and queries.

srun --partition=gpuq ... bash
sbatch run_batch.slurm

Step 4: Verify Results

Check the output logs and results directory for generated answers, sources, and performance statistics.

System File Structure

A well-organized project with core logic, documentation, and versioned archives for maintainability.

Core System

  • interactive_rag.py
  • batch_rag.py
  • setup_env.sh
  • run_interactive.sh
  • run_batch.slurm

Documentation

  • README_RAG_SYSTEM.md
  • RAG_SOLUTION_WORKING.md
  • RAG_DEPLOYMENT_GUIDE.md
  • UPLOAD_AND_RUN.md

Archive

  • rag_versions/
  • VERSION_HISTORY.md
  • debug_scripts/