A comprehensive web application that uses RAG (Retrieval-Augmented Generation) to help students upload PDFs, organize by subject/topic, and instantly generate summaries, quizzes, and intelligent Q&A content for fast, effective last-minute studying.
- Upload PDFs or notes
- Tag them by subject, topic, and chapter
- Automatically extracted text and structured using NLP
-
Summary Generator
- Auto-generates short summaries per section
- Choose between "Quick Recap," "Deep Dive," or "Flashcard Format"
-
Question Generator
- AI-generated questions:
- MCQs
- Objective
- Detailed Q&A
- Numerical/Problem-solving
- Categorized by Bloom's taxonomy (recall, analysis, application)
- AI-generated questions:
-
Quiz Mode
- Select topic → choose difficulty level → start quiz
- "Show Answer" button only reveals answers on click (promotes active recall)
- Option to enable timed mode for mock exams
-
Ask a Question (Chat Interface)
- Ask questions directly (like "Explain Newton's Laws" or "Give me 5 MCQs on Thermodynamics")
- AI retrieves relevant sections + provides tailored response
-
Flashcards
- Auto-generate flashcards from key points and definitions
- Supports spaced repetition algorithm
-
Progress Tracking
- Visual dashboard for completed topics, quiz scores, and weak areas
-
Clone the repository
git clone <repository-url> cd cram-ai
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
- Create a
.envfile in the root directory - Add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
- Create a
-
Run the application
streamlit run app.py
- Python 3.8+
- OpenAI API key
- Streamlit
- LangChain
- PyPDF2
- FAISS
- Other dependencies listed in
requirements.txt
- Upload Documents: Go to "Upload & Organize" and upload your PDF study materials
- Organize Content: Tag each document with subject, topic, and chapter
- Generate Summaries: Use "Study Tools" to create summaries in different formats
- Create Quizzes: Generate practice questions and take interactive quizzes
- Ask Questions: Use the chat interface to ask specific questions about your materials
- Study with Flashcards: Generate and study with AI-created flashcards
- Track Progress: Monitor your quiz performance and study statistics
- Frontend: Streamlit web interface
- Backend: Python with LangChain for AI processing
- Vector Store: FAISS for document embeddings and similarity search
- AI Models: OpenAI GPT models for content generation
- PDF Processing: PyPDF2 for text extraction
cram-ai/
├── app.py # Main Streamlit application
├── config.py # Configuration settings
├── requirements.txt # Python dependencies
├── utils/
│ ├── __init__.py
│ ├── pdf_processor.py # PDF text extraction
│ ├── vector_store.py # Vector store management
│ └── ai_helpers.py # AI content generation
└── README.md
Edit config.py to customize:
- Default subjects and topics
- Chunk sizes for text processing
- Quiz difficulty levels
- Summary types
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License.
If you encounter any issues or have questions, please open an issue on GitHub.
Built with ❤️ using Streamlit and LangChain