Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Notewise

Problem: students paste notes into a chatbot and cannot tell which parts of a confident answer came from their notes and which were made up. Solution: Notewise, a local study tutor that answers only from your notes, cites the exact lines, refuses when the notes do not cover it, and makes you explain topics back. AI used: local Qwen2.5-1.5B-Instruct (optional 3B) through Ollama, with BM25Plus retrieval and citation verification. No cloud API.

Inspiration

Students paste lecture notes into a chatbot and get confident answers that are partly from the notes and partly made up, with no way to tell which part is which. When you are studying for an exam, a wrong answer that sounds right is worse than no answer. I wanted a tutor that is honest about where every sentence comes from, and that makes the student do the thinking instead of handing over the answer.

What it does

  • Ask: every answer cites the note passages it came from. Click a citation and the notes panel scrolls to those lines and highlights them. If the answer is not in the notes, it says so.
  • Tutor me: instead of the answer you get one guiding question and a hint about which section of your notes to reread.
  • Explain it back: write what you think a topic means. Notewise splits it into claims and checks each one against your notes: what you got, what you missed, and which claims contradict your notes, each with the note sentence that shows why.
  • Private by design: the model runs locally through Ollama (default Qwen2.5-1.5B-Instruct). Notes stay in memory on your machine; nothing is sent to a cloud API.

How we built it

  • Python + FastAPI backend, plain HTML/CSS/JS frontend, Ollama for local inference.
  • Notes are chunked on markdown headings and paragraphs; each chunk keeps its file name and line range so citations point at real lines.
  • BM25Plus retrieval. Guard 1: if no chunk scores above a threshold, Notewise answers "not in your notes" without calling the model at all.
  • The model sees only the retrieved chunks and must reply in JSON (in_notes, answer, citations), temperature 0, fixed seed.
  • Guard 2: citations that were not retrieved are dropped, and a citation is kept only if its chunk really contains a good share of the answer's words. If no citation survives, the answer is withheld.
  • Explain it back checks one claim per model call, requires a quoted evidence sentence that must really be in the cited chunk, and needs a second pairwise "do these disagree?" check before it calls a claim contradicted.
  • An eval harness measures all of this from real runs.
  • Built with Claude Code (an AI coding agent) running as my hackathon agent: I set the goal and the ground rules, and Claude Code picked the idea, wrote the code, and checked every feature and number by running the app and the eval scripts.

Challenges we ran into

  • The first version of Explain it back judged the whole paragraph in one prompt and caught 0 of 6 planted errors: the small model just restated the notes as "covered". Checking one claim at a time with quoted evidence fixed most of that.
  • Small models over-cite and copy JSON placeholders, so citations had to be verified against the cited chunk's words.
  • BM25Okapi scored zero on tiny note sets (idf goes to zero when a word is in half the chunks), so I switched to BM25Plus.
  • Tuning on an eval set makes the numbers look better than they are, so I wrote a held-out set before looking at its outputs and ran it once.

Accomplishments that we're proud of

  • Grounded Q&A with the default 1.5B model: right chunk cited on 25 of 28 answerable questions, and 15 of 16 questions that are not in the notes correctly refused (3B: 26/28 and 16/16). Median answer time 0.71 s on a laptop GPU.
  • Explain it back on the held-out set, run once with no changes after: 1.5B caught 5 of 6 planted errors and left 5 of 6 correct explanations unflagged.
  • An honest limits section: the 3B model once accepted a wrong claim on the held-out set, and the README says so.

What we learned

  • For a study tool, failing toward "not in your notes" is a feature, not a bug.
  • Small local models can be useful when you give them one narrow question at a time and verify what they quote.
  • Held-out evaluation matters even for a hackathon project: it showed weaknesses the tuning set hid.

What's next for Notewise

  • PDF and slide import, saved note libraries, and spaced-repetition review built from the claims a student missed.
  • A larger evaluation set written by other students.

Limitations and external dependencies

  • A 1.5B model misses some planted errors and can phrase answers loosely; the word-overlap support check is a heuristic, not proof.
  • Tutor hints sometimes say too much; if the guiding question repeats the student's question, Notewise retries once and then points to the right section.
  • Plain text and markdown notes only; notes are cleared on restart; single user, local only.
  • External dependencies: Ollama, Qwen2.5 models (1.5B Apache-2.0; optional 3B under the Qwen Research License, not shipped), FastAPI, Uvicorn, HTTPX, rank_bm25.

Links

Built solo by Ferbin with Claude Code (an AI coding agent) directed by me; every number above comes from real eval runs in the repo's eval/ folder.

Built With

Share this project:

Updates

Submission history