<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[BitsOfKnowledge]]></title><description><![CDATA[I care more about how markets actually work than about dressing weak ideas in technical language.]]></description><link>https://bitsofknowledge.org</link><image><url>https://substackcdn.com/image/fetch/$s_!BtPN!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2a71f5-0109-4e58-8492-246bc1f9f67e_832x832.png</url><title>BitsOfKnowledge</title><link>https://bitsofknowledge.org</link></image><generator>Substack</generator><lastBuildDate>Tue, 28 Jul 2026 23:27:01 GMT</lastBuildDate><atom:link href="https://bitsofknowledge.org/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[CorgiBits]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[marketequations@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[marketequations@substack.com]]></itunes:email><itunes:name><![CDATA[BitsOfKnowledge]]></itunes:name></itunes:owner><itunes:author><![CDATA[BitsOfKnowledge]]></itunes:author><googleplay:owner><![CDATA[marketequations@substack.com]]></googleplay:owner><googleplay:email><![CDATA[marketequations@substack.com]]></googleplay:email><googleplay:author><![CDATA[BitsOfKnowledge]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[A tale of 5B tokens and 50 books]]></title><description><![CDATA[I&#8217;m currently doing my master&#8217;s in Financial Economics, and because I decided to do it in 1.5 years instead of 2, some semesters hammer my mind with a staggering amount of coursework.]]></description><link>https://bitsofknowledge.org/p/a-tale-of-5b-tokens-and-50-books</link><guid isPermaLink="false">https://bitsofknowledge.org/p/a-tale-of-5b-tokens-and-50-books</guid><dc:creator><![CDATA[BitsOfKnowledge]]></dc:creator><pubDate>Thu, 25 Jun 2026 18:44:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!r2lL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r2lL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r2lL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png 424w, https://substackcdn.com/image/fetch/$s_!r2lL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png 848w, https://substackcdn.com/image/fetch/$s_!r2lL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png 1272w, https://substackcdn.com/image/fetch/$s_!r2lL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r2lL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png" width="1082" height="802" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:802,&quot;width&quot;:1082,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;upload in progress, 0&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="upload in progress, 0" title="upload in progress, 0" srcset="https://substackcdn.com/image/fetch/$s_!r2lL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png 424w, https://substackcdn.com/image/fetch/$s_!r2lL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png 848w, https://substackcdn.com/image/fetch/$s_!r2lL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png 1272w, https://substackcdn.com/image/fetch/$s_!r2lL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97461de5-cc99-444d-b1e5-babe33f00026_1082x802.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;m currently doing my master&#8217;s in Financial Economics, and because I decided to do it in 1.5 years instead of 2, some semesters hammer my mind with a staggering amount of coursework. That, along with working full-time, can sometimes feel like drowning inside a vortex in the Mariana Trench.</p><p>So to ease my life a bit, after lectures I try to focus on two things: active recall of the material, and preparing for exams. One night, while reading yet another 70-page summary of why a DSGE model (something from macroeconomics) is a good way for a central bank to track shocks to the economy, I had a thought. Tired of it, I wondered: maybe I could leverage AI to accelerate my studying and sharpen my understanding along the way.</p><p>So I spawned a terminal with Claude and started feeding it. Naturally, I began with the syllabus. Then down the rabbit hole I went, I threw in my homework, my answers, lecture slides, Zoom annotations, even previous tests.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T91o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T91o!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png 424w, https://substackcdn.com/image/fetch/$s_!T91o!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png 848w, https://substackcdn.com/image/fetch/$s_!T91o!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png 1272w, https://substackcdn.com/image/fetch/$s_!T91o!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T91o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png" width="1456" height="659" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:659,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;upload in progress, 0&quot;,&quot;title&quot;:&quot;upload in progress, 0&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="upload in progress, 0" title="upload in progress, 0" srcset="https://substackcdn.com/image/fetch/$s_!T91o!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png 424w, https://substackcdn.com/image/fetch/$s_!T91o!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png 848w, https://substackcdn.com/image/fetch/$s_!T91o!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png 1272w, https://substackcdn.com/image/fetch/$s_!T91o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71fcdd5b-9d88-48d0-95e0-463c3cf5778b_1900x860.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It turned out Claude really loves building interactive classes, and we started going back and forth on what to add and how to make it interactive. The results were nothing short of amazing. It built a full UI with the lectures numbered, and in each one it added ELI5 sections for every topic, exercises and quizzes tied to the exams for practicing new material, even lecturer notes on points that mattered which I&#8217;d forgotten were ever there.</p><p>After doing this for every class and seeing sharp results(in my grades) and more importantly in my understanding, my appetite only grew.</p></blockquote><blockquote><p>I&#8217;m in the habit of really understanding what interests me. A while back, when I started learning computer science and cyber, I used to read really, really long books 1000+ pages sometimes. From experience, if you summarize those books down to about 250 pages (roughly a <strong>1:4 ratio</strong>) you get 90-95% of the value; in 150&#8211;200 pages you might get 70&#8211;80% ( I&#8217;m eyeballing these numbers).</p><p>There are exceptions, of course, learning an OS, say, where if you don&#8217;t know the small caveats of every corner you might land at a rounded 0%,  but for most subjects, especially math books, that ratio holds up.</p><p>So I started brewing on how to transform my huge, overgrown reading list into the same kind of interactive class. Then it happened: DeepSeek released their V4 models, with prices so cheap I think they might bill me more after reading this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WBVU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WBVU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png 424w, https://substackcdn.com/image/fetch/$s_!WBVU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png 848w, https://substackcdn.com/image/fetch/$s_!WBVU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png 1272w, https://substackcdn.com/image/fetch/$s_!WBVU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WBVU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png" width="1129" height="719" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:719,&quot;width&quot;:1129,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;upload in progress, 0&quot;,&quot;title&quot;:&quot;upload in progress, 0&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="upload in progress, 0" title="upload in progress, 0" srcset="https://substackcdn.com/image/fetch/$s_!WBVU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png 424w, https://substackcdn.com/image/fetch/$s_!WBVU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png 848w, https://substackcdn.com/image/fetch/$s_!WBVU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png 1272w, https://substackcdn.com/image/fetch/$s_!WBVU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94cc406a-7114-421f-8bf6-84c910aff487_1129x719.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Then I did what I do best, I went looking for useless academic papers explaining how someone had already done exactly what I wanted to do, months before me, because I&#8217;m a slow snail. And yep, these folks (kudos for the paper, it&#8217;s great and informative) did exactly what I set out to do, only on a small set of books, and it cost them a lot more because at the time LLMs were dumber and more expensive for this kind of task (huge-context chats).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!frYg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!frYg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png 424w, https://substackcdn.com/image/fetch/$s_!frYg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png 848w, https://substackcdn.com/image/fetch/$s_!frYg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png 1272w, https://substackcdn.com/image/fetch/$s_!frYg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!frYg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png" width="714" height="327" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:327,&quot;width&quot;:714,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;upload in progress, 0&quot;,&quot;title&quot;:&quot;upload in progress, 0&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="upload in progress, 0" title="upload in progress, 0" srcset="https://substackcdn.com/image/fetch/$s_!frYg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png 424w, https://substackcdn.com/image/fetch/$s_!frYg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png 848w, https://substackcdn.com/image/fetch/$s_!frYg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png 1272w, https://substackcdn.com/image/fetch/$s_!frYg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ddff29a-b536-4888-9676-70485f3c3cc3_714x327.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></blockquote><p>So here&#8217;s how my framework actully works: </p><blockquote><p>The naive approach, paste a whole 700-page PDF into a chat and ask for a summary, is exactly what made the earlier attempts expensive and unreliable. Long context is costly, and the model loses the plot in the middle. So I built a pipeline instead.</p><p>The core idea is a <strong>trailing window</strong>. For each chapter, the model only ever sees three things:</p></blockquote><ol><li><p><strong>The chapter&#8217;s entry from the table of contents</strong> - so it knows the scope and the author&#8217;s intended boundaries.</p></li><li><p><strong>A compressed summary of the previous chapter</strong> - just enough continuity so notation and running examples carry forward.</p></li><li><p><strong>The chapter itself</strong>, cut out from the rest of the book (extracted with <code>pdftotext -layout</code> and page-mapped).</p></li></ol><p>That&#8217;s it. No 700-page context. Each chapter is a small, cheap, focused generation, and the trailing summary keeps the book coherent across chapter boundaries.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://bitsofknowledge.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><blockquote><p>The pipeline (I call it the <code>content_factory</code>) runs roughly like this:</p><pre><code><code>PDF + TOC
   &#9474;
   &#9500;&#9472; extract chapter text (pdftotext -layout, page-mapped)
   &#9474;
   &#9500;&#9472; build trailing window:  [TOC entry] + [prev-chapter summary] + [chapter text]
   &#9474;
   &#9500;&#9472; DeepSeek V4  &#9472;&#9472;&#9654;  drafts a 9-tab chapter module (HTML + cards JSON)
   &#9474;
   &#9500;&#9472; QUALITY GATES  (two layers)
   &#9474;     &#9500;&#9472; deterministic:  does every theorem cite a page range?
   &#9474;     &#9474;                  is the HTML well-formed? does the math render?
   &#9474;     &#9492;&#9472; LLM judge (cross-family): a *different* model family scores
   &#9474;                                  source-fidelity and invention count
   &#9474;
   &#9500;&#9472; INVENTION SCORE: hallucinated content is scored heavily negative.
   &#9474;                   The chapter must clear the gate to pass.
   &#9474;
   &#9500;&#9472; ITERATIVE LOOP:  fail &#8594; repair/regenerate &#8594; re-score
   &#9474;                   (capped iterations + a manual checkpoint)
   &#9474;
   &#9492;&#9472; OUTPUT:  books/&lt;slug&gt;/&lt;chXX&gt;.html   (the readable module)
              books/&lt;slug&gt;/&lt;chXX&gt;.js      (flashcards + exercises)
              books/&lt;slug&gt;/meta.js        (chapter map, page ranges)
