Inspiration
Most AI study tools just hand students the answer. We wanted a private assistant that helps a student plan their time and build their own knowledge. It should keep their notes, deadlines and history on their side, and it should say "I couldn't find that" when it isn't sure instead of guessing.
What it does
Scaffold is a Telegram bot with persistent memory.
- Remembers you. Conversations are stored per user in SQLite, so it picks up where you left off, even after a restart.
- Cited answers from your documents. Upload a PDF or TXT file and ask questions. Every answer points to the file and page. If the answer isn't in your files, it says so.
- Reminders from plain English. "Remind me to call my friend at 7:30 PM" becomes a saved reminder, delivered by the bot at the right time. It also works for deadlines found in your documents, and it saves one only after you say "yes".
- Learn mode. The tutor nudges you toward the answer with questions and hints instead of just giving it away.
- Find sources. It returns up to three links on a topic through Tavily. It never writes an answer from web results.
- Crisis path. If a message matches a crisis phrase, plain code sends a fixed, warm reply with helplines. The model is never called. Helpline numbers were checked on official sites.
How we built it
- Model: NVIDIA Nemotron-3-Nano-30B-A3B, called at runtime through the Nebius Token Factory API (OpenAI-compatible).
- Agent loop: the model asks for a tool, our code runs it, the result goes back to the model, and this repeats until it returns plain text. Code decides what runs, not the model.
- Memory and search: SQLite, with FTS5 full-text search over document chunks that keep real page numbers (PDFs read with pypdf). We strip reference lists at ingest so citations point to the article text.
- Interface: python-telegram-bot, with a repeating job that delivers due reminders.
- Tavily: one runtime Search API call, used for the "find sources" tool.
Challenges
- Our first model answers ignored the document tool and used general knowledge. A stricter prompt fixed it.
- Reference pages were being cited as sources, which was wrong. We fixed it by detecting reference entries at ingest.
- Two sample files gave different deadlines, and the bot silently picked one. It now states every version with its citation and asks which is correct.
- Tool-call round trips took anywhere from 2 to 40 seconds on the same kind of request.
- The model answers in markdown format.
What we learned
Safety checks and tool execution belong in plain code, with the model kept to language. We also learned that "verifiable" is a better promise than "never wrong".
Testing (small, honest numbers)
- Crisis phrases: 20 of 20 test phrasings caught, 0 of 35 ordinary messages flagged.
- Document Q&A on one 10-page PDF: 13 of 13 on the set we tuned on, and 7 of 7 on a fresh set (one run).
- These are small tests, not a benchmark.
Limitations
- Exact wording matters: "quiz1" fails where "quiz 1" works.
- For TXT files, "page" means line number.
- It is not therapy and not medical advice.
- Replies can take 30 to 40 seconds.
What's next for Scaffold
Plan mode with a daily plan, the independence trend, habits and XP, and deployment on Nebius.
Log in or sign up for Devpost to join the conversation.