Building a Better Way to Learn

A discussion of how AI is reshaping the lives of college students, the changing value of learning, and a potential solution to how we might redirect AI in an educational environment.

The Motive: A Dilema

College in the modern world has a big problem.

It's a strange place to learn. You're surrounded by subjects you chose because you genuinely want to understand them, but at the same time, you're rarely given the luxury of actually focusing on them.

This is especially true in STEM, where the range of experiences varies vastly amongst students. Within the span of a few hours, you can go from working through an engineering problem, to learning a new mathematical technique, to thinking about a biological system, chemical reaction, or piece of code. Every course has its own language, and every student has their own way of thinking.

And coursework is only one part of college.There's still the rest of your life to think about. Staying healthy, exercising, sleeping enough, spending time with friends, pursuing your own interests, and simply having a social life all matter. And as time goes on, there's this constant pressure of thinking about what comes after college: internships, jobs, research, graduate school, and ultimately whether you're doing enough now to prepare for whatever comes next.

With all of this happening at once, the emphasis on genuine learning and actual engagement with knowledge can begin to collapse. The majors we choose and the courses we take can start to lose their meaning, until we're left chasing a grade that somehow has to represent an entire semester of our time, if even that grade is meaningful anymore.

This thought really bothers me. It has gotten me thinking about what we should actually look for in college courses to consistently improve performance while rebuilding some of the enjoyment and value in learning.

I don't think the answer is simply expecting students to know more. Knowing the material from every course inside and out can sometimes feel out of reach. That isn't because students don't care about learning; learning just takes time, and everyone needs a different amount of it. Some ideas make sense immediately, while others need to be revisited several times before they really stick. Unfortunately, the semester keeps moving either way. Another lecture comes, another topic gets introduced, and another exam eventually appears on the calendar.

So instead, I've started thinking about what it actually means to understand a course well enough to succeed in it. And I've realized that there is an important difference between knowing everything about a subject and really understanding the context of a course.

A course is more than the name written on your schedule. Two students at different universities can take courses with the exact same title and have completely different experiences. Professors choose what to emphasize, what to leave out, how deeply to explore certain topics, what notation or terminology to use, and how different ideas connect to one another. The examples shown in lecture, the problems assigned for homework, and even the way a professor explains an idea all gradually create a particular way of thinking about the material.

Understanding that context can be incredibly valuable.

When you're working through a difficult problem, you don't always need to know everything there is to know about the subject. Especially in coursework, what matters more is often recognizing where the problem fits into what you've already learned. Why was this concept introduced? What previous idea does it build on? Why did the professor approach a similar problem in a particular way? What parts of the material have been emphasized repeatedly, and how do those pieces fit together? This type of questioning process can often help build deeper understandings, ultimately allowing us to center focus in one area at a time. Once those connections become clearer, a course can start to feel less like a collection of lectures, equations, definitions, and assignments, and more like one continuous train of thought.

The problem is keeping hold of that train of thought while everything else in college keeps moving.

The Vision: Building a Solution

AI is no stranger to students these days, myself included. When I'm stuck on a problem or confused about an idea, asking an AI model for an explanation has become an incredibly convenient resource. These models can generate detailed responses across an enormous range of subjects, often within seconds.

But I've also found that there is a gap between getting a good explanation of a subject and getting an explanation that actually helps me understand my course.

That distinction became much more important to me as I thought about what happens when a student starts struggling in a class. Maybe you do poorly on an exam, leave a few lectures more confused than when you entered, or simply feel like the professor's explanations aren't working for you. It's very easy to conclude that the course just isn't being taught in a way you can understand.

And once that happens, it's tempting to start distancing yourself from the course itself.

Maybe you stop going to office hours because they haven't helped. Maybe you start relying entirely on outside resources. Eventually, you might even stop attending some lectures because you've convinced yourself that you'll learn the material better on your own later. The problem is that the further you move away from the course, the harder it becomes to understand what the course is actually asking of you. Now you're not only trying to learn difficult material, you're trying to catch up on the context you've missed along the way.

I've seen first hand how quickly that gap can grow, and that's exactly the gap I want this project to address.

I don't want to build something that simply takes a homework problem and generates an answer. General AI tools can already be very good at doing that. In fact, sometimes an answer can make things more confusing. It might introduce a method I haven't learned, use notation I've never seen, make assumptions that aren't being made in my class, or give me a perfectly valid explanation that simply isn't useful for the way I'm expected to approach the material on an exam.

