high-performance RAG Pipeline for PDFs
Upload any PDF. Ask anything. Get cited, accurate answers in real time.
Limitless is a full-stack Retrieval-Augmented Generation (RAG) system. Drop in any PDF, and the system parses, chunks, and embeds it locally. You then chat with it through a streaming UI backed by Groq's LPU inference β the fastest available LLM API.
v2 goes further: hybrid keyword+vector search, a cross-encoder re-ranker, an AI agent with live web search, multi-document querying, auto-summaries, persistent memory, and citation highlights β all backed by an automated evaluation pipeline.
Neural Cognitive RAG Workspace: Interactive hybrid retrieval tuner (Dense 0.70 / Sparse 0.30 @ 18ms) and Groq LPU inference controller.
Corpus Management Drawer: Multi-document ingestion library, PDF vectorization pipeline, and document store status.
| Feature | Description |
|---|---|
| Hybrid Search | BM25 keyword + Pinecone vector search fused via Reciprocal Rank Fusion |
| Cross-Encoder Re-ranking | ms-marco-MiniLM-L-6-v2 re-ranks 15 candidates to top 5 |
| Agent Mode | ReAct agent with document search, live web search, and math tools |
| Multi-Document Search | Query across all uploaded PDFs simultaneously |
| AI Summaries | Auto 3-bullet summary generated on every upload |
| Persistent Memory | SQLite-backed conversation history survives page reloads |
| Citation Highlights | Expand any source chip to see the full retrieved passage |
| Model Fallback | Auto-switches llama-70b β llama-8b β gemma2 on rate limits |
| RAG Evaluation | Automated 10-question benchmark pipeline (current: 80%) |
| Streaming | Token-by-token streaming via Server-Sent Events |
| Layer | Technology |
|---|---|
| Frontend | Vite 5, React 18, TypeScript, Tailwind CSS, Zustand |
| Backend | FastAPI, Uvicorn, Python 3.11, aiosqlite |
| LLM | Groq Cloud llama-3.3-70b-versatile (LPU inference) |
| Embeddings | HuggingFace all-MiniLM-L6-v2 (runs locally, free) |
| Vector DB | Pinecone serverless (384-dim, cosine) |
| Keyword Search | rank-bm25 local index per document |
| Re-ranking | cross-encoder/ms-marco-MiniLM-L-6-v2 |
| Agent | LangChain ReAct + DuckDuckGo Search |
| Metadata DB | SQLite via aiosqlite |
- Python 3.11+ β python.org/downloads
- Node.js 18+ β nodejs.org
- Pinecone account (free) β pinecone.io
- Groq account (free) β console.groq.com (API key pre-filled for quick start)
# macOS / Linux
git clone https://github.com/Ares19v/limitless.git
cd limitless
chmod +x start.sh && ./start.sh# Windows
git clone https://github.com/Ares19v/limitless.git
cd limitless
INSTALL.bat :: First-time setup (run once)
Run_Project.bat :: Start the appThe launcher automatically:
- Creates a Python virtual environment
- Installs all backend dependencies (CPU-only torch)
- Installs frontend npm packages
- Copies
.env.exampleβ.envand prompts for API keys - Starts both servers and opens the browser
Windows scripts:
INSTALL.batβ First-time setup (run once)Run_Project.batβ Start both servers and open the browserUNINSTALL.batβ Remove local installation artifacts
git clone https://github.com/Ares19v/limitless.git
cd limitless
cp backend/.env.example backend/.env # Fill in your API keys
docker compose up --buildOpen http://localhost β the frontend proxies API calls to the backend automatically.
git clone https://github.com/Ares19v/limitless.git
cd limitlesscd backend
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Copy environment file
cp .env.example .envEdit backend/.env:
# Groq β pre-filled, works immediately
GROQ_API_KEY=gsk_...
# Optional: add more keys to rotate across on rate limits
GROQ_API_KEY_POOL=key1,key2,key3,key4
# Pinecone β required
PINECONE_API_KEY=your_key_here
PINECONE_INDEX_NAME=documindGetting your Pinecone key (2 minutes):
- pinecone.io β Sign Up β Dashboard β Create Index
- Name:
documindΒ· Dimensions:384Β· Metric:cosineΒ· Cloud:AWS us-east-1
- Name:
- Dashboard β API Keys β copy key β paste into
.env
β No OpenAI key needed. Embeddings run locally via HuggingFace (~90 MB, downloaded once on first run).
cd backend
PYTHONPATH=. .venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadcd frontend
npm install
npm run dev- Upload β drag a PDF onto the upload zone (max 50 MB)
- Wait β status shows
Processing β Ready(usually under 10 seconds) - Chat β type any question; the answer streams in real time with page citations
- Expand sources β click any source chip to read the exact retrieved passage
- Agent mode β toggle β‘ Agent to enable live web search and math tools
- All Docs β toggle π to search across every uploaded document at once
All endpoints are documented interactively at http://localhost:8000/docs
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Health check |
POST |
/api/v1/upload |
Upload a PDF |
GET |
/api/v1/documents |
List all documents |
GET |
/api/v1/documents/{id} |
Get document + AI summary |
DELETE |
/api/v1/documents/{id} |
Delete doc, vectors, index, history |
POST |
/api/v1/chat/{id} |
Standard RAG chat (SSE stream) |
POST |
/api/v1/chat/global |
Cross-document search (SSE stream) |
POST |
/api/v1/agent/{id} |
Agent mode with tools (SSE stream) |
GET |
/api/v1/history/{id} |
Get conversation history |
DELETE |
/api/v1/history/{id} |
Clear conversation history |
cd backend
PYTHONPATH=. .venv/bin/pytest tests/ -v --cov=app --cov-report=term-missingcd backend
PYTHONPATH=. .venv/bin/python scripts/eval.py ../your_document.pdfCurrent benchmark score: 8/10 (80%) β see EVALUATION_REPORT.md for full analysis.
limitless/
βββ .github/workflows/
β βββ ci.yml # GitHub Actions CI (backend + frontend)
βββ backend/
β βββ app/
β β βββ api/routes/ # upload, chat, global_chat, agent_chat, documents, history
β β βββ core/ # config (pydantic-settings), structured logging
β β βββ models/ # Pydantic request/response schemas
β β βββ services/
β β β βββ agent.py # LangChain ReAct agent (3 tools)
β β β βββ bm25_store.py # Local BM25 keyword index
β β β βββ document_store.py# SQLite (documents + chat history)
β β β βββ embeddings.py # HuggingFace local embeddings
β β β βββ key_manager.py # Groq key pool + model fallback
β β β βββ pdf_processor.py # PDF parsing + chunking
β β β βββ rag_chain.py # Full v2 pipeline + summaries
β β β βββ reranker.py # Cross-encoder re-ranker
β β β βββ vector_store.py # Pinecone + hybrid search + RRF
β β βββ utils/
β βββ scripts/
β β βββ eval.py # Automated RAG benchmark
β βββ tests/ # Pytest test suite
β βββ Dockerfile
β βββ .env.example
β βββ requirements.txt
β
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ ChatWindow/ # Agent mode, Global mode, citation drawer
β β β βββ FileUpload/
β β β βββ Layout/
β β β βββ Sidebar/ # AI summary panel
β β βββ hooks/ # useChat, useUpload, useDocuments
β β βββ lib/ # API client
β β βββ store/ # Zustand global state
β β βββ types/ # TypeScript interfaces
β βββ Dockerfile
β βββ package.json
β
βββ docker-compose.yml # Full stack with Docker
βββ INSTALL.bat # Windows first-time setup
βββ Run_Project.bat # Windows launcher
βββ UNINSTALL.bat # Windows cleanup
βββ start.sh # macOS/Linux one-click launcher
βββ CHANGELOG.md
βββ EVALUATION_REPORT.md
βββ LICENSE
βββ README.md
| Variable | Required | Default | Description |
|---|---|---|---|
GROQ_API_KEY |
β | pre-filled | Primary Groq API key |
GROQ_API_KEY_POOL |
β | Comma-separated keys for rotation | |
PINECONE_API_KEY |
β | β | Pinecone API key |
PINECONE_INDEX_NAME |
documind |
Pinecone index name | |
LLM_MODEL |
llama-3.3-70b-versatile |
Primary Groq model | |
EMBEDDING_MODEL |
all-MiniLM-L6-v2 |
Local embedding model | |
CHUNK_SIZE |
1000 |
Characters per PDF chunk | |
CHUNK_OVERLAP |
200 |
Overlap between chunks | |
TOP_K_RESULTS |
5 |
Final results after re-ranking | |
MAX_UPLOAD_SIZE_MB |
50 |
Max PDF size | |
ALLOWED_ORIGINS |
http://localhost:5173 |
CORS origins |
| Variable | Default | Description |
|---|---|---|
VITE_API_BASE_URL |
http://localhost:8000 |
Backend URL |
Pull requests are welcome. For major changes, please open an issue first.
# Fork β clone β create branch
git checkout -b feat/your-feature
# Make changes, then
git commit -m "feat: your feature description"
git push origin feat/your-feature
# Open PRΒ© 2026 Devansh Tyagi (Ares19v). All Rights Reserved.