Learning-Aware Generative AI System is a 3-layer AI architecture built for learning content generation. It features automated preprocessing, a RAG pipeline for contextual prompt enrichment, and a secondary LLM layer for hallucination detection and correction. The system engineers end-to-end pipelines using vectorized embeddings and automated LLM orchestration to enable high-throughput content generation.
- 3-Layer AI Architecture:
- Preprocessing & Chunking: intelligently breaks down curriculum content (PDFs).
- RAG Pipeline: Contextual prompt enrichment using Vector DB (ChromaDB).
- Hallucination Detection: Secondary LLM layer to verify and correct generated outputs.
- Automated Content Generation:
- Video Lessons: Generates synchronized math explanatory videos using Manim and Edge-TTS.
- Quizzes & Flashcards: Automatically generates practice quizzes and revision flashcards from curriculum content.
- Teaching Plans: Creates structured teaching plans for educators.
- Interactive Chatbot: Context-aware RAG chatbot ("MathBuddy") for student Q&A, strictly grounded in the official curriculum.
- High Performance: Engineered for high-throughput, low-latency generation.
- Languages: Python
- Backend Framework: FastAPI (High-performance web framework) / Flask
- AI/ML:
- LLMs: Llama-3 (via Groq API) for reasoning and generation.
- RAG: ChromaDB (Vector Store), Sentence Transformers (Embeddings).
- Data Procesing: BeautifulSoup, Selenium (Web Scraping), PDFPlumber (PDF Extraction), Pandas, NumPy.
- Media Generation: Manim (Mathematical Animation Engine), Edge-TTS, MoviePy.
-
Clone the repository:
git clone <repository_url> cd Aletheia
-
Install dependencies: Ensure you have Python 3.10+ installed.
pip install -r requirements.txt
Note: Manim requires FFmpeg and LaTeX to be installed on your system.
-
Environment Setup: Create a
.envfile in the root directory and add your API keys:GROQ_API_KEY=your_groq_api_key YOUTUBE_API_KEY=your_youtube_api_key
The application uses a FastAPI backend. To start the server:
# Run the backend server
python backend/main.pyOr potentially use the provided batch script if on Windows:
start_app.batThe API will be available at http://localhost:8000 (Documentation at http://localhost:8000/docs).
You can also run specific pipelines directly:
- Chatbot (CLI Mode):
python chatbot_rag.py
- Video Generation:
python generate_animations_synchronized.py
backend/: FastAPI server and API endpoints.content/: Stores curriculum source files (PDFs) and processed JSON.generated_content/: Output directory for generated Videos, PDFs, and Plans.chatbot_rag.py: RAG implementation for the interactive chatbot.extract_pipeline.py: Core logic for extracting and structuring content from PDFs.manim_engine_synchronized.py: Logic for driving Manim animations based on generated scripts.
Built with ❤️ for Education.