How vasanthraj13/ai-research-assistant works
AI Research Assistant is a web workspace for uploading research papers and running evidence-grounded academic analyses. The principal workflow is upload, extract and index papers, select/search the library, request an answer or analysis, then review the result. The README also documents summaries, comparisons, literature reviews, methodology and gap analysis, contradictions, visual/equation signals, idea generation, and knowledge graphs. Sampled code confirms frontend routing, upload and RAG calls, retrieval, answer generation, and citation handling; unsampled academic features are represented at their documented API boundary.
Main entry points: upload.py Upload endpoint · document_store.py Document store · app.py API application · HomePage.jsx Paper library
Components 22
Research workspace
- Workspace shell
frontend/App.jsx - PDF upload
frontend/components/UploadPanel.jsx - Paper library
frontend/pages/HomePage.jsx - Analysis results
frontend/pages/ResultPage.jsx
Flask API
- API application
backend/app.py - Upload endpoint
backend/routes/upload.py - Document search
backend/routes/documents.py - Question endpoint
backend/routes/rag.py - Academic endpoints
backend/routes/academic.py
Document intelligence
- PDF extraction
backend/services/pdf_loader.py - Text chunking
backend/services/chunking.py - Embedding
backend/services/embedding.py - RAG orchestration
backend/services/rag_pipeline.py - Passage retrieval
backend/services/retriever.py - Answer generation
backend/services/llm.py - Academic analysis
backend/services/academic_analysis.py
Persistence and identity
- Document store
backend/services/document_store.py - Authentication service
backend/services/auth_service.py - Local document database
backend/services/document_store.py
Other components
- Researcher
- MongoDB
- OpenAI
Connections 29
- Researcher → Workspace shell: uses
- Workspace shell → PDF upload: offers upload
- Workspace shell → Paper library: opens workspace
- Paper library → Analysis results: opens result
- PDF upload → Upload endpoint: sends files
- Paper library → Document search: searches papers
- Paper library → Question endpoint: asks question
- Paper library → Academic endpoints: requests analysis
- API application → Upload endpoint: dispatches
- API application → Document search: dispatches
- API application → Question endpoint: dispatches
- API application → Academic endpoints: dispatches
- Upload endpoint → PDF extraction: extracts text
- Upload endpoint → Text chunking: chunks text
- Upload endpoint → Embedding: creates vectors
- Upload endpoint → Document store: indexes papers
- Document search → Document store: searches papers
- Question endpoint → RAG orchestration: runs query
- RAG orchestration → Document store: loads chunks
- RAG orchestration → Passage retrieval: ranks passages
- Passage retrieval → Embedding: embeds query
- RAG orchestration → Answer generation: generates answer
- RAG orchestration → Document store: saves conversation
- Academic endpoints → Academic analysis: runs analyses
- Academic analysis → Document store: reads papers
- Document store → Local document database: reads and writes
- API application → Authentication service: authenticates users
- Authentication service → MongoDB: uses when available
- Answer generation → OpenAI: generates with