<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: MRZHU</title>
    <description>The latest articles on DEV Community by MRZHU (@mrzhu).</description>
    <link>https://dev.to/mrzhu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3888633%2F78796e15-e1d6-45fb-8d11-c8b0c1385f95.jpg</url>
      <title>DEV Community: MRZHU</title>
      <link>https://dev.to/mrzhu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrzhu"/>
    <language>en</language>
    <item>
      <title>Which OCR Should I Use for Handwritten Math Answers?</title>
      <dc:creator>MRZHU</dc:creator>
      <pubDate>Tue, 28 Jul 2026 02:17:11 +0000</pubDate>
      <link>https://dev.to/mrzhu/which-ocr-should-i-use-for-handwritten-math-answers-3em5</link>
      <guid>https://dev.to/mrzhu/which-ocr-should-i-use-for-handwritten-math-answers-3em5</guid>
      <description>&lt;p&gt;I am building an English website for a Gaokao math paper. Gaokao is the university entrance exam in China.&lt;/p&gt;

&lt;p&gt;Checking the objective questions is easy. Written questions give me a headache.&lt;/p&gt;

&lt;p&gt;For a written math question, a student may fill half a page with fractions, square roots and small notes. Chinese students write very fast in the exam, so the handwriting can be squeezed together. There may be crossed-out formulas, arrows, or a new step added between two old steps. A geometry question can also have a diagram.&lt;/p&gt;

&lt;p&gt;My first idea was to let the student take a photo and upload it. Then I thought about one simple problem. If OCR reads &lt;code&gt;x + 1&lt;/code&gt; as &lt;code&gt;x - 1&lt;/code&gt;, everything after that is useless. The system may still give a very confident-looking grade.&lt;/p&gt;

&lt;p&gt;This is the part I have not solved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools I found
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.mathpix.com/" rel="noopener noreferrer"&gt;Mathpix&lt;/a&gt; looks closest to this problem. It is made for math and other STEM content. It can read images, PDFs and stroke data. I think I will test it first for paper photos.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.myscript.com/docs/interactive-ink" rel="noopener noreferrer"&gt;MyScript iink&lt;/a&gt; is a different choice. It uses pen strokes when the user writes on a screen. This may be more accurate, but it also means I need to build a writing canvas and ask the student not to use paper.&lt;/p&gt;

&lt;p&gt;I also checked &lt;a href="https://docs.cloud.google.com/vision/docs/handwriting" rel="noopener noreferrer"&gt;Google Cloud Vision&lt;/a&gt; and &lt;a href="https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/prebuilt/read" rel="noopener noreferrer"&gt;Azure Document Intelligence Read&lt;/a&gt;. They can return handwriting and page layout. Maybe they can handle the Chinese or English notes while another service handles the formulas.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.microsoft.com/en-us/research/publication/trocr-transformer-based-optical-character-recognition-with-pre-trained-models/" rel="noopener noreferrer"&gt;TrOCR&lt;/a&gt; is another direction if I want an open-source model. I have not found a clear answer about a whole page with mixed text, formulas and diagrams.&lt;/p&gt;

&lt;p&gt;A vision model may help after OCR. I am careful about this idea. If a line is unclear, I want the system to mark it as unclear. I do not want the model to fill in the line because it knows what a normal solution should look like.&lt;/p&gt;

&lt;h2&gt;
  
  
  My rough plan
&lt;/h2&gt;

&lt;p&gt;I will first reject photos that are blurred, cropped or badly tilted. After that, I may use one recognizer for formulas and another one for normal handwriting. I also want to keep the position and confidence of every recognized part, instead of saving only a cleaned-up answer.&lt;/p&gt;

&lt;p&gt;The recognized work can then be compared with a solution and scoring rubric that I reviewed before the exam starts. When one important line cannot be read, the written score should stay provisional. It should not quietly become zero.&lt;/p&gt;

&lt;p&gt;I have not tested this plan yet. I need to make a small test set with real Gaokao-style handwriting, including bad handwriting and crossed-out work. Testing only the clean examples from a service demo will tell me very little.&lt;/p&gt;

