How udityamerit/neurolens-knowledge-retrieval-engine works
NeuroLens lets users add documents or webpages, retrieve relevant passages across a library, and ask questions answered by an LLM. Its browser-native workflow handles ingestion, BM25 retrieval, local persistence, and chat; an optional FastAPI/FAISS mode provides dense semantic retrieval. The interface also supports camera OCR, document previews, math rendering, voice input/output, and provider settings. The graph combines sampled source relationships with README-documented capabilities; some client integrations and backend internals are documented but not shown in source excerpts.
Main entry points: App.jsx App coordinator · ChatPanel.jsx Chat panel · rag_engine.py RAG engine · CameraModal.jsx Camera scanner
Components 23
Browser experience
- App coordinator
frontend/src/App.jsx - Library sidebar
frontend/src/components/Sidebar.jsx - Chat panel
frontend/src/components/ChatPanel.jsx - Provider settings
frontend/src/components/SettingsModal.jsx - Camera scanner
frontend/src/components/CameraModal.jsx - Document preview
frontend/src/components/DocPreviewModal.jsx - Author profile
frontend/src/components/AuthorModal.jsx
Client knowledge workflow
- Document ingestion
frontend/src/App.jsx - Fair-share BM25
frontend/src/utils/bm25Engine.js - IndexedDB storage
frontend/src/utils/indexedStorage.js - Storage fallback
frontend/src/utils/storage.js - Math rendering
frontend/src/components/MathRenderer.jsx
Hybrid backend
- REST API
backend/app.py - RAG engine
backend/rag_engine.py - FAISS index
backend/rag_engine.py - Text embeddings
backend/rag_engine.py
External services
- Groq LLM
- OpenAI LLM
- Hugging Face
- ElevenLabs TTS
Other components
- User
- Web Speech API
- Vision LLM
Connections 28
- User → Library sidebar: adds documents
README.md - Library sidebar → App coordinator: submits uploads
frontend/src/App.jsx - App coordinator → Document ingestion: extracts and chunks
README.md - App coordinator → Fair-share BM25: searches chunks
frontend/src/App.jsx - App coordinator → IndexedDB storage: persists library
frontend/src/App.jsx - IndexedDB storage → Storage fallback: falls back to
frontend/src/utils/indexedStorage.js - User → Chat panel: asks questions
README.md - Chat panel → App coordinator: submits query
frontend/src/App.jsx - App coordinator → Fair-share BM25: selects context
frontend/src/App.jsx - App coordinator → Chat panel: updates answers
frontend/src/App.jsx - Chat panel → Math rendering: renders messages
frontend/src/components/ChatPanel.jsx - Document preview → Math rendering: renders chunk text
frontend/src/components/DocPreviewModal.jsx - App coordinator → Document preview: opens preview
frontend/src/App.jsx - App coordinator → Provider settings: opens settings
frontend/src/App.jsx - App coordinator → Camera scanner: opens scanner
frontend/src/App.jsx - App coordinator → Author profile: opens profile
frontend/src/App.jsx - User → Camera scanner: scans pages
README.md - Camera scanner → Vision LLM: extracts image text
README.md - Chat panel → ElevenLabs TTS: requests speech
README.md - Chat panel → Web Speech API: fallback speech
README.md - App coordinator → Groq LLM: calls provider
README.md - App coordinator → OpenAI LLM: calls provider
README.md - App coordinator → Hugging Face: calls provider
README.md - App coordinator → REST API: optional hybrid request
README.md - REST API → RAG engine: delegates queries
backend/app.py - RAG engine → Text embeddings: embeds text
README.md - Text embeddings → FAISS index: indexes vectors
README.md - RAG engine → Groq LLM: generates answers
README.md