An AI-powered personalized learning platform that discovers research papers from ArXiv and recommends free EdX courses. Uses reinforcement learning (LinUCB) to learn your preferences and improve recommendations over time.
β ArXiv Paper Discovery - Automatically searches and downloads relevant papers β EdX Course Recommendations - Curated free courses from top universities β LinUCB Algorithm - Context-aware reinforcement learning for personalization β LLM Summaries - Automatic summaries and keyword extraction for each item β Vector Database - ChromaDB for efficient similarity search β Beautiful Dashboard - Modern web interface with dark/light modes β Persistent Memory - Learns your preferences over time β Daily Automation - Optional scheduled daily curation β 100% Free - Uses only open-source tools and free APIs
learning-system/
βββ app.py # Main Flask backend (LinUCB + discovery)
βββ index.html # Web dashboard (HTML/CSS/JS)
βββ requirements.txt # Python dependencies
βββ setup.sh / setup.bat # Initial setup script
βββ run.sh / run.bat # Run the server
βββ data/ # Created automatically
βββ papers/ # Downloaded PDFs
βββ vector_db/ # ChromaDB embeddings
βββ user_preferences.json # Your ratings & preferences
# Make setup script executable and run it
chmod +x setup.sh
./setup.sh
# Then run the server
chmod +x run.sh
./run.sh# Run setup
setup.bat
# Then run the server
run.bat# Create virtual environment
python3 -m venv venv
# Activate it
source venv/bin/activate # Linux/Mac
# OR
venv\Scripts\activate.bat # Windows
# Install dependencies
pip install -r requirements.txt
# Run the app
python app.pyOnce setup is complete, just run:
Linux/Mac:
./run.shWindows:
run.batManual:
source venv/bin/activate # Activate environment
python app.py # Start serverI added a small manage.sh script to automate common tasks. From the project root run:
# Create venv and install dependencies
./manage.sh setup
# Start the app (prefers ./venv)
./manage.sh run
# Publish the current snapshot to GitHub (prefers SSH)
./manage.sh publish
# Quick syntax test
./manage.sh testThe repository also contains a GitHub Actions workflow that runs a quick Python syntax check on pushes and pull-requests to main.
Open your browser and go to:
http://localhost:5000
-
Enter Your Interests - Add 3-5 topics you want to learn about:
- Example:
machine learning,distributed systems,cryptography
- Example:
-
Get Recommendations - Click "Load Recommendations" to:
- Search ArXiv for papers
- Find matching EdX courses
- Get AI-generated summaries
- Extract key learning points
-
Rate & Learn - Rate each item (1-5 stars):
- System learns your preferences
- Next recommendations get better
- Ratings stored in your preferences
- Searches ArXiv API for papers matching your interests
- Searches EdX database for free courses
- Downloads paper metadata
- Generates embeddings using sentence-transformers
- Stores in ChromaDB vector database
- Extracts keywords and generates summaries
- LinUCB algorithm ranks items based on:
- Your past ratings
- Item similarity to your interests
- Exploration-exploitation balance
- Presents top 5 recommendations daily
- You rate items (1-5 stars)
- Ratings stored with timestamps
- Algorithm learns your preferences
- Next day: better recommendations
| Component | Technology | Why |
|---|---|---|
| Backend | Flask | Lightweight, simple |
| ML Algorithm | LinUCB Bandit | Context-aware recommendations |
| Embeddings | Sentence-Transformers | Fast, accurate (80MB model) |
| Vector DB | ChromaDB | Lightweight, persistent |
| Papers | ArXiv API | Free, comprehensive |
| Courses | EdX | Curated, free access |
| LLM | Gemini (free tier) | Optional summaries |
| Frontend | HTML/CSS/JS | No dependencies needed |
Main Python file with all system logic:
# Key Classes:
- VectorStore: ChromaDB vector database management
- PaperDiscovery: ArXiv searching
- CourseDiscovery: EdX course database
- LLMSummarizer: Summary and keyword extraction
- LinUCBArm / LinUCBPolicy: Reinforcement learning
- EnhancedSystem: Main orchestrator
- Flask app: Web API endpointsAPI Endpoints:
GET /- Dashboard HTMLPOST /api/setup- Initialize with topicsGET /api/get-recommendations- Get personalized recommendationsPOST /api/rate- Rate an item (1-5)GET /api/status- Get system status
Beautiful, modern web interface:
- Topic setup form
- Recommendation cards with:
- Paper/course titles
- AI-generated summaries
- Key learning keywords
- 5-star rating system
- Direct links to papers/courses
- Real-time status tracking
All Python dependencies:
flask # Web framework
arxiv # ArXiv paper search
chromadb # Vector database
sentence-transformers # Embeddings
numpy # Math operations
Total size: ~500MB (mostly models on first run)
Edit top of app.py if needed:
class Config:
MAX_PAPERS_PER_SEARCH = 8 # Papers per search
MAX_COURSES_PER_SEARCH = 5 # Courses per search
CONTEXT_DIM = 384 # Embedding dimension
ALPHA = 0.25 # LinUCB explorationEverything is stored locally in the data/ directory:
data/
βββ papers/ # Downloaded PDFs (optional)
βββ vector_db/ # ChromaDB embeddings
β βββ chroma.db # SQLite database file
βββ user_preferences.json # Your topics and ratings
All data is yours. No cloud uploads unless you configure an LLM API.
- Get free API key at: https://ai.google.dev
- Set environment variable:
export GEMINI_API_KEY="your-api-key" # Linux/Mac # OR set GEMINI_API_KEY=your-api-key # Windows
- Restart app - will use Gemini instead of fallback
The system can run daily discovery automatically. Add to app.py:
import schedule
import threading
def schedule_daily():
schedule.every().day.at("09:00").do(lambda: system.daily_discovery(topics))
def run_scheduler():
while True:
schedule.run_pending()
time.sleep(60)
thread = threading.Thread(target=run_scheduler, daemon=True)
thread.start()
# Call after system init:
schedule_daily()- Morning - System has already discovered new items automatically
- Open Dashboard - http://localhost:5000
- Review Recommendations - Read summaries and keywords
- Rate Items - Give 1-5 stars to each
- Choose to Read - Click link to view/enroll
- Done - System learns for tomorrow
- Check
data/user_preferences.jsonto see your ratings - Adjust topics if needed
- Monitor what papers/courses you actually complete
- Analyze which topics got highest ratings
- Consider refining your interests
- Update topics for better recommendations
Another app is using port 5000. Either:
- Close the other app
- Change port in
app.py:app.run(port=5001)
Make sure you activated the virtual environment:
source venv/bin/activate # Linux/Mac
# OR
venv\Scripts\activate.bat # WindowsTry again in a few minutes. ArXiv has rate limits.
Courses database is manually curated. Check topic keywords match course titles.
First run downloads models (384MB). Subsequent runs are instant.
- ArXiv API: https://arxiv.org/help/api
- ChromaDB Docs: https://docs.trychroma.com/
- Sentence-Transformers: https://www.sbert.net/
- LinUCB Algorithm: Search "LinUCB Contextual Bandit"
- Add More Courses - Edit
CourseDiscovery.courseswith more EdX courses - Custom Topics - Add your own topics dynamically
- Export Data - Save your ratings as CSV
- Statistics - Dashboard showing learning progress
- Email Notifications - Daily digest of recommendations
- Mobile App - Convert to React Native
β Be consistent - Rate papers every day β Be honest - Rate what you actually like β Start broad - Begin with general topics, narrow down β Review regularly - Check your preferences weekly β Try different topics - Explore edge cases β Share feedback - Report missing courses or papers
- Check
app.logfor error details - Verify internet connection (needed for ArXiv)
- Make sure you have 5GB free disk space
MIT License - Use freely for personal use
Your personalized learning assistant is ready. The more you use it and rate items, the better it gets at finding content you'll love.
Now go forth and learn! π
Questions? Check the logs in app.log or review the code comments in app.py.