&lt;h2&gt;
  
  
  I would like some advice
&lt;/h2&gt;

&lt;p&gt;Has anyone here used these tools for handwritten mathematics from phone photos?&lt;/p&gt;

&lt;p&gt;I mainly want to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is Mathpix good enough for multi-line calculation?&lt;/li&gt;
&lt;li&gt;Is keeping the pen strokes worth the extra work?&lt;/li&gt;
&lt;li&gt;What open-source model should I put into the test?&lt;/li&gt;
&lt;li&gt;How do you decide that an answer is too unclear to grade?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project is here: &lt;a href="https://gaokaoexam.org/" rel="noopener noreferrer"&gt;gaokaoexam.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At present I still do not know whether photo upload is practical, or whether I should ask students to write on a screen. If you have worked on a similar problem, I would like to hear what failed in your first attempt.&lt;/p&gt;

</description>
      <category>ocr</category>
      <category>machinelearning</category>
      <category>ai</category>
      <category>help</category>
    </item>
    <item>
      <title>I Stopped Tuning Prompts and Started Collecting Real Comments</title>
      <dc:creator>MRZHU</dc:creator>
      <pubDate>Tue, 12 May 2026 12:53:10 +0000</pubDate>
      <link>https://dev.to/mrzhu/i-stopped-tuning-prompts-and-started-collecting-real-comments-eg6</link>
      <guid>https://dev.to/mrzhu/i-stopped-tuning-prompts-and-started-collecting-real-comments-eg6</guid>
      <description>&lt;p&gt;When I started building an AI comment generator, my first instinct was obvious:&lt;/p&gt;

&lt;p&gt;Tune the prompt harder.&lt;/p&gt;

&lt;p&gt;I tried to make the model sound more casual. Then more specific. Then less robotic. Then more like a real TikTok user. Then less like a marketing intern pretending to be a real TikTok user.&lt;/p&gt;

&lt;p&gt;That approach worked a little.&lt;/p&gt;

&lt;p&gt;But after a while, it felt wrong.&lt;/p&gt;

&lt;p&gt;I was asking AI to invent the shape of a good comment from second-hand assumptions. I was not looking closely enough at the thing I was trying to generate.&lt;/p&gt;

&lt;p&gt;The better question was not:&lt;/p&gt;

&lt;p&gt;“How do I prompt the model to write better comments?”&lt;/p&gt;

&lt;p&gt;The better question was:&lt;/p&gt;

&lt;p&gt;“What do real high-engagement comments actually look like?”&lt;/p&gt;

&lt;p&gt;That changed the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt tuning is second-hand data
&lt;/h2&gt;

&lt;p&gt;Prompt tuning is useful, but it can become a trap.&lt;/p&gt;

&lt;p&gt;If I write:&lt;/p&gt;

&lt;p&gt;“Make this comment sound natural, casual, and engaging,”&lt;/p&gt;

&lt;p&gt;the model has to guess what “natural” means.&lt;/p&gt;

&lt;p&gt;If I write:&lt;/p&gt;

&lt;p&gt;“Make this comment sound like TikTok,”&lt;/p&gt;

&lt;p&gt;the model usually reaches for a vague internet voice. Short sentences. A little humor. Maybe an emoji. Maybe a phrase like “this is so real.”&lt;/p&gt;

&lt;p&gt;That can produce something passable, but it is still built on a stereotype of the platform.&lt;/p&gt;

&lt;p&gt;It is second-hand data.&lt;/p&gt;

&lt;p&gt;The model is not learning from what people actually liked, replied to, argued with, or remembered. It is learning from my opinion about what I think people like.&lt;/p&gt;

&lt;p&gt;That felt too weak for a product.&lt;/p&gt;

&lt;h2&gt;
  
  
  So I started collecting real comments
&lt;/h2&gt;

&lt;p&gt;For this project, I started collecting high-engagement short-form video comments as research material.&lt;/p&gt;

&lt;p&gt;The goal is to keep expanding this into a much larger dataset, eventually tens of thousands of high-like and high-reply comments across different niches.&lt;/p&gt;

&lt;p&gt;That matters because “good comment” is not one thing.&lt;/p&gt;

