# NeuroLens Knowledge Retrieval Engine

A document retrieval-augmented generation system that can run entirely client-side in the browser or as a FastAPI and FAISS backend, with fair-share retrieval across multiple uploaded documents and LaTeX math rendering.

NeuroLens is a Retrieval-Augmented Generation platform for ingesting, indexing and querying multiple documents, offered in two execution modes: a zero-backend standalone mode that runs entirely in the browser, using PDF.js for PDF parsing, Mammoth for DOCX, BM25 ranking and IndexedDB persistence, suited to static hosting such as GitHub Pages; and a full-stack hybrid mode with a FastAPI server using SentenceTransformers (all-MiniLM-L6-v2) embeddings and a FAISS vector database for dense semantic search.

Fair-share round-robin retrieval spreads retrieved passages across all active documents so long files do not crowd out shorter ones, with context quotas that scale with library size. Cross-document summarization pulls abstracts, body sections and conclusions from every uploaded file when asked to summarize or compare documents, and a structured catalog of file names, page counts and synopses is injected into the system prompt for inventory awareness. Uploaded PDFs also render LaTeX math, including display and inline equations, matrices and integrals.

Built with a React frontend and a FastAPI backend. MIT licensed.

Website: https://udityamerit.github.io/NeuroLens-Knowledge-Retrieval-Engine/
