Back to Research Tool Source Code — Gated Access

Epstein Files RAG Pipeline

A production-grade retrieval-augmented generation system indexing the full corpus of declassified DOJ Epstein documents. Pipeline scripts and source code available upon request.

3,363,251
Vectors Indexed
2.4M
Pages Processed
384
Embedding Dims
all-MiniLM-L6-v2
Embedding Model
Pinecone FastAPI sentence-transformers IDrive e2 Docker Render.com
System Architecture
Data Pipeline (pipeline/) Raw DOJ PDFs → OCR text extraction → Chunking (512 tokens, 64 overlap)
→ all-MiniLM-L6-v2 embeddings → Pinecone (3,363,251 vectors, 384 dims)
→ Full text → SQLite corpus DB → IDrive e2 S3
↓
RAG Backend (backend/backend.py) FastAPI — deployed on Render.com (always-on, no cold starts)
• Embeds queries with all-MiniLM-L6-v2
• Searches Pinecone for top-8 relevant passages (cosine similarity)
• Streams LLM responses via OpenAI-compatible API
• Serves full document text from SQLite corpus
• Auto-downloads corpus DB from IDrive e2 on first boot
↓
Web Interface Vanilla HTML/CSS/JS — served directly by FastAPI
• Light-themed research chat interface
• Streaming AI responses with source citations
• Expandable source cards with passage text
• "View Full Document" modal with page navigation
• Clickable DOJ PDF links in citations
Tech Stack
Vector searchPinecone serverless, cosine similarity
Embeddingssentence-transformers all-MiniLM-L6-v2 (384 dims)
LLMOpenAI-compatible streaming API
BackendPython FastAPI + uvicorn
Document storageSQLite (local) + IDrive e2 S3 (cloud)
HostingRender.com (Docker, always-on)
PipelinePython — PDF ingestion, chunking, embedding, migration
Repository Structure
epstein-files-rag/
├── README.md
├── pipeline/ ← One-time data pipeline (gated)
│ ├── README.md ← Step-by-step pipeline instructions
│ ├── local_indexer.py ← Build vector index from corpus
│ └── migrate_to_pinecone.py
├── backend/ ← Python FastAPI RAG server
│ ├── README.md
│ ├── backend.py ← FastAPI server + HTML interface
│ ├── Dockerfile
│ └── render.yaml
└── requirements.txt

The pipeline/ directory — including PDF ingestion, chunking, embedding generation, and Pinecone migration tools — is available upon approved request.

Data Sources
Corpusrhowardstone/Epstein-research-data — pre-extracted OCR text from the DOJ Epstein Files corpus
Original docsU.S. Department of Justice — Epstein Files Transparency Act releases
Embedding modelsentence-transformers/all-MiniLM-L6-v2 (384 dimensions, Apache 2.0)

Request Source Access

Pipeline scripts and full source code available for researchers, journalists, and developers. Requests reviewed within 2–3 business days.

Request received.
Thank you — your access request has been submitted. You will be contacted within 2–3 business days.

Requests reviewed within 2–3 business days

Direct Contact

Dr. Tapang Ivo Tanku
PhD in Data Science — Chomsky Tanku Consulting
chomskytanku.com/contact

Live Demo Available

Try the fully functional research assistant — no account required.

Open Research Tool