All case studies

Education technology · 2026

Socratic Tutor for studying with photos

I built a bilingual, multimodal AI tutor. A learner can photograph a textbook diagram, ask for a hint and reopen the same drawing from the reply.

Socratic Tutor for studying with photos

I started with a reading problem I could describe in one sentence. I have a page in front of me and I know which drawing made me stop, but I can’t put my question into words yet. Sitting next to someone, I could put my finger on the drawing and say, “This part.” I wanted that gesture to work in a chat.

Open the tutor and choose Try an example. Two illustrated pages open with a question about why wood floats. You can inspect both drawings before connecting a provider key to start the conversation. Try the tutor

The opening form becomes the first message

The sample starts with two blocks of equal volume. One is wood, the other aluminum. On the next page, a wooden block weighing 70 grams floats while a five-gram coin rests on the bottom. The question almost writes itself. If the heavier object floats, what does weight actually tell me?

I put the question, the passage and the photos in the same writing area. You can open an image, check that the labels are legible, remove it or add another. Press Start and the material moves up into the first message. The next thing you see is the tutor’s reply. You can go back to the drawing without leaving the thread. Both pages, including the labels in the drawings, are available in English and Spanish.

The English study example, with a question, a passage and the two illustrated pages attached.

What a button is allowed to say

On the page about density, a button reading “The wood is less dense” would put the answer in the learner’s mouth. “Give me a hint” leaves the work with the learner. That distinction shaped the controls under each reply. They send visible messages that ask for help, another example, or a change in difficulty. Someone who would rather talk through a calculation can use dictation where the browser supports it and correct the transcript before sending.

I put the teaching decisions in a portable skill. It asks the tutor to take one question at a time, work from the learner’s own attempt and explain a step when someone is stuck. It calls for two independent demonstrations, including unaided recall, before raising a skill level. Anyone can inspect those instructions. The model still has to exercise judgment when it reads an answer. Read the teaching skill

One file describes how to teach

In the sales skills kit, I used skills to describe a procedure an agent could follow. Here I wanted someone to get that help with a phone and an open book. I took the idea of a Socratic tutoring session and wrote a version the application could load from its own repository.

When the Vercel function starts, it reads the body of SKILL.md. Each request adds the selected language. The Claude adapter puts the instructions in the Messages system field. The OpenAI and DeepSeek adapters send them as a system message. All three receive the same teaching method. To change when the tutor offers a worked example, I can edit that rule and deploy the new version without changing a button.

Code handles the parts that need a guarantee. It numbers the photos, keeps them through a retry, and opens the right JPEG when a reply mentions “Photo 2.” Someone reviewing the teaching method can read the file. Someone reviewing the source link can test it. Read the skill loader

The test I wanted to see fail

A learner has just photographed two pages and typed a question. Their key is rejected. How much of that work do they have to do again?

I ran the English interface in Chrome against a controlled service. The first request returned an authentication error. The question and both pages were still visible in one message. I replaced the test key and clicked Retry. The authentication header changed. The two request bodies matched byte for byte, including the JPEGs and their original numbers.

I then had the service return a prepared reply that mentioned “Photo 2.” Clicking those words opened the very same JPEG sent as the second page. I checked its image data against the first request. The conversation contained one learner message and one tutor reply. This test would have caught a duplicate message, a missing page or a link opening the wrong illustration.

A simulated tutor reply in the English interface. Its numbered photo reference opens the corresponding study page.

What travels with the learner

The contract tests exercise each provider in English and Spanish with a simulated service. They check which instructions and images leave the application and how its reply is handled. Learners connect their own keys when they want to have that conversation with a live provider.

The software tests establish what goes into a request and what survives an interruption. The learning question is still open. I would give the same learner a sealed container of a different size and ask them to predict whether it floats, several days after studying the block and the coin. Hearing which quantities they choose to compare, before the tutor offers a hint, would tell me something a successful API call never could. I published the source under the MIT license and the automated test run.

Edición en español

Rashid Azarang, a close portrait in a dark T-shirt, with white wireless earbuds

Written by

Senior AI Engineer · Monterrey, Mexico

AI assistedWith the help of AI for research, drafting, and editing.

Further reading

Go deeper.

Essays, case studies, and more from the site.

Research

Every paper, pre-registration and dataset, with what it takes to run them again.

View all