Inspiration
Preparing practice papers can take a lot of time for students, teachers, and parents. We wanted to build something that could quickly create useful practice exams while still staying aligned with the actual school curriculum. This idea led us to build AI Exam Agent, which combines curriculum data with AI to generate structured and syllabus-focused exam papers.
What it does
AI Exam Agent generates practice exam papers based on the student's selected class, subject, chapters, marks, question types, and difficulty level.
Instead of generating completely random questions, the agent first uses the available curriculum data and then generates a structured question paper. The generated paper is also validated to check things like total marks, question types, chapter coverage, question numbering, and MCQ options.
The final paper can be viewed by the user and downloaded as a PDF.
How we built it
We built the application using FastAPI for the backend and a lightweight HTML, CSS, and JavaScript frontend.
The core exam generation workflow uses Strands Agents with Gemini. A Curriculum Service provides the relevant syllabus content to the AI agent, which generates a structured question paper using a defined output format.
After generation, a deterministic validation layer checks the paper. If the generated paper does not satisfy the required rules, the system can regenerate it instead of directly returning an invalid paper.
We currently support focused curriculum datasets for Class 6 Mathematics and Class 8 Science.
Challenges we ran into
One of the main challenges was making sure that AI-generated questions stayed within the selected curriculum instead of producing questions that were too broad or unrelated to the requested chapters.
Another challenge was making the output reliable and structured. AI can sometimes generate incorrect marks, duplicate questions, or an unexpected number of options. We addressed this by adding a validation layer after AI generation.
We also had to handle API rate limits during development and make the generation flow more reliable.
Accomplishments that we're proud of
We are proud that we built a complete working flow from user input to AI-generated exam paper and PDF download.
We also liked the idea of combining AI generation with deterministic validation. Instead of trusting the AI output blindly, the system checks the generated paper against predefined rules before presenting it to the user.
The project also has a clear separation between curriculum data, AI generation, validation, and PDF generation, which makes it easier to extend to more classes and subjects.
What we learned
This project helped us understand that building an AI application is not only about generating good responses. The surrounding system is equally important.
We learned how to use Strands Agents for an actual application workflow, how to provide structured information to an AI agent, and how deterministic validation can be used to make AI-generated results more reliable.
We also learned that keeping the initial scope focused makes it easier to build and test a complete working product.
What's next for AI Exam Agent
Our next goal is to expand the curriculum to more classes and subjects and support more types of assessments.
We also want to add features such as personalized difficulty based on student performance, automatic answer keys and explanations, question-level feedback, and progress tracking.
In the future, AI Exam Agent could evolve from simply generating practice papers into a more complete AI learning assistant that helps students identify their weak areas and practice accordingly.
Built With
- ai-agent
- css
- fastapi
- html
- javascript
- python
- strands-with-gemini
Log in or sign up for Devpost to join the conversation.