&lt;p&gt;A good comment on a fitness transformation video is different from a good comment on a gaming clip. A good comment under a storytime video is different from a good comment under a creator advice video.&lt;/p&gt;

&lt;p&gt;If I only tune prompts, I miss that.&lt;/p&gt;

&lt;p&gt;If I look at real comments, patterns start to show up.&lt;/p&gt;

&lt;h2&gt;
  
  
  One high-liked comment says more than a generic prompt
&lt;/h2&gt;

&lt;p&gt;One comment in my dataset had 243,581 likes:&lt;/p&gt;

&lt;p&gt;“Everyone talking about Meryl, however, no one pointed out Anne's shaky voice after Meryl's glare, that's top notch acting right there.”&lt;/p&gt;

&lt;p&gt;That comment works because it is not just praise.&lt;/p&gt;

&lt;p&gt;It does three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It notices a specific detail&lt;/li&gt;
&lt;li&gt;It points out that other viewers missed it&lt;/li&gt;
&lt;li&gt;It makes a judgment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is much stronger than:&lt;/p&gt;

&lt;p&gt;“Great acting, such an amazing scene.”&lt;/p&gt;

&lt;p&gt;The second comment is positive, but empty. It could be posted under almost any clip.&lt;/p&gt;

&lt;p&gt;The first comment proves the viewer actually saw something.&lt;/p&gt;

&lt;p&gt;That is the kind of pattern I want the product to learn from.&lt;/p&gt;

&lt;h2&gt;
  
  
  The useful signal is in the pattern, not the exact sentence
&lt;/h2&gt;

&lt;p&gt;I do not want to copy high-liked comments.&lt;/p&gt;

&lt;p&gt;That would be useless and wrong.&lt;/p&gt;

&lt;p&gt;The useful part is the structure.&lt;/p&gt;

&lt;p&gt;For example, this pattern appears again and again:&lt;/p&gt;

&lt;p&gt;“Everyone is talking about X, but no one is mentioning Y.”&lt;/p&gt;

&lt;p&gt;That is a powerful comment shape because it creates a small discovery moment. The commenter is not just reacting. They are reframing what everyone else is watching.&lt;/p&gt;

&lt;p&gt;Another common pattern is:&lt;/p&gt;

&lt;p&gt;“I thought X was the point, but Y is what got me.”&lt;/p&gt;

&lt;p&gt;That works because it has a turn.&lt;/p&gt;

&lt;p&gt;Another one:&lt;/p&gt;

&lt;p&gt;“As someone who has been in this situation, this part is painfully accurate.”&lt;/p&gt;

&lt;p&gt;That works because it adds lived context.&lt;/p&gt;

&lt;p&gt;These are not magic phrases&lt;/p&gt;

&lt;p&gt;They are interaction patterns.&lt;/p&gt;

&lt;p&gt;That is what I missed when I was only tuning prompts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The product lesson
&lt;/h2&gt;

&lt;p&gt;When I started working on Comment Generator Pro[&lt;a href="http://www.commentgenerator.pro" rel="noopener noreferrer"&gt;www.commentgenerator.pro&lt;/a&gt;], I thought the hard part would be generating enough comment variations.&lt;/p&gt;

&lt;p&gt;Now I think the hard part is building the right input system.&lt;/p&gt;

&lt;p&gt;A comment generator should not just produce text. It should protect the user from producing generic text.&lt;/p&gt;

&lt;p&gt;That means the tool needs to be grounded in real comment behavior.&lt;/p&gt;

&lt;p&gt;Not just prompt tricks.&lt;br&gt;
Not just tone sliders.&lt;br&gt;
Not just “make it casual.”&lt;/p&gt;

&lt;p&gt;Real data changes what you notice.&lt;/p&gt;

&lt;p&gt;High-like comments are often specific, but not polished.&lt;br&gt;
They are emotional, but not always positive.&lt;br&gt;
They are short, but not empty.&lt;br&gt;
They often contain a twist, a missed detail, or a personal admission.&lt;/p&gt;

&lt;p&gt;That is hard to invent from a prompt alone.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
