The Future of Personalized Education
I am a huge fan of 3Blue1Brown's videos, and animated video essays in general, and I wanted to create a platform that would allow me to create similar videos for any topic. The landscape of education is rapidly evolving, moving toward more personalized and engaging learning experiences. As Sal Khan discusses in "Brave New Worlds," the future of education lies in creating content that adapts to individual learning styles and paces. All of 3Blue1Brown's videos are animated using a Python library called Manim. Since this is all text based, this is a great problem for language models!
So for Hack@Brown, I built Illuminate with a team. By combining the power of large language models with mathematical animation engines, we can automatically generate educational videos that explain any topic in an engaging, visual way!
How It Works
The AI Pipeline
Illuminate uses a pipeline built with LangChain to orchestrate multiple AI services and steps. The process begins when a user inputs any topic they want to learn about. This simple prompt then flows through several stages that work together to create a complete educational experience.

First, the input is processed by a script generator that creates a structured lesson plan, then iteratively refines it into a narrative script with suggested animation types and details. This script generation phase ensures that the content is pedagogically sound and follows a logical progression that builds understanding step by step.
Once the script is complete, a Manim generator takes over to create Python code for mathematical animations that will illustrate the concepts visually. This animation code generation process translates the abstract script descriptions into concrete visual representations. The code is then executed in a controlled environment to render the final animated video with synchronized voiceover. This is notably not a DAG. If the generation is successful, the video is shown to the user. Otherwise, the model takes the error and iterates on the code.
Simultaneously, a separate AI process generates interactive quiz questions, multiple choice options, and detailed solutions to test the user's understanding of the material.
Technical Architecture
Backend Infrastructure: The backend is built using modern AI and web technologies. LangChain orchestrates the entire AI pipeline and FastAPI provides a backend API framework that handles requests and responses efficiently. The system leverages OpenAI GPT models to power both content generation and script creation.
Frontend Experience: The user interface is built with React. Real-time integration ensures seamless communication between the frontend and backend services. Once generated, the platform shows the video, a script on the side for accessibility, and a quiz below.
Animation Engine: At the heart of the visual experience is Manim, the Mathematical Animation Engine that creates high-quality educational animations capable of illustrating complex concepts through motion and visual storytelling. The system allows for customizable animations and a voiceover generator. The built in voiceover allows synchronous narration with the animations.

Technical Challenges
AI Code Generation
One of the most significant challenges was getting large language models to generate reliable Manim animation code. The models often struggled with creating syntactically correct Python code that would execute without errors, particularly when dealing with the specific syntax requirements and object-oriented structure that Manim demands. Additionally, ensuring that animations didn't overlap or conflict with each other required careful prompt engineering and validation logic. Maintaining proper timing and synchronization between visual elements and the narrative flow proved especially difficult, as the AI needed to understand not just what to animate, but when and for how long each element should appear. Finally, including all necessary voiceover elements and ensuring they aligned perfectly with the visual timeline required multiple iterations and refinement of the generation process. This is still a work in progress and will require more research and testing for stable and robust results.
Manim Code Execution
Manim requires a few libraries that are tricky to run in different environments. Knowing this would have saved a lot of time and frustration. Eventually, we migrated to using a Docker container to run Manim, which made it much easier to run.

Impact and Future Directions
Educational Potential
Illuminate represents a step toward making high-quality educational content more accessible. By automating the creation of animated explanations, we can help educators and learners focus on understanding rather than content creation.
Future Enhancements
We won best use of GenAI at Hack@Brown, but there are a lot of future steps required to make this a truly useful tool. While fun to experiment with, the generation quality is still poor. That said, I still believe the concept is valuable and has potential. With this in mind, here are some future steps:
- Use a VLM to inspect generated videos and imrove them iteratively before returning to the user.
- Allow follow-up questions during video playback.
- Accept images, diagrams, or documents as input to generate more contextual educational content.
- Learn from user interactions and quiz performance to improve future content generation
- Allow for multiple languages. This should be realtively easy with some translation tools.