Below we summarize how Nabla Grader works and open-source the key steps to reproduce our system.
The teacher submits the question PDF and an optional solution PDF. Nabla Grader transcribes the exam and produces a grading scaffold with the question numbers, a suggested solution and grading guidelines for each question. The teacher can then review and correct the scaffold. This XML exam scaffold ensures that every student is graded fairly, with a shared scale and grading policy.
Students submit their written exam, for instance as a phone scan. The exam is first transcribed from PDF to markdown, a format that handles mathematical formulas well. The markdown is then compared to the grading scaffold, with the result written in XML. Comparing every submission to the same scaffold keeps grading fair across students: each answer is matched to a clear question, solution and grading policy.
Text in {braces} is filled in for each submission.
Transcribe this student exam page into markdown. It may contain printed questions and handwritten answers. FORMAT: - Use markdown: ## headings, - lists, **bold**, etc. - Transcribe printed text as-is. MATH — CRITICAL: - ALL math expressions MUST be wrapped in dollar signs. No exceptions. - Inline: $x^2$, $\frac{a}{b}$, $\sum_{i=1}^n x_i$ - Display (standalone equation on its own line): $$\hat{w} = (X^TX)^{-1}X^Ty$$ - NEVER write bare LaTeX like \frac{a}{b} without $ delimiters. - Matrices: use $$ with \begin{pmatrix}...\end{pmatrix} $$. - Pseudocode and algorithms: use plain text or ``` code blocks, NOT LaTeX. HANDWRITTEN ANSWERS: - Keep any question or task number the student wrote (e.g. "Task 2.3", "4.1") exactly as it appears. Do not add, invent, or renumber anything. - Students may write answers on later pages — transcribe where they appear. - Checkboxes (multiple choice): keep every option with its box, in order, and never drop a box. ☑ = box ticked or crossed. ☐ = empty box. A box that is fully filled in or scratched out is a cancelled tick (the student changed their mind): write ■ [cancelled]. It does not count as ticked. RULES: - Transcribe handwriting VERBATIM. Never correct the student's answer. - Crossed out with replacement: transcribe the replacement only. - Crossed out without replacement: [crossed out] - Unreadable: [unreadable] - No answer found: [no answer] - Hand drawings: [hand drawing description: ...] - IGNORE any printed page numbers on the exam sheet. The scan page number is provided separately via <!-- Page N --> markers and is the only page reference that matters. - Output ONLY the transcription, no commentary. You are given {k} scan pages (scan pages {page numbers}). Transcribe EACH page separately. Start each page with a marker line: <!-- Page N --> where N is the scan page number ({page numbers} respectively, in order). Separate pages with --- on its own line.
Text in {braces} is filled in for each submission.
You are grading a student exam. You receive: 1. The OFFICIAL SOLUTION (correct answers) 2. The STUDENT'S ANSWERS (OCR transcription of their handwritten/typed work) For each question in the solution, find what the student wrote, and grade it. CRITICAL — what goes in each XML element: - <q>: The question text, copied from the SOLUTION document. - <a pages="N"> or <a pages="N,M,O">: The STUDENT'S answer, copied VERBATIM from the student transcription. The pages attribute lists which SCAN page(s) the answer was found on. Use the numbers from the <!-- Page N --> markers in the transcription, NOT any page numbers printed on the exam sheet. Use comma-separated values if the answer spans multiple pages. DO NOT put the solution/correct answer here. This must be exactly what the student wrote. If the student wrote nothing for this question, use: [no answer] - <c>: Your grading justification, 10 to 50 words. Explain why you awarded these points. FINDING STUDENT ANSWERS: - Search the ENTIRE student transcription — students write answers on later pages. - Match answers to questions by the student's own task/question numbering when present, otherwise by content and position on the page. - If a student's answer appears in multiple places, concatenate them. - NEVER copy from the solution into <a>. The <a> element must only contain text found in the STUDENT transcription. OUTPUT FORMAT: XML with CDATA sections for all text content. Use <![CDATA[...]]> around ALL text in <q>, <a>, and <c> elements. MATH IN CDATA: use $...$ for inline and $$...$$ for display math. Example — notice <a> contains the student's own words, NOT the correct answer: ```xml <?xml version="1.0" encoding="UTF-8"?> <exam> <task id="T1" title="Linear Regression" max_points="5"> <question id="T1.1" max_points="3"> <q><![CDATA[Derive the closed-form solution of linear regression.]]></q> <a pages="1" is_student_answer_empty="false"><![CDATA[The student wrote: $w = X^{-1} y$]]></a> <c points="0.5" status="partial"><![CDATA[The student attempted to invert $X$ directly, but $X$ is generally not square. The correct derivation uses the normal equation: $\hat{w} = (X^TX)^{-1}X^Ty$.]]></c> </question> <question id="T1.2" max_points="2"> <q><![CDATA[What is the time complexity of the closed-form solution?]]></q> <a pages="0" is_student_answer_empty="true"><![CDATA[[no answer]]]></a> <c points="0" status="zero"><![CDATA[No answer provided. Expected: $O(d^3)$ due to matrix inversion.]]></c> </question> </task> </exam> ``` For every <a>, decide is_student_answer_empty BEFORE scoring: "true" when the student wrote no answer for that question (the answer region is blank or only repeats the printed question text), otherwise "false". When it is "true", <a> is [no answer] and <c points> is 0 — never invent an answer to fill the structure. MISSING / UNANSWERED QUESTIONS: Include every question from the OFFICIAL SOLUTION exactly once, even if it is absent from the student transcription. If a question does not appear in the transcription — e.g. its page was not scanned or is missing — assume it was not answered: set is_student_answer_empty="true", put [no answer] in <a>, and score 0. Never drop a question, and never shift answers between questions to make the pages line up. GRADING: - Award points in 0.5 increments from 0 to max_points. - status: "full" (points == max), "partial" (0 < points < max), "zero" (points == 0) - Be strict but fair. Accept equivalent formulations. POINT VALUES: - If the solution document specifies points per question (e.g., "(5P)", "(3 points)", "worth 2 marks"), use those exact values. - If point values are NOT specified anywhere in the document, default to 1 point per smallest sub-question (T1.1, T1.2, ...). In that case, add the attribute points_specified="false" to the <exam> root element. - If the document states an overall exam total but no per-question values, distribute evenly across the sub-questions. STRUCTURE: - task max_points = sum of question max_points. - Number questions T1.1, T1.2, ... within each task. - Multi-part questions: multiple <q>/<a> pairs, single <c> for all parts. Output ONLY the XML. No commentary, no markdown fences around the XML. OCR GRADING NOTES (the student answers were transcribed by OCR from scanned pages): - The OCR often reproduces the printed question text even when the answer box is empty, so the transcription may repeat the question (which you also have in the OFFICIAL SOLUTION) where the student in fact wrote nothing. Treat such a question as empty: set is_student_answer_empty="true", put [no answer] in <a>, score 0. Never reconstruct or invent an answer to fill the structure. - MULTIPLE-CHOICE PENALTY: the "0 to max_points" range does NOT apply when the solution's rubric specifies a penalty. When the rubric states e.g. "-0.5 for a wrong answer or if two boxes are ticked", award that negative value (e.g. <c points="-0.5" status="penalty">) for a wrong or double-ticked item; a blank or unanswered MC scores 0 (is_student_answer_empty="true"). A box transcribed as "■ [cancelled]" was withdrawn by the student: it is not ticked and does not make the item double-ticked. - Put points only on the smallest leaf sub-question (a parent with sub-parts carries none); include every solution question exactly once. --- ## AUTHORITATIVE GRADING STRUCTURE (MANDATORY): The XML below defines the EXACT task ids, leaf question ids, and max_points you MUST use. Reuse these ids and max_points VERBATIM. Output exactly one <question> per <question> below — same id, same max_points — no more and no fewer. Do NOT add a parent question on top of its sub-parts, and do NOT split or merge any item. Points live ONLY on these leaves. {task and question ids with max_points, from the exam scaffold} --- ## OFFICIAL SOLUTION: {question text and grading instructions, from the exam scaffold} --- ## STUDENT'S ANSWERS: {student transcription from the OCR step} --- Now output the XML correction.
A few minutes after submission, Nabla Grader typically issues a first AI correction and grade recommendation. Students then receive an email inviting them to review their submission. During the appeal period set by the teacher, typically the first week after submission, students can appeal any question: to correct a misread handwriting, or to contest a point attribution they find unfair or too strict.
The teacher exports the grades as a .csv file and imports them into the institution's grading system.
We tested the system in two courses during the 2026S semester. In the graded exams, every one of the 348 students received a grade, and 51 of them (15%) appealed at least one question, 174 appeals in total. The teacher resolved every appeal before validating the grades. Although we tested open-source models, we currently obtain more stable results with Claude Sonnet 5.5. It also gave higher grade alignment when tested against fully human-graded exams.