HPC-driven Development of AI Tools for Matrix Problem Solving
Understanding matrix operations is a notorious stumbling block for many students. Despite the foundational importance of matrices in disciplines like mathematics, engineering, and computer science, learners often struggle with their abstract nature and the step-by-step complexity involved in solving matrix problems. Traditional teaching methods (e.g. lectures and textbooks) usually lack interactivity and timely feedback, which can leave students confused or disengaged when they hit a roadblock. A common scenario is that a student works through a matrix calculation on paper, but without immediate feedback they might not realize a mistake until much later. This absence of instant guidance makes it harder to pinpoint errors and grasp core concepts. The challenge was clear: how to provide students with a more interactive, supportive way to practice matrix problems, so they can learn by doing with confidence that mistakes will be caught and corrected in real time.
Solution
High-Performance Computing (HPC) became the game-changer in building a responsive intelligent tutoring system for matrix algebra. The entire solution was designed to leverage the HPC cluster at the University of Donja Gorica (UDG), ensuring the tutor could process complex tasks quickly and handle many students in parallel. During development, the team used the HPC resources to train machine learning models faster and to test the system under realistic workloads. Once deployed, the HPC infrastructure turned what would be heavy computations into split-second operations. In fact, on a standard environment the prototype initially took around 150 seconds to process a matrix image query, but after migrating to UDG’s HPC node (equipped with a powerful NVIDIA L40 GPU), the same task executed in under 5 seconds. This dramatic 30× speed-up meant the difference between a frustrating wait and an instantaneous answer. Backed by HPC, the tutoring chatbot easily meets the design goal of delivering results in approximately 2 seconds or less for typical problems. Such performance is critical for keeping the experience interactive – students can ask a question and practically get feedback immediately, mirroring the quick pace of a human tutor. The HPC cluster’s ability to handle intense parallel computations and large models is the backbone that makes real-time, AI-driven tutoring possible.

To tackle matrix problems interactively, the team developed a chatbot-style intelligent tutoring system that combines optical character recognition (OCR) with natural language processing (NLP). At the heart of the solution are two AI models working in tandem: EasyOCR for reading matrix data from images, and Qwen2-Math-7B-Instruct for understanding and solving the math problems described by the user. This pairing allows students to either upload a photo of a matrix or type in a matrix problem, and receive step-by-step help in return. For instance, a student can provide one or two matrices (either as text or images) and ask the chatbot to perform an operation like transposition, addition, or multiplication. The system’s workflow is straightforward yet powerful: if the input is an image, the EasyOCR component kicks in first to extract the numerical entries of the matrix from the picture. Next, the Qwen2-Math-7B-Instruct model interprets the user’s request (in natural language) and the extracted matrix data, then executes the requested matrix operation with precision.

What sets this tutor apart is not only that it gets the math right, but also how it communicates. The chatbot doesn’t just spit out the result of, say, an addition of two matrices – it also provides a clear, step-by-step explanation of how it arrived at the answer. In this way, the system behaves like a patient teacher, walking the student through each element of the solution. The user interface was carefully designed for simplicity and clarity: users can type queries like “add these two matrices” or attach images of matrices, and the chatbot will automatically prompt for any missing information (for example, it will ask for a second matrix only if the operation requires two inputs). This makes the experience intuitive – students aren’t bogged down by rigid formats or multiple confusing input fields. Under the hood, the integration of OCR and NLP within a single platform is quite innovative, since most earlier educational tools handled either text or images but not both simultaneously. By deploying the whole system on the HPC cluster, all these components – image processing, language understanding, and matrix computation – run seamlessly. The heavy lifting (like running a 7-billion-parameter neural network for NLP) is accelerated by HPC, so the chatbot can parse a question, solve the matrix problem, and generate an explanation on the fly. This marriage of advanced AI models with HPC muscle results in a tutoring system that is both smart and snappy, accessible through any web browser.

Benefits
- Instant Feedback: HPC allows the system to provide real-time responses (under 2 seconds), enabling students to learn from their mistakes immediately.
- High Accuracy: OCR recognition accuracy reached up to 99%, ensuring reliable matrix data extraction from images and texts.
- Enhanced Student Engagement: Interactive, conversational explanations help students actively learn and retain complex matrix concepts.
- Flexibility in Input: Supports both text-based queries and image inputs, making it user-friendly and accessible.
- Scalable Educational Tool: Easily extendable for more complex math operations and broader educational applications, powered by robust HPC resources.