Generating Learning Chatbots for Exact Sciences
Topic-Aware Datasets for Low-Cost GenAI Tutors
My Role
- Split text by topic, not fixed chunks
- Generated student questions as the retrieval layer
- Embeddings as support, combined with structure
Approach at a Glance
Details- 1Topic-Based Splitting Instead of Fixed Chunks
- 2Generated Questions as the Retrieval Layer
- 3Embeddings as a Supporting Tool, Not the Whole Method
- 4Platform (built by the co-authors)
Executive Summary
A research platform that lets teachers create AI chatbots for mathematics and other exact sciences without technical skills: upload a textbook chapter, a web page or a PDF, or simply list the topics, and get a ready bot that students can use in a messenger. It generates four kinds of bots:
- assistant bots that explain concepts, formulas and the student's own answers;
- task generators that create multiple variants of a problem for practice;
- step-by-step solution bots;
- tester bots that quiz students and check their answers.
The research question was how to build such bots cheaply and without losing context. The answer is in how the bot's dataset is prepared: the source text is split by topic rather than by character count, each topic is enriched with the questions students are most likely to ask, and both are indexed with embeddings. Generating that extra context grew a dataset by 65% for $0.053, and a complete 20-question quiz bot cost $0.008 to create.
I was the scientific advisor on the generative-AI and NLP side: I shaped the dataset method and reviewed the paper; the platform itself was built by my co-authors. The work was published in Radioelectronic and Computer Systems in 2025.
Research Context
The project addresses a concrete problem: learning losses among Ukrainian school students in wartime. Interrupted schooling, destroyed buildings, remote and hybrid classes, power and connectivity outages, and different conditions from region to region have left gaps that show most clearly in the exact sciences, and national and PISA results in these subjects have been declining. Students need accessible help with mathematics outside lessons, and teachers need tools that automate routine work such as preparing exercises and quizzes.
Existing chatbot builders didn't fit this setting:
- Cost: subscriptions for creators, and in some cases for every user, are too expensive for schools.
- Context loss: most services split the uploaded material into fixed-size chunks, sometimes mid-sentence or even mid-word. Part of an explanation ends up in one chunk and the rest in another, so the bot answers from fragments.
- No insight into the dataset: teachers can't see or fix what the bot actually learned from their material.
Technical Approach
My part was the method for preparing the bots' datasets, which is where both answer quality and cost are decided.
-
Topic-Based Splitting Instead of Fixed Chunks – The LLM divides the source text into thematic blocks, each covering one topic or logical context, instead of cutting it every N characters. This keeps an explanation, a formula and its conditions together in one block. The output is checked, and if splitting fails after a few attempts (2–3 are usually enough, 4 at most), the text falls back to splitting at sentence boundaries, never mid-sentence.
-
Generated Questions as the Retrieval Layer – For each block, the LLM generates the questions a student would most likely ask about it, at about one question per 150–200 characters (1–2 sentences). Fewer questions leave parts of the text uncovered, while more produce repetitions. This serves two purposes:
- Sharper retrieval: a student's question is matched against similar questions, not against long passages, so the right block is easier to find.
- Lower cost: the bot answers using the matched question and answer rather than sending the whole text to the model with every request.
For tester bots, the same step generates four answer options with one correct, shuffled when shown to the student.
-
Embeddings as a Supporting Tool, Not the Whole Method – Experiments showed that embeddings on their own work poorly on long texts (over about 500 characters) and struggle to tell apart sections on similar topics, which is common in a single maths chapter. So embeddings index the structured blocks and their generated questions, and the structure does the work that raw embeddings couldn't.
-
Platform (built by the co-authors) – On top of this method, the co-authors built the web platform: uploading text, URLs or PDFs with an editable dataset, configuring the four bot types, connecting them to messengers, and tracking API costs and user interactions per bot.
Outcome
The platform was tested on school mathematics, and the experiments measured what each step costs:
- generating questions for every few sentences grew one assistant bot's dataset by 65% for $0.053, while making it easier to retrieve the right material;
- a ready-to-use tester bot with 20 questions on "Sets. Operations on Sets" cost $0.008 to create ($0.003 for segmentation and $0.005 for the questions and answer options).
The method is not specific to mathematics and can be applied to other subjects and educational levels. It shows that useful GenAI tutors don't need expensive infrastructure: preparing the dataset carefully keeps both the answers accurate and the running costs at a level schools can afford.
- Publication: A System for Generating Chatbots to Support Learning in the Field of Exact Sciences Using Generative Artificial Intelligence Models, Radioelectronic and Computer Systems, 2025.
Technologies
Planning something similar?
Tell me about it on a short call. New projects can start within 2 weeks