Lotus Valley International School Gurugram
Valtam: a bot to solve student troubles
Jayan Sunila , Rachit Rustagib and Aarav Khandpurc
a
IX — Everest, +91 9910856655
b
IX — Nilgiris, +91 9211450648
c
IX — Nilgiris, +91 9211612568
Abstract—This project, Valtam, is a chatbot that is designed to solve the 2.2. Backend & Database
most frustrating problems that students face in their daily lives. From strug-
gling to find assignments to needing help with their cumbersome homeworks, backend has two parts: the LLM and the API. The LLM is pow-
this chatbot can do it all — all while being reliable and easy to use. ered by PyTorch and Transformers, where we have trained a base
model to cater to a student’s needs. There are two trained mod-
Keywords—shiv -nadar .v er [Link] els: one that is only for the NCERT and one that also has the as-
signments. To allow the frontend to interact with the LLM, we
Contents have a FastAPI wrapper around the model. The API has two routes:
/generate/{ncert,assignments}, which take a request body of
1 Introduction 1
2 Technologies Used 1 1 {
2 prompt: string;
2.1 Frontend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 temperature: number (defaults to 0.7);
2.2 Backend & Database . . . . . . . . . . . . . . . . . . . . . . . 1 4 max_length: number (defaults to 128);
5 }
2.3 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.4 More Information . . . . . . . . . . . . . . . . . . . . . . . . . 1 Code 1. Request Body for /generate/*
1. Introduction
W elcome to Valtam, the chatbot to solve it all. This bot is de-
signed to fulfil your every need as a student: it can find your
homework, and it can help you solve it. Utilizing modern frame-
2.3. Model
To ensure that our chatbot is relevant to the academic context of
works, the bot entails a clean, functional UI, making the power of Indian school students, we fine-tuned the LLM using a dataset
Python accessible to the layperson. This document is a guide to the of NCERT textbook explanations. We used two publicly available
inner working of Valtam. NCERT-based datasets for Science and Social Science with approxi-
mately 8k rows on 3 epochs.
2. Technologies Used We chose the Qwen 0.6B model for this project.
1. NextJS (frontend) The training pipeline used the NCERT Database combined with a
• Shadcn/ui (UI) database which has queries from our school portal
• Better Auth (User Authentication)
2. Python (backend) • Tokenizer: AutoTokenizer from Qwen model
• API calls — FastAPI • Max Length: 128 tokens
• LLM — PyTorch and Transformers (HuggingFace) • Epochs: 3
• Precision: FP16 (mixed-precision training)
3. PostgreSQL (database)
• ORM — Drizzle
We used PyTorch for low-level control and trained the model lo-
• DB provider — Vercel Postgres (Neon)
cally on our GPU. After training, the model showed improved per-
4. Telemery and Analytics formance on curriculum-specific queries, demonstrating a solid un-
• Telemetry & Error Reporting — Sentry derstanding of academic content.
• Analytics — Posthog
2.1. Frontend 2.4. More Information
Information The bot’s main use case is supposed to be in QA format(Question-
See: Answering), as it is supposed to answer queries and provide help to
students Therefore, the data was organised into a Question-Answer
• Github Repository format for optimal training. The Qwen 0.6B (752M params) model
• Assigmnment Helper AI Model offers speed, balance and accuracy. To training this model, we used
• NCERT 9th AI Model an RTX 4070 GPU on a machine with the following specs.
• CPU: i5-13500k
For a fast and responsive frontend, we used NextJS. Its vast ecosys-
• RAM: 16GB
tem, and reliability were major perks. It allowed us to create many
• GPU: RTX 4070
complex functions effectively. To make NextJS even better, we used
• Storage: 1TB NVME 4.0 SSD
Shadcn, a popular UI library that provides accesible base compo-
nents. For authentication, we used BetterAuth, an open-source au-
thentication library that gives us support for many social logins like For the model with only the NCERT, the training loss metric is
Google and Github. shown in Table 1.
Shiv Nadar Interschool Competition Valtam May 23, 2025 Lotus Valley International School Gurugram 1–2
Valtam: a bot to solve student troubles
Table 1. Training Loss for model 1:
Step Training Loss
500 1.312500
1000 0.921400
1500 0.623400
2000 0.291200
2500 0.202200
3000 0.155800
3500 0.109400
4000 0.069900
4500 0.059500
The database is a PostgreSQL database, which is used to store user
information and their chat history. We use Vercel Postgres, with
Neon, for a fast and scalable experience. As the ORM, we use Driz-
zle, which is type-safe, lightweight, and has a SQL-centric approach
to interacting with databases, making it ideal for modern TypeScript.
Figure 1. A flow chart of the application lifecycle.
2 Shiv Nadar Interschool Competition Jayan et al.