Spaces:
Sleeping
Sleeping
metadata
title: ML Research Paper RAG Chatbot
emoji: π€
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 8501
tags:
- streamlit
- machine-learning
- research
- rag
- chatbot
pinned: false
short_description: AI-powered chatbot for ML research papers
π ML Research Paper RAG Chatbot
An intelligent research assistant that helps you discover, understand, and explore Machine Learning research papers from ArXiv using Retrieval-Augmented Generation (RAG).
π― What is this?
This chatbot uses advanced AI to help you:
- π Find relevant research papers on any ML topic
- π Get detailed explanations from published research
- π‘ Understand complex concepts with cited sources
- π Stay updated with ML research trends
β¨ Features
- Multi-LLM Support: Choose between Anthropic Claude, Google Gemini, or Groq
- Smart Retrieval: FAISS vector store with semantic search and reranking
- Research-Focused: Only provides answers based on actual papers (no hallucinations)
- Citation-Backed: All responses cite source papers with metadata
- Interactive UI: Clean Streamlit interface with helpful guides
π Quick Start Guide
For First-Time Users
- Start a conversation by typing a question in the chat box
- Try example queries using the quick action buttons
- Explore results by expanding the "View Retrieved Documents" section
- Adjust settings in the sidebar for fine-tuned results
Example Queries
β
Find papers on handling imbalanced datasets
β
What methods are used for fraud detection in ML?
β
Explain the attention mechanism in transformers
β
List recent papers about reinforcement learning
β
How does batch normalization improve training?
π‘ Tips for Best Results
Ask Better Questions
- β Be specific: "fraud detection in credit cards" > "fraud"
- β Use ML terminology: "convolutional neural networks" > "image AI"
- β Ask for comparisons: "Compare CNN vs RNN for sequences"
Understand the Responses
- π All answers are based on research papers in the database
- π Check "View Retrieved Documents" to see sources
- β οΈ If documents seem irrelevant, try rephrasing
Advanced Usage
- βοΈ Adjust retrieval settings (base_k, rerank_k) for more/fewer papers
- π¨ Switch LLM providers for different response styles
- π Filter by year or category for focused results
ποΈ Dataset
Uses CShorten/ML-ArXiv-Papers from Hugging Face:
- Curated Machine Learning research papers from ArXiv
- Includes titles, abstracts, metadata, and citations
- Regularly updated with new publications
βοΈ Configuration
LLM Providers
Anthropic Claude (Recommended for quality)
- claude-3-5-sonnet-20241022 (Best balance)
- claude-3-5-haiku-20241022 (Fast)
Google Gemini (Good for free tier)
- gemini-2.5-flash (Fast and efficient)
Groq (Fastest inference)
- llama-4-maverick-17b (Open source)
Retrieval Settings
- base_k: Initial papers fetched (4-30, default: 20)
- rerank_k: Final papers after reranking (1-12, default: 8)
- Dynamic k: Auto-adjust based on query
- Reranking: Improve relevance with cross-encoder
π§ Setup (For Developers)
Prerequisites
pip install -r requirements.txt
API Keys
Create a .env file:
ANTHROPIC_API_KEY=your-key-here
GEMINI_API_KEY=your-key-here
GROQ_API_KEY=your-key-here
Run Locally
streamlit run streamlit_app.py
π How It Works
- User Query β Semantic embedding created
- Vector Search β FAISS retrieves similar papers
- Reranking β Cross-encoder scores relevance
- LLM Generation β AI generates answer from papers
- Response β Cited answer with source papers
π Important Notes
- β Answers are based only on research papers in the database
- β System won't make up information from general knowledge
- β If no relevant papers found, it will tell you
- β Not a replacement for reading the full papers
- β οΈ Always verify critical information with original sources
π€ Contributing
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
π License
This project is open source and available under the MIT License.
Ready to explore ML research? Start by asking a question! π