AI Math Tutor

Your AI-Powered Math Coach for Step-by-Step Solutions

Gallery image 1
Gallery image 2
Gallery image 3
Gallery image 4

Step-by-step math help in a Streamlit app, with structured outputs and optional tracing

AI Math Tutor is a Streamlit app that walks through math problems with explanations, using LangChain against an OpenAI model and Pydantic for structured, typed responses. LangSmith tracing is optional; the README notes the core tutor still runs if you skip it. Sample prompts help you try the flow quickly.

When it is useful

You want a sandbox for model-assisted study, you are demoing LangChain + structured outputs, or you need a reference layout for observability hooks. It is not a replacement for a human teacher, official coursework policy, or exam rules.

What you can do

  • Submit problems and read step-style breakdowns in the UI shown in the project media.
  • Use bundled examples to learn the flow before typing your own prompts.
  • Enable LangSmith when you want traces for debugging or tuning (keys and setup are in the repository).

Limits

  • Models can err on arithmetic or reasoning; verify critical steps, especially for assessments or safety-related math.
  • Cost and data handling follow your OpenAI account and what you choose to log; review terms before pasting private or proprietary material.
  • Depth and curriculum alignment depend on prompting and model behavior, not on this portfolio page.

Frequently asked questions

What is AI Math Tutor?

It is a Streamlit app that walks through math problems with step-by-step explanations using LangChain, an OpenAI model, and Pydantic structured outputs. Sample problems are included to try the flow quickly.

How do I run it?

Needs Python 3.11+, an OpenAI API key, and uv. uv sync, set OPENAI_API_KEY in .env (see .env.sample), then uv run streamlit run main.py at localhost:8501.

Is LangSmith required?

No. LangSmith tracing is optional. Without it, tracing is disabled but the core tutor still runs.

Can I trust every solution?

No. Models can err on arithmetic or reasoning, so verify critical steps especially for assessments. Cost and data handling follow your OpenAI account.

Continue exploring