Project Info
Inspiration
In today's fast-paced academic world, students and young professionals often find themselves overwhelmed by complex concepts and dense academic materials. Whether it's sifting through lecture notes, deciphering lengthy reports, or struggling to understand a difficult research paper, the challenge of grasping key ideas can feel daunting. This confusion can slow down the learning process, leaving students frustrated and unsure of where to focus their efforts. This struggle highlights the necessity for tools that can bridge the gap between overwhelming content and true understanding, offering a more efficient and accessible way to digest critical information. What RetAIn does RetAIn harnesses the power of AI to transform academic materials into personalized, easy-to-understand audio lectures. Whether you’re dealing with notes, research papers, or reports, RetAIn takes your content and breaks it down into tailored explanations, guiding you through the most important concepts. By identifying key themes and simplifying complex information, RetAIn turns your study materials into a structured learning experience, helping you focus on what really matters.
How we built it
We designed the project specifically for school students, aiming to help them streamline their learning process. Frontend We used React to create a clean and user-friendly interface. Backend Our backend stack consisted of Node.js and an Express server connected to a PostgreSQL database and Amazon S3, which managed user data and stored documents. AI Integration Our flask service implements a Retrieval-Augmented Generation (RAG) model using a Flask API. It processes PDF documents, generates embeddings using OpenAI's model, and stores them in a Pinecone vector database for efficient retrieval. When a question is asked, the system queries Pinecone to find relevant text chunks, then uses OpenAI's GPT-4 model within an AutoGen multi-agent framework to generate a comprehensive response. This RAG system enables intelligent processing of lecture materials, generating summaries, answering questions, and creating study guides based on uploaded documents. For text-to-speech generation, we leveraged the Cartesia TTS API to provide a clear and natural-sounding speaking experience.
Challenges we ran into
One of the biggest challenges we faced was downsizing the project scope. Initially, we wanted to implement highly advanced features, such as generating article-like outputs with animated visualizations. However, this idea proved too complex for our timeline and resources, as it would have required incorporating rendering engines and advanced animation technologies. After realizing the technical and time constraints, we shifted our focus to building a more streamlined application that handled note summarization and study guide generation effectively. It also became a difficulty incorporating sponsor material effectively, so we ended up falling back on our technical backgrounds more with the experience we had before coming here. Another challenge was finding a balance between simplicity and functionality. We had to make sure the AI-generated content was useful without overwhelming the user with too much information, which required fine-tuning the RAG AI model for better relevance and accuracy.
What we learned
Throughout this project, we gained valuable insights into both front-end and back-end development as well as the use of AI in practical applications. We learned how to effectively build an intuitive user interface, manage databases for large sets of documents, and integrate AI for real-time note summarization and study guide generation. We also gained experience in scaling back ambitious features in favor of a more focused and usable product, learning to prioritize simplicity and functionality. Conclusion Despite the hurdles, we successfully built a functional and user-friendly AI-powered note-taking app. The project not only provided a valuable learning experience in full-stack development and AI integration but also helped us understand the importance of prioritizing and adapting our goals to match our capabilities and timeline.
Retain - AI-Powered Lecture Generation Platform
Overview
Retain is an intelligent platform that transforms academic materials into personalized, easy-to-understand audio lectures using AI. It helps students and professionals tackle the challenge of processing complex academic content by converting documents into structured, accessible learning experiences.
Problem Statement
Students and professionals face several challenges with traditional learning materials:
- Overwhelming volume of complex academic content
- Difficulty in identifying and focusing on key concepts
- Time-consuming process of digesting dense research papers and notes
- Need for more accessible and efficient learning methods
Solution
Retain addresses these challenges by:
- Converting academic materials into personalized audio lectures
- Breaking down complex concepts into digestible explanations
- Using AI to identify and focus on key themes
- Providing a structured learning experience through an intuitive interface
Tech Stack
Frontend
- React.js: Core frontend framework
- Tailwind CSS: Utility-first CSS framework for styling
- React Router: For navigation and routing
- Lucide React: For UI icons and components
- ShadCN UI: Component library for modern UI elements
Backend
- Node.js & Express: Server framework
- PostgreSQL: Primary database
- AWS S3: Document storage
- Multer: File upload handling
- JWT & Bcrypt: Authentication and security
- CORS: Cross-origin resource sharing
AI & Machine Learning
- Flask API: RAG service implementation
- OpenAI GPT-4: For text processing and generation
- Pinecone: Vector database for embeddings
- AutoGen: Multi-agent framework for AI processing
- Cartesia TTS API: Text-to-speech conversion
DevOps & Infrastructure
- Docker & Docker Compose: Containerization and orchestration
- AWS Infrastructure: Cloud hosting and services
- Poetry: Python dependency management
- NPM: Node.js package management
Key Features
Document Processing
- PDF document upload and processing
- Intelligent text chunking and embedding
- Secure document storage in AWS S3
AI-Powered Analysis
- Retrieval-Augmented Generation (RAG) for context-aware responses
- Multi-agent processing using AutoGen
- Intelligent summarization and key concept extraction
User Experience
- Clean, intuitive web interface
- Personal course and lecture management
- Audio lecture generation and playback
- Progress tracking and management
Setup and Installation
Prerequisites
- Node.js (>= 12.0.0)
- Python 3.12
- Docker and Docker Compose
- AWS account credentials
- PostgreSQL
Backend Setup
- Clone the repository
- Navigate to the backend directory:
cd backend
- Set up PostgreSQL using Docker:
docker-compose up -d
- Install dependencies:
npm install
- Configure environment variables:
DB_USER=postgres
DB_HOST=localhost
DB_NAME=retain_db
DB_PASSWORD=your_password
DB_PORT=5432
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secret
AWS_REGION=your_aws_region
- Start the server:
npm run dev
Frontend Setup
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Start the development server:
npm start
RAG Service Setup
- Navigate to the RAG service directory
- Set up Python environment:
poetry install
- Configure API keys:
OPENAI_API_KEY=your_key
PINECONE_API_KEY=your_key
- Start the Flask server:
poetry run python agent.py
API Endpoints
Authentication
POST /signup: User registrationPOST /login: User authentication
Courses
POST /create-course: Create a new courseGET /courses/:email: Get all courses for a user
Lectures
POST /create-lecture: Create a new lectureGET /lectures/:email/:course_id: Get all lectures for a course
Contributing
We welcome contributions! Please read our contributing guidelines and submit pull requests for any improvements.
License
This project is licensed under the ISC License.
Acknowledgments
- OpenAI for GPT models
- All contributors and supporters of the project
Analysis
View
Metric
- 24
- 15
- 7
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- FlaskIn code
- HTMLIn code
- JavaScriptIn code
- LangChainIn code
- OpenAIIn code
- PostgreSQLIn code
- PythonIn code
- ReactIn code
- SQLIn code
- Tailwind CSSIn code
- AWSClaimed
- DockerClaimed
- Node.jsClaimed
12 of 15 appear in the indexed code. 3 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
76 KB
Source files
33
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
AnwarMP/retain
49 files · 1.2 MB · @ 02f96ee
Structure
Interface
14 files · 29%Screens, components and styles rendered to the user.
Application logic
11 files · 22%Domain rules, services and shared utilities.
Data & schema
1 file · 2%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- JavaScript65%
- Markdown13%
- Python13%
- CSS7%
- HTML2%
- YAML1%
- Other (1)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 13- @cartesia/cartesia-js
- @headlessui/react
- @heroicons/react
- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- react
- react-dom
- react-icons
- react-router-dom
- react-scripts
- web-vitals
- +1 more
rag_service/pyproject.toml
pypi · 10- flaml
- flask
- langchain
- langchain-community
- openai
- pandas
- pinecone-client
- pypdf
- requests
- tiktoken
backend/package.json
npm · 8- aws-sdk
- bcrypt
- cors
- dotenv
- express
- multer
- pg
- +1 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.