跪拜 Guibai
← Back to the summary

A Private AI Wrong-Question Notebook Closes the Loop from Photo to Practice Paper

AI Wrong-Question Notebook: A Complete Closed Loop from Photo → Human Review → Practice → Paper Generation

1. Why I built this

My child is in junior high school, and math practice books and test papers keep coming in waves. The traditional wrong-question management process involves copying questions (time-consuming), pasting papers (messy), and searching through piles when reviewing. The photo-search apps on the market only give answers; they don't address "where did I go wrong on this question, and will I make the same mistake again next time?"

img1.jpg

What I wanted was a private wrong-question knowledge base:

Coincidentally, I had previously built a question-generation system (quiz-demo) that contained a battle-tested "quality chain": geometry numeric validation (geocheck) → independent solving verification (verify_answers) → vector paper export (export_paper). The wrong-question notebook directly reuses this chain: all AI-generated questions must pass these three steps; no naked generation.

2. Complete workflow

Upload photos (multiple allowed)
  → Visual model transcribes multiple questions (stem LaTeX, options, graphics bounding boxes, printed answers, handwriting marks)
  → Automatically crop original images by bounding boxes (authoritative graphics, 0 tokens)
  → [Human review view] left original image, right question card, KaTeX real-time rendering
      Check to store + mark error cause (careless/don't know/other) + graphics can use crop or manual box selection
      Grade and knowledge point auto-categorized (textbook knowledge tree), editable
  → Submit to bank: dedup against question bank → independent solving verification → chapter/difficulty/knowledge-point analysis
  → Workbench (filter/statistics/details)
  → Practice (single-question loop, auto-grading) / Exam (paper mode with checkboxes, unified grading with score + evaluation)
  → 3 consecutive correct → suggest archive → archive
  → Targeted paper generation (by chapter/knowledge point/difficulty ratio, original question variants or original) → vector PDF

3. Features list (V1.0)

1. Recording & typesetting machine (the most labor-intensive module)

2. Quality chain for entering the bank

3. Workbench

4. Practice and exam (two modes)

5. Multi-user

Storage is per-user with separate directories (question bank / drafts / photos), with header-based switching/creation of users and automatic migration of existing data. Two children's wrong questions don't interfere with each other.

4. Several key design decisions

1. Data as files, not SQLite

All data is JSON (atomic writes + .bak backup), human-readable, and git-versionable (the question bank itself is an important asset). At the scale of a few hundred questions, a single git log is the complete evolution history. Later, a test accident overwrote the question bank, and it was exactly the backup and git that recovered it.

2. Vectorization (SVG generation) changed from default to on-demand

The initial design was to automatically convert all geometry questions into standard vector figures. But testing showed this is the most token-consuming and slowest step in the entire pipeline (1–3 LLM calls per question plus geocheck failure retries). Version 0.6 flipped it: transcription defaults to photo crops (0 tokens), and standard graphics are generated on demand during human review. This saves more than half the overhead and greatly speeds up input.

3. Don't let the LLM freely choose knowledge points

Knowledge-point candidates come from the textbook knowledge base (a paper textbook is visually transcribed page by page into structured JSON). At input, the LLM can only select within the tree. Meanwhile, the knowledge-point candidates used for workbench filtering come from actual labels in the question bank, ensuring that whatever you select in the dropdown is searchable (the mismatch between textbook naming and LLM annotation naming is a real pitfall).

4. Human review is the product's core, not a transitional plan

The uncertainty of photo transcription (multi-question layouts, handwriting interference, print quality) makes fully automatic entry unreliable. Rather than chasing 'full automation', it's better to make the human review interface smooth: compare with the original image, check each question, mark error cause, and correct graphics, all within two clicks. AI handles 80% of the grunt work, and humans handle 20% of the judgment.

5. Pitfalls record (selected)

6. Next steps

Conclusion

The biggest takeaway from this project is: the value of an AI application is not in the model itself, but in the engineering surrounding it—the quality chain, the human review process, data management, and test regression. These seemingly dull efforts determine whether it can actually be used every day. Three days of development plus 12 iterations driven by real usage feedback, and it's now a tool my family uses daily.


This project is a self-use tool; the server deployment is not open-sourced. If you're interested in the quality chain (geocheck / verify_answers / export_paper) or the details of the wrong-question notebook implementation, you're welcome to discuss.