<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://johnwick.cc/index.php?action=history&amp;feed=atom&amp;title=Turn_any_textbook_into_interactive_course</id>
	<title>Turn any textbook into interactive course - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://johnwick.cc/index.php?action=history&amp;feed=atom&amp;title=Turn_any_textbook_into_interactive_course"/>
	<link rel="alternate" type="text/html" href="https://johnwick.cc/index.php?title=Turn_any_textbook_into_interactive_course&amp;action=history"/>
	<updated>2026-05-06T15:14:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.1</generator>
	<entry>
		<id>https://johnwick.cc/index.php?title=Turn_any_textbook_into_interactive_course&amp;diff=5&amp;oldid=prev</id>
		<title>PC: Created page with &quot;Building an AI That Turns Any Textbook into an Interactive Course (Using Open Source LLMs)  Oct 25, 2025 I’ve been developing something quite innovative lately — an agent that can transform a PDF or textbook into a completely interactive course. Like, not just a bunch of text dumped into a webpage. I’m talking Q&amp;A modules, drag-and-match games, flowcharts, info bubbles — all auto-generated from your material. I believe this is one of the most interesting things I...&quot;</title>
		<link rel="alternate" type="text/html" href="https://johnwick.cc/index.php?title=Turn_any_textbook_into_interactive_course&amp;diff=5&amp;oldid=prev"/>
		<updated>2025-11-12T21:17:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Building an AI That Turns Any Textbook into an Interactive Course (Using Open Source LLMs)  Oct 25, 2025 I’ve been developing something quite innovative lately — an agent that can transform a PDF or textbook into a completely interactive course. Like, not just a bunch of text dumped into a webpage. I’m talking Q&amp;amp;A modules, drag-and-match games, flowcharts, info bubbles — all auto-generated from your material. I believe this is one of the most interesting things I...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Building an AI That Turns Any Textbook into an Interactive Course (Using Open Source LLMs)&lt;br /&gt;
&lt;br /&gt;
Oct 25, 2025&lt;br /&gt;
I’ve been developing something quite innovative lately — an agent that can transform a PDF or textbook into a completely interactive course.&lt;br /&gt;
Like, not just a bunch of text dumped into a webpage. I’m talking Q&amp;amp;A modules, drag-and-match games, flowcharts, info bubbles — all auto-generated from your material.&lt;br /&gt;
I believe this is one of the most interesting things I’ve created so far, and it’s all open source.&lt;br /&gt;
Press enter or click to view image in full size&lt;br /&gt;
 &lt;br /&gt;
