Inspiration
The project began with a simple but persistent frustration: students rarely get access to fresh, conceptually challenging exercises. Traditional textbooks repeat the same templates, and online resources often recycle the same problems with slightly different numbers. As a result, many learners memorize procedures rather than understand the underlying physics.
This inspired the idea of an AI-driven system that can synthesize truly new exercises — ones that preserve the required axioms and difficulty level, but still surprise the learner with novel scenarios.
What it does
The Physics Exercise Generator takes a set of exercises from the user and automatically produces unique, fully original physics problems along with their solutions. To ensure both correctness and novelty, the system uses a Generator–Checker architecture:
The Generator analyzes the user’s input, identifies the relevant field (e.g., kinematics, dynamics) and underlying axioms, and creates a new exercise expressed in LaTeX L A T E
X.
The Checker ensures the exercise is:
aligned with the topic and complexity,
mathematically correct, and
not a trivial variation of the input examples.
Only exercises that pass all checks are delivered back to the user.
How we built it
The system is built around a multi-stage AI pipeline:
User Input Layer Users provide a set of example physics problems.
Generator An LLM processes the examples, extracts their axioms and conceptual field, and generates a new exercise + solution in strict JSON format.
Checker A second LLM validates:
conceptual correctness
mathematical validity
uniqueness (sanity-check against the input)
Feedback Loop If the Checker rejects the exercise, it returns actionable feedback to the Generator, prompting a refined attempt. This loop continues until a valid, unique exercise is produced.
GUI Output Once approved, the final exercise is displayed cleanly in the application’s interface.
Technically, the project makes use of:
Python for the backend logic,
a React-based GUI,
structured prompting and JSON validation,
and a robust prompt-engineered Generator–Checker loop.
Challenges we ran into
Ensuring true uniqueness: Getting the generator to avoid paraphrasing or swapping numbers required a carefully engineered checker with strong “sanity-check” logic.
Handling structured output: Models sometimes drift from JSON format, so we built a strict enforcement layer.
Maintaining conceptual integrity: Ensuring the generated exercise adheres to the same axioms (e.g., Newton’s laws for a dynamics task) without copying the structure was non-trivial.
Creating meaningful feedback loops: Teaching the system to refine its outputs based on Checker feedback required several iterations.
Accomplishments that we're proud of
Designed and deployed a robust Generator–Checker architecture that consistently produces valid, novel problems.
Built a clean and intuitive GUI for students and instructors.
Created a system that can analyze exercises and extract underlying physics axioms automatically.
Achieved high reliability in producing structured LaTeX L A T E
X-based solutions.
What we learned
How to build multi-agent LLM systems that collaborate and critique each other.
The importance of strict formatting rules and validation when working with generative models.
That novelty is far harder to guarantee than correctness — but achievable with the right loop.
How physics problem structure often reflects deeper axioms, which models can learn to detect.
What's next for Physics Exercise Generator
Support for additional subjects, such as mathematics, chemistry, and engineering.
Adaptive difficulty, where the system detects a user’s weak spots and generates targeted exercises.
Interactive solution steps, allowing students to reveal hints incrementally.
Dataset export, enabling batch creation of problem sets for teachers.
Model fine-tuning on physics-specific corpora to further improve precision and conceptual depth.
Built With
- gemini-2.5
- python
Log in or sign up for Devpost to join the conversation.