What I want instead is something closer to "office hours on demand".

I want to be able to ask a question and have the response begin with the material from the course itself. If an idea was introduced three weeks ago in lecture, bring that idea back into the conversation. If the professor approached a similar problem in a particular way, help me understand that approach. If I'm misunderstanding something, don't just replace my reasoning with the correct answer, work through my reasoning with me and help me figure out where it stopped making sense.

Most importantly, I want the interaction to keep me connected to the course rather than pull me further away from it.

The professor's lectures, notes, examples, and assignments shouldn't become things I abandon when I start struggling. They should become the foundation for working my way back toward understanding. The role of the AI, then, isn't to replace the professor or provide an alternative version of the course. It's to help make the course material more accessible when I need another explanation, another connection, or simply more time to work through an idea.

That's the vision behind this project: to bridge the gap between students and the material they're actually being taught.

A resource I can turn to at any time, not just to find an answer, but to talk through an idea, revisit something I've forgotten, connect different parts of a course, and gradually make sense of the reasoning behind what I'm learning.

Even if I feel like I don't even know where to start when reviewing, I envision this tool to be the perfect companion to aid me through genuine learning, and not just succumb to the pressures of grades and a busy schedule.

I don't want the AI to take me around the course when I'm struggling. I want it to help me find my way back into it.

How it Works: An Outline of Engineering a Solution

The primary idea behind the project is fairly simple: redirect AI to an interface where every course gets its own space.

Imagine your standard AI interface, but rather than just creating new chats, I create new courses, and then build chats within them. When I create a course, I can upload the material associated with it: lecture slides, notes, readings, practice material, or anything else that helps define what has actually been taught. Conversations then exist within that course. If I'm asking a question in a Quantum Mechanics course, for example, the system should be working from the material I've provided for that course, not material from somewhere completely unrelated.

In that sense, I think of each course as having its own growing database of knowledge. As the semester continues and I add more material, that database should become a better representation of the course itself. The conversations are then a way of interacting with that information.

But of course, the caveat: “give the AI all of my course material" is much easier than actually doing it.

A semester's worth of material can become enormous. Content spread across lecture slides, notes, textbook chapters, assignments, and other documents, can build up extremely quickly. Language models also have a limited amount of information they can practically process in a single request, often referred to as a context window. Processing media in image form is far more expensive in terms of AI usage. Even if I could continually stuff every page from an entire course into that window, doing so would be slow, expensive, and, more importantly, would bury the few pieces of information that actually matter for the question I'm asking.

So rather than having the AI repeatedly read the entire course, I've been working on a way to “digest the course beforehand.”

The basis of the system is as follows. When uploading a document, the system first parses it page by page, extracting the textual information inside. This textual information is then split into chunks, specifically assigned to the pages they are extracted from.

But dividing documents into smaller pieces creates another problem: when I eventually ask a question, how does the system know which pieces to look at?

This is where embeddings come in. Rather than storing each chunk only as text, I also convert it into a numerical representation of its meaning. These representations allow the system to compare the meaning of my question with the meaning of the different pieces of course material. A question doesn't necessarily need to contain the exact same words as a lecture slide for the system to recognize that the two are related.

Those chunks and their embeddings are stored in a vector database, separated by course. When I ask a question, the question is embedded as well, and the system searches that course's database for the pieces of material that appear most relevant.

This process ultimately defines my retrieval system. Only after that retrieval happens does the language model enter the main conversation. It receives my question along with the course material that was identified as relevant, as well as the context of our previous conversation. From there, it can generate a response grounded in those sources rather than working from the question alone.

This approach is generally known as Retrieval-Augmented Generation, or RAG. The language model is still responsible for interpreting the question and generating the response, but before asking it to do that, I'm giving it a way to retrieve information from an external source, in this case, the course itself.

There is another reason I find this structure important: retrieval is not the same thing as understanding.

Finding a relevant paragraph from a lecture is useful, but I don't want the system to simply repeat that paragraph back to me. The retrieved material is supposed to give the AI the context it needs to have a useful conversation. It can connect multiple pieces of material, explain why something from an earlier lecture matters now, compare my reasoning with the way an idea was presented in class, or help reconstruct a chain of thought without immediately jumping to the final answer. Ultimately, the design is such that the conversation flows similar to what might happen in an actual office hour environment, with actual references to your material.

