Inspiration
Practice testing works. In a large review of ten popular study techniques, Dunlosky et al. (2013) gave practice testing one of the two highest utility ratings, while favorites like highlighting and rereading scored low. The catch is that good practice questions take time to write.
So students paste their notes into a chatbot. It answers in seconds, but you can't tell which questions came from your notes and which were invented. Research on AI-written multiple-choice questions finds exactly that kind of error: answer keys that are wrong, or more than one correct option (Olney, 2023; arXiv:2412.01955). The night before an exam, a wrong quiz is worse than no quiz.
We wanted a quiz that shows its work: every answer tied to a sentence you can read, and anything that can't be backed up never reaching you.
What it does
Citewise turns your own notes (pasted text, .txt, .md, or a PDF) into a practice quiz in one click.
- Every question cites its proof: Your notes are split into numbered sentences ($S_1, S_2, \dots, S_n$). Each question must cite the sentences it came from, and after you answer, that sentence lights up in your notes.
- Double-checked before you see it: Code confirms every citation is real. Then a second AI re-answers each question using only the cited sentence, without seeing the answer key. If it disagrees, the question is dropped, and the review shows exactly why.
- Multiple choice, free write, or a mix: For free-write questions, the AI grades your answer against verified key points:
✓/✗for each point, partial credit, and feedback that cites your notes. You can override a grade if you disagree. - Tools on every question: A scientific calculator, a graphing calculator, and a whiteboard (one page per question) in a floating panel beside the question.
- Nimbus, your study buddy: A watercolor cloud mascot who answers only from your notes, links every sentence it uses, and gives hints—not answers—until you've tried. A code-level spoiler guard hides the answer if the AI slips.
- Review that teaches: Your answer, the right answer, and the proof sentence side by side, plus a Retry only the ones I missed mode.
- Built to fail gracefully: Unreadable files are caught before any AI is used. Outages get automatic retries and then a backup quiz built from your notes without AI. Nothing you typed is ever lost.
- Painted interface & guided demo: A painted golden-hour / moonlit interface (light and dark mode) and a 3½-minute guided demo that runs without an API key.
How we built it
Citewise is a static web app with no server and no build step for users. It runs entirely in the browser and talks directly to Google's Gemini API with the student's own free key.
The pipeline
- Read and number: Clean the text, reject unreadable input, and split it into sentences with exact character offsets so a citation can be highlighted precisely.
- Write:
gemini-flash-latestwrites questions as structured JSON, each withevidence: [{id, quote}]. For free-write questions, it also returns amodelAnswerand 1–3keyPoints. - Verify citations in code: A quote is accepted if it appears exactly, after normalizing, or if enough of its content words appear in the cited sentence: $$\text{overlap}(q, s) = \frac{|W(q) \cap W(s)|}{|W(q)|} \ge 0.8$$ where $W(\cdot)$ is the set of content words (stop-words removed). Every free-write key point must also be covered by its cited sentences, so the grader can never reward "facts" that aren't in the notes.
- Blind check:
gemini-flash-lite-latestsees each question and its cited sentences, but never the key or the full notes. It must pick the supported option (or say none), and disagreements are dropped. - Grade: Free-write answers are graded by the checker model against the key points. A question's credit is: $$c_i \in \left{0, \tfrac{1}{2}, 1\right}, \qquad \text{score} = \frac{1}{N}\sum_{i=1}^{N} c_i$$ If the AI grader is unavailable, a deterministic quick check takes over and says so. It marks a key point as covered when at least 60% of its stemmed content words appear in the answer, allowing one typo per long word.
The rest
- Reliability: Exponential backoff for rate limits and outages ($t_n = 2^{n-1}\text{ s}$ plus jitter), timeouts, JSON repair, and a structured-output fallback after Google renamed the schema fields mid-hackathon.
- Tools: Our own safe math parser (no
eval), supporting implicit multiplication like2sin(30), plus degree/radian modes,Ans, and factorials. The graph and whiteboard are drawn on<canvas>, and whiteboard strokes are stored as vectors per question. - Design: The watercolor sky, clouds, birds, and Nimbus are all drawn in code (Canvas and SVG, with no image assets). The visual direction was inspired by the MotionSites gallery.
- Shipping: A tiny dependency-free bundler inlines everything, including
pdf.js, into two HTML files that work by double-click or on GitHub Pages. - Testing: 33 Node unit and pipeline tests with a fake Gemini, plus Playwright end-to-end tests for the quiz, failures, tools, free write, Nimbus, and the guided demo's pacing.
Note: We built Citewise with heavy AI coding assistance (details in the AI section of this submission).
Challenges we ran into
- The API changed under us: Gemini's structured-output field names and its guidance on sampling parameters changed mid-hackathon. We added an automatic fallback across three request formats, with a test for it.
- Age requirements: Google's Gemini API terms require users to be 18+, which changed our target users from high-schoolers to university students. We kept a no-key backup mode for everyone else.
- "It didn't work" on double-click: Browsers block ES modules on pages opened from a file on disk (
file://), so our first build showed a blank, unstyled page. The fix was a single-file build with everything inlined. - Watercolor is hard to fake: Our first procedural clouds looked like cookies, then like strings of pearls. Painting one silhouette with a flat base, top-down light, and rim-lit caps finally read as clouds.
- Spoilers: Even when told to give hints, a model can blurt out the answer. We added a code-level redaction step that we can actually test.
- Keyboard collisions: Typing
1in the calculator used to answer question 1! Tool events are now isolated from the quiz shortcuts. - A demo people won't skip: We capped every caption at about 6 seconds and enforce it in a test, so the guided tour keeps moving.
Accomplishments that we're proud of
- Zero unverified questions: Questions can't reach the student without passing two independent checks—a deterministic citation check and a blind AI re-answer.
- 100% grounded claims: Every claim in the app (questions, grades, Nimbus's answers) links back to a sentence in your own notes.
- Resilient by design: Every failure we could think of has a designed, tested response, and no failure loses your work.
- Zero-friction access: It's free for students, needs no install, and the whole app ships as two HTML files.
What we learned
- Verification beats generation: The most valuable AI design work was checking—making the model cite IDs we could verify, and giving a second model less information so its agreement means something.
- Make LLM output checkable by design: Asking for sentence IDs instead of free quotes turned "Is this hallucinated?" into a simple lookup.
- Graceful failure is a feature: Backup quizzes, quick-check grading, and retries matter just as much as the happy path.
- Read the terms and the changelog: Both changed our design during a single week.
What's next for Citewise
- OCR support: Parsing scanned PDFs and photos of handwritten notes.
- Spaced repetition: Resurfacing missed questions on an adaptive schedule.
- Interactive STEM inputs: Diagram and formula questions using the graphing calculator and whiteboard directly as answer inputs.
- Broader reach & benchmarks: Support for more languages and evaluation beyond English biology and history notes.
- Teacher mode: Letting instructors share a verified question set with a class.
Built With
- canvas
- claude
- css3
- gemini
- gemini-api
- gemini-flash
- gemini-flash-lite
- github
- google-fonts
- html5
- javascript
- json-schema
- localstorage
- node-test-runner
- node.js
- pdf.js
- playwright
- python
- svg
- view-transitions-api