Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

Claude wrote "6 − 2 = 3" into lessons: the game filters out bad tasks with code after 68 complaints

Claude writes tasks for the Lumex learning game well, but its arithmetic is unreliable: lessons contained "6 − 2 = 3", and it refused to acknowledge the correct "72 ÷ 3 = 24". After reviewing 68 player complaints, the team placed two layers of code after the model: one discards tasks that cannot be shown, and the other recalculates the arithmetic itself. So when generating educational content, it is better to lose a task than to show a child a false "error".

AI-processed from Habr AI; edited by Hamidun News
Claude wrote "6 − 2 = 3" into lessons: the game filters out bad tasks with code after 68 complaints
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1An empty batch of tasks is returned by the server as a 500 error, and the client retries
Key metric #2371 paths were built for only 146 distinct goals, so the cache lives for 30 days
Key metric #3The sequence "3, __, 12" with the answer 6 is left alone: it may be multiplication

A neural network writes learning tasks fluently, but it easily spoils the arithmetic. In the Lumex learning game, the language model Claude from Anthropic produced lessons with the example "6 − 2 = 3", wrote "after 8 comes 10", and refused to acknowledge the correct "72 ÷ 3 = 24". The game works like this: a person names a goal in their own words ("multiplication table", "fractions for grade 5", "English for a trip"), and the model builds a path of locations and writes five tasks for each one.

There are no ready-made courses, and the topic can be anything, so checking everything by hand is impossible. In October, the developers went through 68 complaints that players submitted with the "Task with an error?" button directly from a lesson.

Among them were "28 less than 25" and "9 × 5 is even". For a child, this is the worst case: they answered correctly, saw "error", and stopped trusting both the game and themselves. The answer was two layers of code verification placed after the model.

Layer 1: discard what cannot be shown

The model's response arrives as JSON following a schema (zod and structured outputs), so fields and types are guaranteed. But the schema knows nothing about meaning: the correct option may be missing from the choices, pairs may repeat, and grouping may contradict the condition. That is why the first function, sanitize(), calculates nothing and only decides whether a task can be shown at all.

Almost every rule grew out of a specific complaint. Previously, if the key was not among the options, it was appended to the list, and once players saw a button reading "verno". Now such a task is discarded.

The same goes for "select all", where the model marked fewer than two correct answers: this format requires at least four options and between two and n − 1 correct ones. The checks also catch the model's "slips" like "…wait, we stop at 11!"

, and they do not match the word wait on its own, or a normal "Wait time is 5 minutes" would be affected. Invisible characters are stripped separately: a zero-width space (U+200B) passes the "string is not empty" check, but on screen it produces an empty button.

For ordering and grouping tasks, the model records the answer twice: in the task structure and in a separate line like "a → b → c". If the two records refer to the same elements but disagree, the task is discarded. The cost of this self-check is one extra line in the answer.

Layer 2: recalculate what can be calculated

The second function, verifyTask(), recalculates everything that can be obtained without the model: arithmetic, comparisons, sequences, parity. It rests on a small calculator of about fifty lines: it understands digits, the four operations, and parentheses, and returns everything else as "not our business". The team's main rule: touch only what is recognized in full. A validator that confidently "fixes" correct tasks is more dangerous than the model itself.

Several careful exceptions follow from this. "1,000" in an English task means one thousand, not a fraction, so such entries are not recalculated. In the sequence "3, __, 12" with two known numbers, the answer 6 may be multiplication by 2, so the key is left alone.

If a fraction task's answer "7/12" would have to be rewritten in decimal form, the task is better discarded: a fifth-grader expects a fraction. A clever workaround to the ban on duplicates also turned up: the model produced the pair "4.1 − 1.

8 ↔ 2.3 + 0.02", so now the right-hand side is calculated too.

Each correction is written to the log as a single line, and the logs show where the model makes mistakes most often.

An empty answer is better than a broken one

The least obvious decision concerned not the checks themselves but the situation when nothing remained after them. Initially, in that case the original tasks were served "as they came", so the player received exactly what had failed verification: a frame with nothing inside. Now an empty batch is a refusal: the server returns a 500 error, the client retries the request, and on the second attempt the model usually produces a proper result. The person waits longer, but does not see a broken lesson.

There is an economic side as well. A model call means 7–8 seconds of waiting and money, while 371 built paths involved only 146 distinct goals, because many users click ready-made examples. So everything that does not depend on the player is cached: the start of the path, its continuation, and the first batch of tasks.

Each key stores three variants of a plan and four variants of tasks, and the entry lives for 30 days. The cache also helps when the model is unavailable. And for the most common goals (the multiplication table from 2 to 9, counting to 20, fifth-grade fractions, first English words), there are trainers where the tasks are assembled by code: instantly and without errors.

What stays out of frame

This approach has an honest limit: word problems, historical dates, grammar, and "which word doesn't belong" cannot be checked with a calculator. Only the model's instructions to double-check itself, the double recording of answers, and the same complaint button work here, with repeated reports through that button turning into new rules.

The practical takeaway for those building products on LLMs: a schema guarantees form, not correctness. Cheap self-checking through double recording, recalculating everything that can be computed, and a willingness to discard questionable output work better than trying to guess. And the complaint button in the interface turns out to be cheaper than any test suite.

Story

Key Questions Answered

What are the key details on Layer 1: discard what cannot be shown?

The model's response arrives as JSON following a schema (zod and structured outputs), so fields and types are guaranteed. But the schema knows nothing about meaning: the correct option may be missing from the choices, pairs may repeat, and grouping may contradict the condition. That is why the first function, sanitize(), calculates nothing and only decides whether a task can be shown at all. Almost every rule grew out of a specific complaint.

What are the key details on Layer 2: recalculate what can be calculated?

The second function, verifyTask(), recalculates everything that can be obtained without the model: arithmetic, comparisons, sequences, parity. It rests on a small calculator of about fifty lines: it understands digits, the four operations, and parentheses, and returns everything else as "not our business". The team's main rule: touch only what is recognized in full. A validator that confidently "fixes" correct tasks is more dangerous than the model itself. Several careful exceptions follow from this.

What are the key details on An empty answer is better than a broken one?

The least obvious decision concerned not the checks themselves but the situation when nothing remained after them. Initially, in that case the original tasks were served "as they came", so the player received exactly what had failed verification: a frame with nothing inside. Now an empty batch is a refusal: the server returns a 500 error, the client retries the request, and on the second attempt the model usually produces a proper result. The person waits longer, but does not see a broken lesson.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Claude wrote "6 − 2 = 3" into lessons: the game filters out bad tasks with code after 68 complaints https://news.hamidun.com/en/news/16632/claude-wrote-6-2-3-into-lessons-the-game-filters-out-bad-tas

What do you think?
Loading comments…