Now the truth is, this process contains plenty of complications hidden inside each step. To name a few, deciding how large each chunk should be, determining what information is actually relevant, dealing with diagrams and equations inside PDFs, avoiding irrelevant retrieval, and processing large amounts of material efficiently have all brought their own challenges.

But the underlying idea remains the same. Rather than asking an AI to somehow hold an entire course in its head, I want to build a system that knows where to look when it needs to understand something about that course.

The Software Side In-Depth

I have built the project primarily in Python, with a FastAPI backend and a frontend written in HTML, CSS, and JavaScript. The frontend handles the course/chat interface, file uploads, and conversations, while the backend connects those interactions to the databases, retrieval pipeline, and language model.

For the application itself, I use SQLite to maintain the relationship between courses, chats, and messages. Each chat belongs to a course, and its conversation history is stored so that previous discussions can be continued rather than starting from scratch every time.

The course knowledge is handled separately. PyMuPDF extracts text from uploaded PDFs, which is passed through my chunking pipeline and embedded using the Sentence Transformer model 'all-MiniLM-L6-v2'. Those embeddings are stored in ChromaDB, with an independent collection for each course. The same course ID used by the application is carried through the retrieval system, keeping course material isolated.

When a question is submitted, FastAPI determines which course the current chat belongs to, retrieves relevant chunks from that course's ChromaDB collection, and combines them with the question and conversation history. That context is passed into my tutor layer, which handles the instructions governing how I want the tutor to interact before making the final request through the OpenAI API.

At a high level, I've ended up with two main pipelines:

Ingestion: PDF → PyMuPDF → Chunking → Embeddings → ChromaDB

Conversation: Question → FastAPI → Course Retrieval → Context + Chat History → Tutor → OpenAI → Response

I've kept these pieces relatively modular, with separate components for parsing, chunking, embeddings, retrieval, context construction, and the tutor itself. This has been particularly useful while developing the project, since nearly every part of the system is still something I can experiment with independently.

What I've Learned, and Other Things Worth Mentioning

For me, what began as an attempt to build an AI tutor to solve what I find a real world problem has consequently become an exercise in connecting several areas of software development: web APIs, databases, document processing, vector search, LLMs, and the frontend that ties them together.

One of the biggest things I've learned is that getting each of these pieces to work individually is very different from getting them to work well together. A retrieval system can return relevant text, an LLM can generate a good explanation, and a frontend can provide a usable interface, but the quality of the final experience depends on how reliably information moves through the entire system. I've spent a significant amount of time debugging those connections, restructuring parts of the application, and learning where responsibilities should sit within a larger codebase.

I've also learned that using an LLM is often the easy part. Much of the challenge comes from deciding what information should reach it in the first place. My current document pipeline, for example, relies heavily on extracted text. That works as a foundation, but real course material is much messier. Lecture slides can contain diagrams, equations, plots, tables, images, and layouts where the position of information is itself meaningful. Finding better ways to parse and represent that material is one of the most important directions for the project moving forward.

Improving that pipeline also affects much more than retrieval quality. Smarter processing could reduce unnecessary information, speed up uploads, lower the amount of computation and model usage required, and ultimately give the tutor better context. As the amount of course material grows, efficiency becomes just as important as accuracy.

There is also still plenty to improve outside of the retrieval system. Uploading and managing large amounts of course material needs to become faster and more interactive, the interface needs to better communicate what the application is doing, and the tutor itself will continue to change as I learn what makes these conversations genuinely useful rather than simply informative.

More broadly, this project has given me a much better understanding of how modern AI applications are actually built. The model may generate the final response, but there is an entire system responsible for getting it there. Learning how to design, connect, debug, and continuously improve that system has become just as important to me as the original idea behind the tutor.

A lot of my experience also exists within the realm of STEM, more specifically in mathematical aspects, so I understand if my vision in this app is limited. I do hope that however this may find purpose in many other types of coursework, and maybe even beyond the realm of academics. I leave this however for the future.

And, for now, the project is still very much a work in progress.

A Current Version

Here is a video of the current user end, and what I am imagining, in its current stage.

A very simple UI design displaying how this might look. This is not a final product.