</code></code></pre><p>Now, Logically, every person with a brain working would say that LLMs are hallucinating, YEP , THEY ARE, A LOT, </p><p>The single hardest problem in this whole project is <strong>inventions</strong>, when the model confidently states a theorem the author never wrote, or &#8220;improves&#8221; notation, or invents a worked example with a wrong answer. For a study tool, a confident hallucination is worse than a gap, because you&#8217;ll memorize it.</p><p>A few things kept this under control:</p></blockquote><ul><li><p><strong>Source-evidence is mandatory.</strong> Every theorem, definition, formula, and worked example has to trace back to a page range in the source. No citation, no pass.</p></li><li><p><strong>Cross-family verification.</strong> The generator is DeepSeek; the <em>judge</em> is a different model family (Claude / GPT / Gemini). Same-family verification produces theatrical independence, a model is too forgiving of its own style. Cross-family scoring is harsher and catches more.</p></li><li><p><strong>Invention is scored low in the chapter&#8217;s total score</strong>, so a chapter with drift keeps failing the quality gate and gets regenerated until the invention count drops low enough to clear it. It&#8217;s an iterative loop, not a one-shot.</p></li><li><p><strong>Trust labels on every claim.</strong> Each piece of content is tagged: <code>SOURCE-LOCKED</code> (verbatim from the book), <code>SOURCE-CLOSE</code> (a faithful paraphrase), <code>INFERENCE</code> (the model&#8217;s own reasoning), <code>UNVERIFIED</code>, or <code>BLOCKED</code>. A per-chapter banner shows the overall state.</p></li><li><p><strong>Three study modes.</strong> <em>Strict</em> shows only source-locked content; <em>Learning</em> allows source-close paraphrase; <em>Full</em> shows everything including inference. You choose how much you trust on any given day.</p></li></ul><p>I won&#8217;t pretend it&#8217;s at zero, LLMs are non-deterministic, and chasing the last invention to zero just makes the prompts brittle and the output bland. Visual review beats invention-count obsession as a quality signal.</p><div><hr></div><p><span>The generated content isn&#8217;t a wall of text. Each chapter is a module with </span><strong>nine tabs</strong><span>, designed around how I actually study:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!I1oN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!I1oN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png 424w, https://substackcdn.com/image/fetch/$s_!I1oN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png 848w, https://substackcdn.com/image/fetch/$s_!I1oN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png 1272w, https://substackcdn.com/image/fetch/$s_!I1oN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!I1oN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png" width="1248" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1248,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:608435,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://bitsofknowledge.org/i/203591790?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!I1oN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png 424w, https://substackcdn.com/image/fetch/$s_!I1oN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png 848w, https://substackcdn.com/image/fetch/$s_!I1oN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png 1272w, https://substackcdn.com/image/fetch/$s_!I1oN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdce17a99-2879-4ee2-abbf-ea90e5347458_1248x832.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Under the hood it&#8217;s a small, dependency-light engine (vanilla JS, no framework):</p><ul><li><p>A <strong>spaced-repetition scheduler</strong> (SM-2-style) with six card types: <code>cloze</code>, <code>basic</code>, <code>reverse</code>, <code>numeric</code>, <code>theorem</code>, <code>algorithm-step</code>.</p></li><li><p>All state lives in <code>localStorage</code> under one key (<code>books_learning.v1.state</code>), with JSON <strong>export/import</strong> so I can move it between machines. No cloud, no account.</p></li><li><p>A <strong>daily review surface</strong> (<code>today.html</code>): due cards + a reading target + an activity heat map.</p></li><li><p>A cross-book <strong>Atlas</strong>: an aggregated glossary, a formula sheet, an SVG concept map of how the 49 books relate, and an <strong>interleaved-problem generator</strong> that mixes problems from across books for daily practice (interleaving is one of the most evidence-backed study techniques there is).</p></li></ul><blockquote><p>Here&#8217;s the part the papers don&#8217;t talk about. Generating the content is maybe 20% of the work. The other 80% is making <strong>10,000 pages of dense mathematics actually render</strong> in a browser without looking like garbage.</p><p>PDF extraction corrupts LaTeX in a hundred small ways: a lost <code>$</code> turns <code>$2.83</code> of currency into broken math; a stripped newline turns <code>\nabla</code> into a stray <code>abla</code>; the model mixes <code>\(...$...\)</code> delimiters mid-expression; greedy <code>$...$</code> matching crams a whole sentence into italic math so you read <code>ispositvelyrelatedto</code>.</p><p>I ended up writing a whole <strong>sanitizer layer</strong> (a pile of  python passes) that restores lost currency, re-stitches broken commands, normalizes delimiters, and strips stray dollar signs, plus a MathJax v3 config with custom macros, and a final pass that hides any irreducible error markers so a reader never sees a red &#8220;math input error&#8221; box. Across ~984 chapters, the visible MathJax error count went from thousands to <strong>zero</strong>.</p><p>It&#8217;s deeply unglamorous work. It&#8217;s also the difference between a demo and something you actually want to read at 11pm.</p></blockquote><blockquote><p>The whole thing runs at roughly <strong>$10 a book</strong>. Set that against a private tutor doing exercises with you at $100 an hour, and it&#8217;s a bargain, even before you count that the library doesn&#8217;t get tired at 2am.</p></blockquote><p></p><blockquote><p>The library looks awesome, the pipeline is repeatable, and the skeleton is something I can hand to anyone else drowning in their own reading list.</p><p>Thanks for reading.</p></blockquote><p>If you want the engine and the pipeline, though honestly, you could build your own, send me a message.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://bitsofknowledge.org/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>