{"slug": "slow-steady-math-tutor", "title": "Slow & Steady Math Tutor", "summary": "A developer built Slow & Steady, a local-first math tutor that runs entirely on a user's machine via Ollama, combining a vision model for reading photographed problems with a chat model for explanations. The tutor follows a strict division of labor: the AI model interprets and explains, while SymPy performs all arithmetic, and it asks users to confirm its reading when a photo is unclear. It handles clear problems, blurry photos with a recognizable topic, and unreadable images with topic buttons, and includes a built-in math keyboard for symbols like integrals and matrices.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady](https://dev.to/challenges/hacktoberfest-week3-2026-10-19)*\n\n**🐢 Slow & Steady** is a calm, patient math tutor that runs entirely on your own computer.\n\nYou take a photo of a math problem (from a textbook, a worksheet, or a whiteboard) or type it in. The tutor reads it, works out the answer, and then **explains it slowly, like a kind teacher sitting next to you**, using everyday pictures: sharing pizza between friends, balancing a seesaw, filling a water tank.\n\nIt's built for people who freeze up when they see math:\n\nMost AI chatbots are confident even when they're wrong. That's dangerous for a learner, because a beginner can't tell a wrong answer from a right one. So I made the tutor follow one rule:\n\n**The AI explains. A calculator checks.**\n\nThe AI model never does the arithmetic on its own. Every answer is worked out by a real math engine ([SymPy](https://www.sympy.org)), the same kind of tool a scientist would trust. The AI's job is the human part: reading your messy handwriting, understanding the question, and explaining the steps in plain words.\n\nPhotos are often blurry, crooked or half in shadow. Instead of guessing, the tutor handles three situations:\n\n| What you send | What the tutor does | \n|---|---|\n| **A clear photo or a typed problem** | Solves it, shows every step, and explains each one with a simple analogy. | \n| **A blurry photo, but the topic is visible** (say, you can tell it's about fractions) | Tells you kindly that it couldn't read the numbers, then teaches the idea using a *practice problem* on the same topic, one it has already checked. | \n| **A photo with nothing readable** | Asks you what you're working on, with buttons for each topic, or lets you type the problem yourself. | \n\nWhen it isn't sure what it read, it **shows you its reading and asks \"Is this right?\"** before solving anything. A good teacher checks they understood the question before answering it.\n\nIt covers school math through first-year university:\n\nThere's also a **built-in math keyboard** (∫, √, fractions, matrices, Σ…), so you never have to figure out how to type \"the integral from 0 to 1\" on a normal keyboard.\n\n**Who gets to be a little lazier?** The parent who doesn't have to relearn algebra before helping with homework tonight. The student who doesn't have to wait until tomorrow's class. And the teacher, who doesn't have to answer the same \"how do I do question 4?\" message ten times.\n\n**What the video shows:**\n\nBecause everything runs on your own machine, there's no public website to visit. That's on purpose, and the next sections explain why. You can run it yourself in about three commands (see **Code**).\n\nA calm, patient, **local-first** math tutor for students, parents, and lifelong learners who feel anxious about math\nSnap a photo of a problem (or type it). The tutor reads it, checks the math with a deterministic calculator\n(SymPy), and explains it slowly with an everyday analogy: sharing food, slicing pizza, balancing a scale.\n\nEverything runs on your machine through [Ollama](https://ollama.com). Nothing leaves your computer.\n\n```\n# 1. Models (any vision model + any chat model work; these are the defaults)\nollama pull qwen2.5vl:7b        # reads photos\nollama pull qwen3:30b-a3b       # sets up word/diagram problems and writes explanations (~19 GB)\nollama pull qwen2.5vl:3b        # optional second opinion for hard photos\n\n# 2. Python 3.10–3.13\npython3.12 -m venv .venv\n.venv/bin/pip install -r requirements.txt\n\n# 3. Run\n.venv/bin/streamlit run app.py\n```\n\nOverride models with environment variables: `TUTOR_VISION_MODEL`, `TUTOR_BACKUP_VISION_MODEL`, `TUTOR_CHAT_MODEL`\n`TUTOR_REASONING_MODEL`, …\n\n```\n# 1. Download the open models (one-time)\nollama pull qwen2.5vl:7b       # reads photos\nollama pull qwen3:30b-a3b      # understands questions and writes explanations\nollama pull qwen2.5vl:3b       # optional second opinion on hard photos\n\n# 2. Install\npython3.12 -m venv .venv\n.venv/bin/pip install -r requirements.txt\n\n# 3. Start the tutor\n.venv/bin/streamlit run app.py\n```\n\nThen open `http://localhost:8501` in your browser.\n\n| Piece | What it does, in plain words | \n|---|---|\n| **[Ollama](https://ollama.com)** | Runs the AI models on my own laptop (a MacBook with 32 GB of memory). No internet, no cloud account. | \n| **Qwen2.5-VL 7B** (open-weight) | The \"eyes\". It looks at the photo and writes down the math it sees. | \n| **Qwen2.5-VL 3B** (open-weight) | A second pair of eyes, used when the first reading is unclear. | \n| **Qwen3 30B-A3B** (open-weight) | The \"brain\" for language. It turns word problems into equations and writes the friendly explanations. | \n| **[SymPy](https://www.sympy.org)** | The calculator. It does every bit of actual math, so answers are exact and never made up. | \n| **[LangGraph](https://github.com/langchain-ai/langgraph)** | The \"flowchart\". It decides what happens next: solve, teach a practice problem, or ask the learner. | \n| **[Streamlit](https://streamlit.io)** | The web page you interact with. | \n| **[MathLive](https://cortexjs.io/mathlive/)** | The on-screen math keyboard, bundled with the app so it works offline. | \n\nThink of it as a small team, where each member has one job:\n\n```\n 📷 Photo ──► 👀 Reader ──► \"Do two readings agree?\"\n                               │\n               yes ────────────┼──────────── no / blurry / blank\n                │              │                     │\n                ▼              ▼                     ▼\n          🧮 Calculator   📚 Practice-problem   🙋 Ask the learner\n          (SymPy) solves   lesson on the topic    for the topic\n                │              │\n                └──────┬───────┘\n                       ▼\n             🧑‍🏫 Tutor explains every\n               checked step, slowly\n```\n\n**1. Read it twice.** The photo is read in two different ways: once as structured data, once as a plain transcription. The tutor only goes ahead if both readings describe the *same math*, compared by meaning rather than by spelling (so `2x` and `2*x` count as a match). If they disagree, it asks the learner instead of guessing.\n\n**2. Solve word problems twice.** For a word problem like \"Ama is three times as old as Kofi…\", the language model writes the equations, together with a reason for each one. It does this twice, independently. The calculator solves both versions, and the answer is only shown if they agree. One wrong translation can't sneak through.\n\n**3. The model isn't allowed to change the numbers.** After the AI writes its friendly explanation, a final check makes sure every number in it matches the calculator's results. If the AI \"improves\" an answer, that explanation is rejected.\n\nI built an evaluation set of **60 real problems**: clean photos, blurry photos, handwriting, word problems, calculus and more. I scored them by *meaning*: was the answer right, was it wrong, or did the tutor honestly decline? The current version gets **46 of 60 fully correct (77%)**, with a median time of about **9 seconds** per question. I also wrote **283 automated tests** for the math engine, the keyboard-to-math conversion and the decision logic.\n\nThe 23% it doesn't get right is mostly harder word problems, and a lot of that is the tutor *declining* rather than giving a wrong answer. For a learner, \"I'm not sure, can you check this for me?\" is far better than a confident mistake.\n\n**1. Privacy for children.** A lot of the people photographing homework are kids. With open-weight models running locally, **no photo of a child's handwriting, worksheet or bedroom desk ever leaves the computer.** There's no account to make, no data being collected, and nothing to leak.\n\n**2. It's free to use, forever.** A closed API charges for every question. A student asking 50 questions a night would be a real cost for a family, or a school with 500 students. Once the open models are downloaded, every question costs nothing.\n\n**3. It works without internet.** My own connection dropped constantly while I built this. A tutor that stops working when the Wi-Fi does is no good to a student in a rural area, on a bus, or in a school with a weak connection. This one keeps working offline.\n\n**4. I could look under the hood.** With open models I could test exactly how each one behaves, swap them freely and pick the best fit. For example, I found that one model \"thinks out loud\" for about 45 seconds before every reply, which is far too slow for a nervous learner, so I swapped it for a faster version of the same family. A closed API wouldn't have let me compare and replace models that freely. And because every model is set in one config file, anyone with a smaller laptop can swap in a smaller open model.\n\n**5. Anyone can improve it.** A teacher can add a new topic, a translator can make the explanations work in another language, and a school can run it on its own computers. Open models plus open code means the tutor can belong to the community that uses it.", "url": "https://wpnews.pro/news/slow-steady-math-tutor", "canonical_source": "https://dev.to/gamaliel_dashua_e45a9b614/slow-steady-math-tutor-4lnh", "published_at": "2026-10-22 18:25:10+00:00", "updated_at": "2026-10-22 18:41:29.121317+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "generative-ai", "computer-vision", "artificial-intelligence"], "entities": ["Slow & Steady", "Ollama", "SymPy", "Streamlit", "Qwen2.5-VL", "Qwen3", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/slow-steady-math-tutor", "markdown": "https://wpnews.pro/news/slow-steady-math-tutor.md", "text": "https://wpnews.pro/news/slow-steady-math-tutor.txt", "jsonld": "https://wpnews.pro/news/slow-steady-math-tutor.jsonld"}}