<?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: Parth Mishra</title>
    <description>The latest articles on DEV Community by Parth Mishra (@pm2m1).</description>
    <link>https://dev.to/pm2m1</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%2F4192055%2Fec089449-c1f4-4384-86ce-a0e9fb866499.png</url>
      <title>DEV Community: Parth Mishra</title>
      <link>https://dev.to/pm2m1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pm2m1"/>
    <language>en</language>
    <item>
      <title>I gave an AI tutor a map of 8,117 ways students get maths wrong</title>
      <dc:creator>Parth Mishra</dc:creator>
      <pubDate>Sun, 18 Oct 2026 13:05:10 +0000</pubDate>
      <link>https://dev.to/pm2m1/i-gave-an-ai-tutor-a-map-of-8117-ways-students-get-maths-wrong-240i</link>
      <guid>https://dev.to/pm2m1/i-gave-an-ai-tutor-a-map-of-8117-ways-students-get-maths-wrong-240i</guid>
      <description>&lt;p&gt;Two students both score 40% on a fractions quiz.&lt;/p&gt;

&lt;p&gt;Asha gets them wrong because she can't find a lowest common multiple — a skill from a different topic, two steps below the question she missed. Ben gets them wrong because when he makes an equivalent fraction, he changes only the denominator.&lt;/p&gt;

&lt;p&gt;Same score. Opposite problems. A chat tutor sees two 40%s, explains the question again, and forgets both of them by tomorrow.&lt;/p&gt;

&lt;p&gt;That's the problem I picked for Graph Hacks (WeMakeDevs × FalkorDB). The result is &lt;strong&gt;Unlearn&lt;/strong&gt;: a tutor that finds the prerequisite that actually broke, remembers it next session, and shows the database query behind every claim.&lt;/p&gt;

&lt;p&gt;👉 Live demo: &lt;a href="https://unlearn-ejdh.onrender.com" rel="noopener noreferrer"&gt;https://unlearn-ejdh.onrender.com&lt;/a&gt;&lt;br&gt;
👉 Code: &lt;a href="https://github.com/pm2m1/unlearn" rel="noopener noreferrer"&gt;https://github.com/pm2m1/unlearn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxphuevb5fzg5siqusrst.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxphuevb5fzg5siqusrst.png" alt="Unlearn: Asha's root cause, lowest common multiple, traced two levels down the prerequisite graph" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a graph?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs5kimhwm1boyjgqhfiic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs5kimhwm1boyjgqhfiic.png" alt="Unlearn's graph model: a wrong option points to a misconception, which lives in a skill, which requires other skills. Asha's path to her root cause is highlighted in amber." width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The interesting question isn't "which answer was wrong", it's "why". And "why" is a chain of connections:&lt;/p&gt;

&lt;p&gt;wrong option → misconception → the skill it shows up in → the skill &lt;em&gt;that&lt;/em&gt; skill depends on → the student → their class.&lt;/p&gt;

&lt;p&gt;That's a graph. I used the Eedi Misconceptions Graph (CC BY 4.0): 8,117 real misconceptions and 2,258 maths skills, collected from real teaching. I took a fractions slice of 40 skills, added 57 hand-checked "this skill requires that skill" edges, 120 multiple-choice questions where every wrong option is tagged with the misconception it reveals, and 8 teaching strategies.&lt;/p&gt;

&lt;p&gt;Everything lives in FalkorDB. Each class gets its own graph, copied from a template with &lt;code&gt;GRAPH.COPY&lt;/code&gt;, so one class's memory never leaks into another's.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it finds the root cause
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcf8s3z7hqwxgyjrjnh24.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcf8s3z7hqwxgyjrjnh24.png" alt="Every claim comes with the Cypher query and rows that produced it" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Diagnoser agent asks a few adaptive questions. A correct answer rules out that skill and everything below it; a wrong one adds evidence. Then one query walks up to four steps down the prerequisite chain and ranks the unmastered skills by weighted misconception evidence — deeper wins ties, because the deepest broken skill is the real cause.&lt;/p&gt;

