Inspiration

Students drown in lecture slides, PDFs and textbooks. General chatbots answer fast but invent formulas, cite nothing, and can't be trusted before an exam. We wanted a tutor that teaches only from your material, shows exactly where each fact came from, and doesn't make up math.

What it does

  • Upload your course material: PDFs, PowerPoint slides, Markdown or text notes, and slide images. A whole textbook is fine.
  • Ask questions and get a structured, teaching-style answer with numbered citations [1] [2]. Each citation names the file and page, and the cited PDF page is rendered under the answer.
  • Choose the source: Notes (only your material), Web (academic web search via Tavily) or Both. Grounding is always explicit, and if your notes don't cover a question, the tutor says so instead of guessing.
  • Checked math: equations in the answer are verified with SymPy. When a step is confirmed, a green "Symbolically Verified (CAS)" card appears, with a runnable Python check.
  • Formulas, graphs and tables: KaTeX rendering, 2D/3D plots on request, and comparison tables.
  • Recall mode: flashcards generated from your notes for active recall.
  • Memory: chats persist, and each visitor gets a private workspace.

How we built it

  • Nebius Token Factory + NVIDIA Nemotron, routed per task:
    • Nemotron 3 Nano rewrites the question (multi-query and HyDE), reranks retrieved passages and makes flashcards, with thinking turned off for speed.
    • Nemotron 3 Super writes the everyday tutoring answers.
    • Nemotron 3 Ultra takes derivations, proofs and calculations, with automatic fallback to Super.
  • Retrieval: NVIDIA llama-nemotron-embed-vl-1b-v2 embeddings (NIM), ChromaDB with cosine HNSW, query variants searched in parallel, then LLM listwise reranking.
  • Backend: FastAPI with server-sent events streaming. Frontend: Next.js / React, built as static files and served by the same process.
  • Deployment: one Docker container on Render's free tier (512 MB), with per-visitor workspaces, rate limits and upload caps.
  • Quality: 280+ automated tests on GitHub Actions CI, plus live end-to-end tests on the deployed site.

Challenges we ran into

  • Reasoning tokens ate the budget: on short helper calls, Nemotron spent all of max_tokens thinking and returned nothing. We turn thinking off for the fast role and filter <think> blocks out of the stream, even when a tag is split across chunks.
  • Citation format: Nemotron often wrote 【1】 instead of [1]; we normalize it before parsing citations.
  • Model ID casing: we guessed the Ultra ID from Super's naming and got a 404; listing /v1/models gave the real ID. Our fallback to Super had silently hidden the problem until a live test.
  • Embedding stalls: the hosted embedding endpoint intermittently hangs a request. Short timeouts with retries, plus searching query variants in parallel, cut typical answer time from about a minute to roughly 10–30 s.
  • Real textbooks broke ingestion: math fonts in PDFs extract as broken Unicode characters that crashed indexing part-way through a book. We now clean the text and the titles before indexing.
  • 512 MB of RAM: indexing a full textbook pushed the free server over its memory limit. Limiting Python's memory pools (MALLOC_ARENA_MAX=2) cut peak memory by about 60 MB, enough to index a 2,600-chunk book live.

Accomplishments that we're proud of

  • Math that is checked symbolically, not just trusted.
  • Three Nemotron sizes, each doing the job it is best at, all behind one Token Factory key.
  • A full machine-learning textbook indexed and answered with page citations, on a free 512 MB instance.

What we learned

Grounding is a product decision as much as a model decision. Showing the source page, admitting "not in your notes" and verifying math built more trust than a smarter-sounding answer. We also learned that model routing pays off: small models for plumbing, large ones only where reasoning matters.

What's next for Study Assistant

  • An in-app PDF viewer that jumps to and highlights the cited passage.
  • A Socratic mode that gives hints instead of full answers.
  • Moving embeddings to Token Factory so the whole stack runs on one provider.
  • Live answer-quality and latency monitoring.

Built With

Share this project:

Updates

Submission history