State-of-the-art large reasoning models show impressive problem-solving abilities, but often struggle to follow straightforward instructions during reasoning.&lt;br /&gt;
The basic idea&lt;br /&gt;
The agent works like a course designer who never sleeps.&lt;br /&gt;
Here’s how it goes:&lt;br /&gt;
1.	You drop in some content (like a textbook chapter or lecture notes).&lt;br /&gt;
2.	The agent reads and figures out what’s inside.&lt;br /&gt;
3.	It comes up with a lesson structure — what goes first, what becomes a quiz, what fits better as a visual.&lt;br /&gt;
4.	Then it actually calls tools that build each part — questions, charts, etc.&lt;br /&gt;
5.	A second agent reviews the whole thing to make sure it’s true to the source.&lt;br /&gt;
6.	You get a neat, interactive lesson that you can share.&lt;br /&gt;
And the best part — it’s built on Together AI’s open-source models, so there are no paywalls or black-box dependencies.&lt;br /&gt;
How it works&lt;br /&gt;
When you upload a document, the agent initially determines how to process it. If it’s short, it retains everything in context.&lt;br /&gt;
If it’s long, it creates embeddings so it can “remember” sections as needed.&lt;br /&gt;
text = load_pdf(&amp;quot;chapter1.pdf&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
if len(text) &amp;lt; 10000:&lt;br /&gt;
    context = text&lt;br /&gt;
else:&lt;br /&gt;
    context = embed_and_store(text)&lt;br /&gt;
Once it understands the material, it sketches out a lesson plan. Something like:&lt;br /&gt;
lesson = [&lt;br /&gt;
    {&amp;quot;type&amp;quot;: &amp;quot;info_bubble&amp;quot;, &amp;quot;topic&amp;quot;: &amp;quot;Newton’s First Law&amp;quot;},&lt;br /&gt;
    {&amp;quot;type&amp;quot;: &amp;quot;qa&amp;quot;, &amp;quot;count&amp;quot;: 3},&lt;br /&gt;
    {&amp;quot;type&amp;quot;: &amp;quot;drag_match&amp;quot;, &amp;quot;pairs&amp;quot;: [&amp;quot;Force&amp;quot;, &amp;quot;Mass × Acceleration&amp;quot;]},&lt;br /&gt;
    {&amp;quot;type&amp;quot;: &amp;quot;flowchart&amp;quot;, &amp;quot;topic&amp;quot;: &amp;quot;How motion changes under force&amp;quot;}&lt;br /&gt;
]&lt;br /&gt;
That structure then becomes a set of tool calls that automatically build each piece of the lesson.&lt;br /&gt;
call_tool(&amp;quot;qa_generator&amp;quot;, {&lt;br /&gt;
    &amp;quot;topic&amp;quot;: &amp;quot;Newton’s First Law&amp;quot;,&lt;br /&gt;
    &amp;quot;num_questions&amp;quot;: 3&lt;br /&gt;
})&lt;br /&gt;
Everything’s modular, so I can keep adding new “learning blocks” over time.&lt;br /&gt;
The reviewer agent&lt;br /&gt;
After the first agent creates the lesson, another one (a “Lesson Reviewer”) reviews everything to ensure accuracy against the original material. If it detects issues, it proposes edits — similar to a quality check for AI-generated lessons.&lt;br /&gt;
Why open source?&lt;br /&gt;
I’m choosing Together AI models because I want this to remain open and free. If you’re a student, teacher, or independent creator, you should be able to create learning content without spending a lot or sharing your data with proprietary APIs.&lt;br /&gt;
ReasonIF — Why LLMs still struggle to follow instructions&lt;br /&gt;
While building this, I came across a new research paper called ReasonIF (short for Reasoning Instruction Following).&lt;br /&gt;
It basically says even the best large reasoning models (like GPT-OSS-120B, Qwen3–235B, DeepSeek-R1) fail to follow reasoning instructions about 75% of the time.&lt;br /&gt;
Not the final answer — but during the actual thinking process.&lt;br /&gt;
That’s… a lot.&lt;br /&gt;
They built a benchmark for this and tried a new training trick called Reasoning Instruction Finetuning (RIF). It helped a bit (score went from 0.11 to 0.27), but yeah, there’s still a ton of room for improvement.&lt;br /&gt;
For anyone building multi-step agents like mine, this part is especially important. You need your model not only to “get” your instructions but also to follow them consistently as it reasons through tasks.&lt;br /&gt;
Press enter or click to view image in full size&lt;br /&gt;
 &lt;br /&gt;
Press enter or click to view image in full size&lt;br /&gt;
 &lt;br /&gt;
Analysis specific to instructions (left) within the reasoning trace and (right) in the main response. Failures are particularly evident for formatting-sensitive tasks like JSON formatting and uppercase-only text.&lt;br /&gt;
Press enter or click to view image in full size&lt;br /&gt;
 &lt;br /&gt;
Model accuracy versus reasoning IFS across benchmark difficulty levels. All LRMs exhibit a positive slope, indicating that harder tasks can negatively impact reasoning IF performance.&lt;br /&gt;
For the curious: running ReasonIF&lt;br /&gt;
If you like testing this kind of stuff, here’s how they ran it:&lt;br /&gt;
# Install dependencies&lt;br /&gt;
uv sync&lt;br /&gt;
&lt;br /&gt;
# Activate environment&lt;br /&gt;
source .venv/bin/activate&lt;br /&gt;
# Run inference&lt;br /&gt;
python -m src.main --model_name &amp;quot;deepseek-ai/DeepSeek-R1-Distill-Qwen-14B&amp;quot;&lt;br /&gt;
# Evaluate&lt;br /&gt;
python -m src.eval_core --model_name &amp;quot;deepseek-ai/DeepSeek-R1-Distill-Qwen-14B&amp;quot;&lt;br /&gt;
It saves metrics like instruction-following accuracy in the outputs/ folder.&lt;br /&gt;
What’s next&lt;br /&gt;
Right now, the app can already generate small lessons from short PDFs.&lt;br /&gt;
Next step: scaling it up to whole chapters, with better visuals and smoother editing tools.&lt;br /&gt;
Once it’s stable, I’ll make a complete write-up or a video guide on how I built it.&lt;br /&gt;
Final thoughts&lt;br /&gt;
AI shouldn’t just generate text — it should create experiences. This project is my small step toward that goal. The fact that it’s open and reproducible makes it even better.&lt;/div&gt;</summary>
		<author><name>PC</name></author>
	</entry>
</feed>