&lt;p&gt;Simplified (the real one is in &lt;code&gt;api/unlearn/queries.py&lt;/code&gt;):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MATCH (s:Student {id:$sid})
MATCH path = (t:Construct {id:$target})-[:REQUIRES*1..4]-&amp;gt;(p:Construct)
OPTIONAL MATCH (s)-[e:SHOWED]-&amp;gt;(:Misconception)-[w:SEEN_IN]-&amp;gt;(p)
WITH p, length(path) AS depth, sum(e.count * e.confidence * w.w) AS evidence
RETURN p.name, depth, evidence
ORDER BY evidence DESC, depth DESC LIMIT 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For Asha, it lands on "lowest common multiple", two levels below the fraction question. For Ben, it lands on "equivalent fractions". The graph panel lights the path up in amber.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory that lives in the graph, not the prompt
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh0gxij5ad0sc16iq9zxy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh0gxij5ad0sc16iq9zxy.png" alt="Session 2 opens with what the graph remembers about Asha" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every answer, diagnosis and tutoring attempt is written back as nodes and edges. When Asha comes back, the Tutor agent opens with "Last time you…" — straight from a recall query. Agents hand work to each other through task nodes in the same graph, and the Tutor learns which teaching strategy works by updating a success rate on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The teacher stays in charge
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F42ks4k355g9u156n3h0s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F42ks4k355g9u156n3h0s.png" alt="Teacher view: cohorts from algo.WCC, keystone skills from PageRank, and proposals waiting for approval" width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Teacher view runs graph algorithms as tools: &lt;code&gt;algo.WCC&lt;/code&gt; groups students who share the same confident misconceptions, PageRank finds the keystone skills everything depends on, and betweenness finds misconceptions that leak across topics. The Teacher agent can only &lt;em&gt;propose&lt;/em&gt; actions, regroup these students, assign this practice. Nothing changes until a human clicks Approve.&lt;/p&gt;

&lt;p&gt;There's also a chat. The LLM can only call fixed graph tools (no raw Cypher), and every name it says is checked against the rows those tools returned. If it invents something, the answer is thrown away and a plain template answers instead. The same tools are exposed over MCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does it actually work?
&lt;/h2&gt;

&lt;p&gt;I compared four setups on 90 simulated students (3 seeds), same questions, same local model (qwen 27B via Ollama) for the baselines:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Root cause found&lt;/th&gt;
&lt;th&gt;Top-1 misconception&lt;/th&gt;
&lt;th&gt;Remembered next session&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A. LLM, no memory&lt;/td&gt;
&lt;td&gt;32% [22–42]&lt;/td&gt;
&lt;td&gt;7%&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;~15 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B. LLM + vector RAG&lt;/td&gt;
&lt;td&gt;37% [27–47]&lt;/td&gt;
&lt;td&gt;7%&lt;/td&gt;
&lt;td&gt;9%&lt;/td&gt;
&lt;td&gt;~7.5 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;C. Unlearn (graph)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;72% [63–81]&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;48%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;57%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~50 ms&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Brackets are 95% bootstrap intervals; the root-cause gap doesn't overlap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The honest part:&lt;/strong&gt; the students are simulated, and the simulator uses the same option-to-misconception map Unlearn uses — that favours Unlearn. So I stress-tested it: with 20% of answers replaced by random noise, Unlearn still beats every baseline's &lt;em&gt;clean&lt;/em&gt; score. At 40% noise it stops winning everywhere. Treat these numbers as an upper bound, not a classroom result.&lt;/p&gt;

&lt;p&gt;I also tried pasting the whole graph into the LLM's prompt (30 students): it reached 40% root cause against Unlearn's 63% on the same students but with only 30 students the intervals overlap, so I won't claim that one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;My own data.&lt;/strong&gt; I reviewed every hand-written prerequisite edge and distractor one by one. I found 11 problems (2 bad edges, 9 misleading options), fixed them, and re-ran the whole eval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I scored a baseline unfairly.&lt;/strong&gt; The "graph in the prompt" baseline was only credited for answers from a short list. Fixing that raised its score. Embarrassing, but better found by me than by a judge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FalkorDB races.&lt;/strong&gt; Copying a class graph while another process recreated it threw "key is already set"; on the free tier, &lt;code&gt;GRAPH.COPY&lt;/code&gt; once failed with "could not fork". Both are now retried and documented.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A UI regression&lt;/strong&gt; made the Teacher tab blank whenever one slow query timed out, all four cards loaded together. Now each loads on its own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The chat couldn't find "Rosa"&lt;/strong&gt; because tools want student ids, not names. It confidently said it had no records. Fixed with a name lookup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free-tier reality:&lt;/strong&gt; Gemini's free quota runs out fast, so the live site falls back to recorded and template answers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;The misconception graph is real; the students aren't. The next step is validating on real student responses, like Eedi's NeurIPS 2020 Education Challenge data, and growing beyond fractions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;p&gt;FalkorDB 4.20.7 · Python/FastAPI · Cytoscape.js · fastembed · Ollama / Gemini · MCP · Render.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built for Graph Hacks (WeMakeDevs × FalkorDB) AI helped me with Documentation, reviewed myself.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>database</category>
      <category>hackathon</category>
      <category>education</category>
    </item>
  </channel>
</rss>
