FAANG-Caliber Deep Research & Multimodal Hybrid RAG Copilot for Scientific Literature
Concurrent Dense/Sparse Hybrid Retrieval • Reciprocal Rank Fusion ($k=60$) • Claim-Level Citations[Doc, p. X]• Cross-Document Contradiction Engine • SaaS Rate Limiting • 1-Click CLI & Docker Compose
+-------------------------------------------------------------------------+
| 1. STREAMING INGESTION & PARSING |
| Academic PDF (100+ pages / Scanned) ---> pdf_parser.py (Page Slicing) |
+------------------------------------+------------------------------------+
|
+-------------------+-------------------+
| |
v v
+--------------------------------+ +--------------------------------+
| Dense Embeddings (Concurrent) | | Sparse Lexical (Concurrent) |
| Google text-embedding-004 | | rank-bm25 (BM25Okapi) |
| ChromaDB HNSW Vector Store | | Inverted Token Index |
+----------------+---------------+ +----------------+---------------+
| |
+-------------------+-------------------+
|
v
+-------------------------------------------------------------------------+
| 2. PARALLEL HYBRID RETRIEVAL & RANK FUSION |
| User Query ---> ThreadPoolExecutor(max_workers=2) |
| Formula: RRF(d) = SUM[ 1 / (60 + rank_m(d)) ] ===> Reranked Passages |
+------------------------------------+------------------------------------+
|
v
+-------------------------------------------------------------------------+
| 3. DEEP RESEARCH & CROSS-DOCUMENT REASONING AGENT |
| - Claim Extraction with Exact Badges: [Doc Title, p. Y] |
| - Cross-Validation & Contradiction Detection between Manuscripts |
| - Comparative Matrix Synthesis & LaTeX BibTeX Citation Export |
+------------------------------------+------------------------------------+
|
v
+-------------------------------------------------------------------------+
| 4. SAAS MONETIZATION & USAGE RATE LIMITER |
| Token-Bucket Middleware: Free Tier (5 req/hr) vs Pro Tier (Unlimited) |
| Endpoints: POST /api/query, POST /api/deep-research, GET /api/usage |
+-------------------------------------------------------------------------+
ResearchMind AI incorporates an enterprise token-bucket rate limiter that identifies users by API Key, Session ID, or IP:
| Feature | Free Tier | Pro Tier (X-Subscription-Tier: pro) |
|---|---|---|
| Query Quota | 5 queries / session window | Unlimited |
| Retrieval Engine | Concurrent Dense + Sparse (RRF, |
Concurrent Dense + Sparse (RRF, |
| Claim-Level Badges |
[Doc, p. X] page-level badges |
[Doc, p. X] page-level badges |
| Deep Research Agent | Cross-document claim validation | Full cross-document reasoning + contradiction engine |
| LaTeX BibTeX Export | Included | Included |
| Rate-Limit Enforcement | HTTP 429 with retry header | None (unrestricted throughput) |
ResearchMind AI is packaged with standard pyproject.toml exposing the researchmind console script.
pip install -e .# Query literature with claim citations
researchmind search --query "attention mechanism and sparse transformers" --top-k 6
# JSON output for automated pipelines
researchmind search --query "Navier-Stokes physics neural networks" --format jsonresearchmind deep-research --topic "Physics-Informed Neural Networks and Flow Fields"researchmind server --host 0.0.0.0 --port 8000 --reloaddocker compose up --build -d- Operations & Search UI: http://localhost:8501
- FastAPI OpenAPI Swagger: http://localhost:8000/docs
- ChromaDB Standalone Vector Database: http://localhost:8001
- Usage Telemetry: http://localhost:8000/api/usage
Standard reciprocal rank fusion fuses disjoint or overlapping ranking lists without requiring score normalization:
Where:
$$M = {\text{dense_chroma}, \text{sparse_bm25}}$$ -
$k = 60$ (standard smoothing factor) -
$\text{rank}_m(d)$ is the 1-indexed position of chunk$d$ in system$m$ .
Execute the full automated test suite:
PYTHONPATH=. pytest tests/ -v-
test_rrf_fusion.py: RRF mathematical formula ($k=60$ ), parallel dense/sparse search, ties, and edge cases. -
test_rate_limiter.py: Free Tier quota exhaustion (429 on 6th request), Pro Tier bypass, and/api/usagetelemetry. -
test_deep_research.py: Autonomous claim extraction, contradiction detection, and comparative matrix synthesis. -
test_rag.py: PDF cleaning, page-boundary preservation, 100+ page documents, and strict grounding. -
test_api.py: End-to-end FastAPI endpoint contracts (/api/health,/api/query,/api/compare,/api/documents).
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/query |
Hybrid RAG query with parallel Chroma/BM25, RRF, and page citations |
POST |
/api/deep-research |
Cross-document reasoning, claim verification, and contradiction detection |
POST |
/api/compare |
Structured multi-dimensional comparison matrix across manuscripts |
GET |
/api/usage |
SaaS query quota, active tier, and token consumption metrics |
POST |
/api/upload |
Ingests PDF research papers with page-level chunking |
POST |
/api/extract-bibtex |
Generates standardized LaTeX BibTeX citation entry |
GET |
/api/health |
Diagnostic health status and vector store chunk count |
Apache License 2.0. Authored by Chunduri Sushen.