ScholarLens is a comprehensive research intelligence platform that ingests research papers, builds dynamic knowledge graphs, and provides multi-audience explanations, trend forecasts, and interactive exploration tools. It serves as a full research intelligence system that organizes, explains, predicts, and teaches.
- Frontend/Backend: Streamlit (Python)
- Database: PostgreSQL with SQLAlchemy ORM
- AI/NLP: Google AI Studio (Gemini) or OpenAI for summaries, Q&A, and content generation
- Visualization: Plotly, NetworkX
- PDF Processing: pdfplumber
- Search: TF-IDF based semantic search with scikit-learn
- APIs: arXiv API, PubMed API for paper fetching
/
├── app.py # Main Streamlit application
├── models.py # SQLAlchemy database models
├── utils/
│ ├── __init__.py
│ ├── pdf_processor.py # PDF text extraction and processing
│ ├── ner_extractor.py # Named Entity Recognition for methods/datasets
│ ├── openai_helper.py # OpenAI API integration
│ ├── semantic_search.py # TF-IDF based semantic search
│ ├── graph_builder.py # Knowledge graph construction
│ ├── analytics.py # SQL analytics and reporting (8+ reports)
│ ├── arxiv_pubmed.py # arXiv and PubMed API integration
│ ├── topic_modeling.py # Topic clustering and LDA
│ ├── trend_forecasting.py # Time-series trend analysis
│ └── export_utils.py # Export to Markdown, LaTeX, BibTeX, CSV
├── .streamlit/
│ └── config.toml # Streamlit configuration
└── attached_assets/ # Uploaded files
- Upload multiple PDF research papers
- Automatic text extraction and entity recognition
- Semantic and entity-based search
- arXiv and PubMed API integration for fetching open-access papers
- Auto-clustering of papers by topic using TF-IDF and K-means
- Interactive visualization of papers, methods, datasets, and authors
- Concept dependency maps (DAGs) showing method prerequisites
- Co-authorship network analysis
- Collaboration opportunity detection
- RAG-powered question answering with OpenAI
- Source citations for every answer
- Saved query history
- Expert (technical) summaries
- Student (with analogies) summaries
- Policymaker (applications & risks) summaries
- Policy brief generation with structured reports
- Cross-domain analogy generation
8+ SQL analytical reports:
- Top co-authorship pairs by publication count
- Trending topics over time
- Papers per institution
- Research growth by field
- Top authors by publication frequency
- Most used datasets
- Collaboration network density
- Emerging methods in multiple domains
Trend Forecasting Features:
- Time-series analysis of method/dataset popularity
- Identification of emerging and declining methods
- Predictive trajectory visualization
- Key insights extraction
- Flashcard generation from paper content
- Quiz generation with multiple choice questions
- Personalized study roadmaps based on method prerequisites
- Reading lists with priority and status tracking
- Note-taking on papers
- Literature review export in multiple formats:
- Markdown
- LaTeX
- BibTeX
- Plain Text
- CSV
- papers: Research papers with title, abstract, content, year, DOI, source
- authors: Author names with h-index and citations
- institutions: Research institutions with type and location
- methods: Research methods/techniques with category and usage count
- datasets: Datasets with domain and usage count
- paper_authors: Many-to-many between papers and authors
- paper_methods: Many-to-many between papers and methods
- paper_datasets: Many-to-many between papers and datasets
- author_institutions: Many-to-many between authors and institutions
- method_prerequisites: Self-referential for method dependencies
- paper_chunks: Text chunks for RAG (semantic search)
- flashcards: Generated flashcards for learning
- notes: User notes on papers
- saved_queries: Saved Q&A history
- reading_list: User's reading list with priorities
DATABASE_URL: PostgreSQL connection string (auto-configured)GOOGLE_API_KEY: Google AI Studio API key (FREE - recommended)OPENAI_API_KEY: OpenAI API key (alternative, paid)
Note: If both keys are set, Google AI Studio is used by default.
streamlit run app.py --server.port 5000- Search papers by query and category
- Fetch paper metadata (title, abstract, authors, year)
- Support for all arXiv categories (cs.AI, cs.LG, cs.CL, etc.)
- Search biomedical research papers
- Fetch abstracts and metadata
- MeSH term extraction
- November 2025: Initial full implementation
- All 12 core MVP features implemented
- 8+ SQL analytical reports added
- arXiv/PubMed API integration
- Topic clustering with TF-IDF + K-means
- Trend forecasting with linear regression
- Multi-format export (Markdown, LaTeX, BibTeX, CSV)
- Interactive knowledge graph visualization
- RAG-powered Q&A system with OpenAI
- Server binds to 0.0.0.0:5000
- Uses st.rerun() instead of deprecated experimental_rerun
- PostgreSQL database with SQLAlchemy ORM
- No Docker/containerization (Nix environment)
- AI features support Google AI Studio (free) or OpenAI (paid)
- Google AI Studio uses Gemini 2.0 Flash model
- OpenAI uses GPT-4o-mini model