PaperLens AI
Autonomous AI Research Co-Pilot & Literature Engine
PaperLens AI is an autonomous, full-stack AI research orchestrator designed to transform unstructured academic literature into structured, actionable research outputs. Features a dual-pipeline RAG architecture (in-memory BM25 + FAISS hybrid search for instant single-session analysis, paired with remote Supabase pgvector persistence for cross-session synthesis), a multi-provider fallback engine, real-time Server-Sent Events (SSE) citation tracking, and an autonomous ReAct agent loop with Model Context Protocol (MCP) server support. Engineered specifically for production memory constraints (500MB cap compliant) through generator-based stream parsing, lazy-loaded vector models, and turn-compressed prompt optimization.

Dual-Pipeline RAG & ReAct Agent Loop with Deterministic Fast-Path Routing
Direct keyword pattern matcher skips the LLM router call for single-intent queries (e.g. dataset lookup, literature search).
Consolidated dual-pass synthesis & critique into single LLM passes; batched multi-chunk summarization.
Turn 1 sends full tool JSON schemas; Turns 2–6 automatically compress tools into signature representations.
Generator-based PyMuPDF stream parsing combined with lazy-loaded SentenceTransformer vector models.
Strict Pydantic v2 schemas (ReActDecision, SynthesisResult) with structured XML tag enforcement.
Automatic 4-stage search fallback (DOI → Exact Match → Title → Loose Keyword) with rate-limit recovery.
Engineering Highlights
- Dual-Pipeline RAG (In-memory BM25 + FAISS hybrid search + Supabase pgvector)
- 54.5% API call reduction via batched single-pass synthesis & critique
- Deterministic Fast-Path Router saving ~1.5s latency per query
- 500MB free-tier heap memory cap compliance using generator stream parsing
- Autonomous ReAct Agent Loop with native Model Context Protocol (MCP) support