JOURNAL · SLOT 01

The RAG was the project. Now it’s a sentence.

2026-09-03·Updated 2026-09-05AIIOMETHOD

I can single out procrastination as one of my most prominent personal flaws. On the other hand, I was blessed with enough self awareness to admit to it. Thus, in fifty some years of personal experience, I developed a series of mechanisms to protect myself against myself. This is the story of the latest of those mechanisms (true to the times, AI-powered).

I begin with my PhD classifying exams. Each one requires recapping one year's worth of content, reading thousands of pages of reference books, and the hundreds of papers that professors listed in their syllabi. Worse yet: some minimum quantity of all that reading needs to stick (otherwise, what's the point?), so better read everything at least twice. With the knowledge that one of such exams will take place in next six months, an adult specimen of the human race should take on the reading marathon immediately, hoping that four weeks will be enough.

Of course this particular specimen did not proceed so. Not for any one of the four exams (macroeconomics, microeconomics, monetary theory and industrial organization). Between working full time, class workload and recent fatherhood, time has been plenty scarce for the latter two years. My solution: disconnect from the world for the four weeks preceding the exams and find a way to fasttrack preparation. It so happens that, along the years, I found that the one thing makes me learn deeply any subject is to write software with/for it. That's how I learned accounting or speaking English, among other stuff. It comes out of having to dig deep in the source material, while looking for patterns to help with implementation, or even while testing the software.

That's how MARGINALIA came about. It was early 2023, the world was just getting used to the wonders enabled ChatGPT 3.5. I put together my two needs at the time: study for the exam and building something with OpenAI API, particularly with a RAG system. Several lessons were learned: how to curate a corpus, how to tokenize it, the best way to chunk, the best way to store chunks, etc. With ChatGPT's help, I built a RAG system in less than a week: it had access to all my microeconomics previous qualifier exams, accepted answers (from other students), lectures, papers, books, etc. I could study for my exam by comparing my answers with the LLM's and tracking down the answer's elements up to the exact mention during lectures. Better yet: I had to read the material, compare LLM's answers, and track down sources while testing, which promptly forced me to go deep all over the material (and produced substantial "sticking").

One semester later: same problem, new exam (macroeconomics). RAGs were falling out of fashion, but agents weren't all the rage yet: hence, I needed a new approach, but did not dare to go full agentic system at that time. Although I did build some agents to get me started (to go through syllabi and find and download papers, for instance), I decided the next logical step would be to dirty my hands with local models, drove to Micro Center for a new machine with a nice GPU. New lessons learned: which models can handle what, how to make the most of my VRAM, which embeddings are best for what, etc. I updated MARGINALIA for the new corpus and infrastructure, and stickiness once again yielded.

Skip one qualifying exam: I could read and reread Professor Lawrence White's monetary-theory material ad nauseum without help. Now it's 2026 and we reach the four weeks preceeding the last qualifying exam, Industrial Organization. This time I considered refreshing the RAG. I saw one big hurdle: the source material for both microeconomics and macroeconomics relied heavily on having lecture and the (suposedly correct) answers to the previous exams. However, micro and macro are the exams that everyone is required to take, there are many more students to collect material and share their (supposedly correct) answers. The same does not apply to IO (or even to monetary): only a few students take classes or exam every semester, I had no shared lecture recordings or exam answers. I was afraid that a corpus based only in books and papers wouldn't be much helpful.

Regardless, the game changed radically in one year: RAGs are completely cringe, Agents are the hype. I had Ubik (an openclaw instance) and Daneel (a hermes instance) to help me study this time. They helped me with a few things: while I was busy reading the textbooks, I asked Ubik to read the syllabus for both IO classes and download the papers listed as reference. This is something that would easily take me an entire day of copy-paste-search in several portals, it was all ready in next morning, PDF and markdown versions. I had hermes summarize rewrite each chapter of the textbooks as audiobooks, replacing the math parts with narratives or brief descriptions of the equations. Then I had it generate audiobooks with Voicebox for the driving and exercise hours. I also had hermes process the entire corpus and create a Karpathy wiki, which allowed me to explore themes up and find linked ideas and references easily. Lastly, I fed Hermes previous exams and used it to produce short research on recent news that could be used to illustrate ideas in the exam, such as results of latest Antitrust cases.

The journey (which is fortunately over, the last of them, mercifully) illustrates the evolution of interactions with AI in these two years: back at the beginning, LLMs helped me build software "from the outside": I came up with idea and plan, and used it to fast-track coding with the chat, and used the output to write and run the software myself. It was already very helpful, as it allowed me to build a RAG system in a few days instead of few weeks. But I was still writing the software myself, with intent. Two years on, LLMs (my Openclaw and Hermes agents to be more precise) are helping me "from the inside": I no longer have to think about what software to write, I just need the idea. For instance, I know several programs are necessary to extract papers from a PDF syllabus, search for them in the internet, download and convert to markdown. But with my agents, I need not think of it: all I need is ask for the end result, everything will be written and run in the background, I'm not even sure what. A RAG is no longer a project. It used to mean a React application, a Python backend, and a vector database; now it is a sentence to the agent that says where to look. Voilà.

The habit of writing software to learn a subject is not new; what changed is how much of the writing I had to do myself. Two years ago the RAG was a project I built and ran. This month the agent read the syllabus, fetched the papers, summarised the chapters, recorded the audio, indexed the corpus, and briefed me on the news — and I still had to read the material, work the exercises, and write the answers. The agents shrank the distance between opening a book and knowing it well enough to be examined on it. The reading itself was mine. I sat the exam last month. Mercifully, the last exam of my life. The next subject I want to learn does not have a syllabus, only a problem. I expect the loop to hold.

MARGINALIA · THE EARLIER RAG PROJECT →

[ DEODORO ] > JOURNAL EJECT → JOURNALSHELF