02Own product

SocraticAI: an AI tutor that teaches with questions, not answers

Web app and PWA, PL / EN · live at socraticai.amcode.eu

Scope
Own product, from model to deployment
Client
AM CODE product
Socratic maths: hints and questions until the student reaches 2/3 + 1/4 = 11/12
Socratic maths: hints and questions until the student reaches 2/3 + 1/4 = 11/12
A function graph drawn by the tutor, with the unknown point marked “?”
A function graph drawn by the tutor, with the unknown point marked “?”
A chart of the student’s own measurements, with the source
A chart of the student’s own measurements, with the source
A drill card of ten exercises, checked by the app itself without AI
A drill card of ten exercises, checked by the app itself without AI
Language practice: a role‑play with phrases to play back and repeat
Language practice: a role‑play with phrases to play back and repeat
The “Learn a language” menu with seven languages
The “Learn a language” menu: seven languages, French included
Parent panel: today’s messages and costs for each child
Parent panel: today’s messages and costs for each child
Child settings: daily limits, allowed hours, voice and photos
Child settings: daily limits, allowed hours, voice and photos
Appearance: themes, calm palettes, text size and a dyslexia‑friendly font
Appearance: themes, calm palettes, text size and a dyslexia‑friendly font
Signing in: a student with the parent’s e‑mail, their name and a PIN
Signing in: a student with the parent’s e‑mail, their name and a PIN
The student’s chat on an iPhone, with what the chat costThe student’s menu: what is left today
On an iPhone as an app: the chat with its cost, and the menu with what is left today
The start screen with seven languagesThe parent’s list of a child’s conversations with the cost of each
The start screen with seven languages, and the parent’s list of conversations with the cost of each
The parent panel on a phone: today’s messages and costsThe parent’s progress view on a phone
The parent on a phone: today’s messages and costs, and progress by subject

Screenshots with demo data.

Challenge
Homework help from a general AI chat usually means a finished answer to copy: the student gets the result but not the understanding, and the parent sees neither what happened nor what it cost. SocraticAI is built the other way round: a tutor that won’t do the homework for the child but helps them get there themselves, within limits the parent sets.
Product
One family account: the parent creates profiles for their children, and each child signs in with the parent’s e‑mail, their own name and a PIN, so a shared tablet or phone works too. The child sees only the chat: they type, dictate or photograph an exercise, and the answer appears as it is written, with formulas, function graphs and geometry drawings, data charts, maps and freely licensed pictures kept on SocraticAI’s own server. Drill cards give ten quick exercises that the app checks itself, without AI. A “Learn a language” menu opens a separate language chat in English, German, Spanish, French, Russian, Korean or Chinese at the child’s level, with role‑play, preparation for the eighth‑grade exam and the matura, and optional pronunciation scoring. In voice mode the child just talks: the message sends itself after a pause, and the answer is read aloud, maths included, the way a teacher would say it. The interface is in Polish or English, with light and dark themes, colour palettes, text size, a dyslexia‑friendly font and a focus mode, and the school grade moves up by itself every September. Installed on a phone, it works like an app: the top bar stays below the notch and a larger message box sits above the home bar.
The tutor
The tutor follows the Socratic method: one question per message, short answers, specific praise and a six‑step ladder of hints. The full solution comes only after real attempts, while simple facts are given straight away. Behind the scenes it can check a fact against sources and compare the student’s work with a hidden answer key it never reveals, and it resists the usual tricks of clever students, from asking for “just the digits” to guessing in series. Each answer records whether a task was solved alone or with help, which feeds the progress view. A set of tricky‑student scenarios runs the real tutor end to end and has a separate model grade its behaviour, so a change to its instructions is checked before release.
Parents
The parent decides how much and when: a daily message limit and a budget in złoty, euro or dollars, allowed hours, and whether voice, photos and internet pictures are on. They can read every conversation (the child knows this), see progress by subject with learning days and a streak, and get a weekly summary. Every message and photo passes a safety filter first: harmful content is blocked, borderline content reaches the tutor with a note, and the parent gets an alert by e‑mail and push. Several off‑topic messages in a row pause the chat and a repeated message is refused, both without spending AI credits. Exercise photos are deleted after 30 days, and the parent can export all data or delete the account at any time.
Access and costs
SocraticAI is live with sign‑in by invitation: parent accounts are created by the administrator, and there is no public sign‑up or payment yet. Every AI call is logged with its tokens and cost, converted at the National Bank of Poland’s daily rate; each child has a daily budget and the whole app a daily fuse, and the child sees what is left today. The cost of every conversation is shown to the student in the chat, to the parent next to each conversation with a total, and to the admin. The admin panel shows usage by service, task and model, reads the providers’ public price lists, checks every six hours that the models in use are still available, and collects bug reports with screenshots.
Engineering
Ruby on Rails 8.1 on Ruby 4 with Hotwire and importmap (no Node build), and SQLite for both the data and the Solid Queue background jobs; after green CI, GitHub Actions deploys with Capistrano. Answers stream from the model; drawings, charts, maps and pictures requested by the tutor are validated on the server before anything is shown, under a strict Content Security Policy with nonces, and fonts, maps and images are self‑hosted, so a child’s browser connects to no other site. Several AI services work together, but the child talks only to the tutor; requests are rate‑limited and capped per answer. Parents and the admin sign in with a password or Google, with two‑step verification (authenticator app, passkeys and security keys, recovery codes). About 1,400 RSpec examples cover around 99% of lines; external APIs are stubbed with recorded real responses and checked by separate contract tests against the live services, and CI runs RuboCop, ERB Lint, Brakeman and dependency audits in parallel jobs. Nightly backups are encrypted and copied off‑site, with a restore for the whole app or for one child.
Outcome
Homework help a parent can trust: the child does the thinking and gets there with hints, and the parent sees progress and costs instead of an answer copied from a chat.