About Margin

Inspiration

Margin was inspired by a common problem in math education: when a student gets a question wrong, the real difficulty may come from something they learned much earlier.

For example, a student struggling with calculus may actually need help with algebra or functions. Instead of repeating the same lesson, we wanted to create a tutor that finds the missing foundation and helps the student rebuild from there.

What Margin Does

Margin is an adaptive math tutor. A student chooses a goal, answers a few short questions, and Margin uses those answers to identify what they understand, where they need help, and what is still uncertain.

It then creates a short learning path that starts with the student’s deepest knowledge gap and gradually leads back to their original goal. Lessons include clear explanations, hints, interactive practice, and new questions that allow the student to demonstrate what they have learned independently.

Margin treats practice and assessment differently. Hints and interactive activities can help students learn, but they are not counted as proof that a student has mastered a skill. The student must answer a fresh question without help.

How We Built It

I built Margin as a web application with a Python and FastAPI backend and a Svelte-based interface.

Behind the scenes, Margin organizes math skills as a map of connected concepts. This allows it to understand which earlier skills are needed for a student’s chosen goal and decide what to teach next.

I also built the system so that important decisions—such as whether an answer is correct or whether a student should move forward—follow clear and testable rules. Correct answers and scoring information remain on the server and are never shown in the student’s browser.

Codex with GPT-5.6 helped me throughout the development process. I used it to explore the application, identify possible failures, improve the architecture, write code, and run tests. However, GPT-5.6 is not the final judge of a student’s math answer. Margin uses controlled content and a dedicated math-checking system for that.

Challenges We Faced

One of the biggest challenges was making sure Margin did not confuse receiving help with mastering a skill.

For example, if a hint reveals too much, the student should not receive credit for answering that question. A worked example should also never accidentally reveal the answer to a later test question. We solved this by using separate questions for teaching, practice, and assessment.

I also had to handle situations such as refreshing the page, opening the tutor in two browser tabs, or sending the same answer twice. Margin keeps an accurate record of each session so students do not lose progress or accidentally move forward more than once.

Another challenge was checking mathematical answers safely. Students can write the same correct answer in many different forms, so simple text comparison is not enough. We created a restricted math verifier that can recognize equivalent answers while rejecting unsafe or overly complex input.

What We Learned

I learned that building a trustworthy tutor is not only about creating good explanations. It is also about being honest about what the student has actually demonstrated.

Margin keeps a clear difference between what a student knows, where they have shown difficulty, and what the system has not measured yet. If the required learning content has not been reviewed, Margin makes that goal unavailable instead of quietly replacing it with unverified material.

Our biggest lesson was that AI in education should not simply sound confident. It should be transparent, careful, and able to earn the learner’s trust.

Built With

Share this project:

Updates