Overview
What This Guide Is For
This document teaches an LLM how to transform raw lecture materials — slides (PDFs), lecture notes, and textbook chapters — into comprehensive, beautifully styled HTML summaries that can fully replace the original materials for study purposes.
The output should be a single, self-contained HTML file with inline CSS that a student can open in any browser and use as their primary study resource.
Goal
Produce a summary that is complete enough to replace the original slides and notes — not a superficial overview, but a detailed, math-included, well-structured document with visual polish.
Phase 01
Reading & Extracting the Source Material
Before writing anything, you must thoroughly read and internalize all provided materials. This is the most critical phase — incomplete reading leads to incomplete summaries.
1
Identify all source files. The user may provide slide decks (.pdf of slides), lecture notes (.pdf of textbook-style writing), or both. List them before proceeding.
2
Read with multiple targeted queries. Don't rely on a single search pass. Search for the broad topic first, then make follow-up queries for each sub-topic, each model, each mathematical formulation. For a topic like "Transfer Learning," you might need 3–5 separate searches to cover CoVe, ELMo, BERT, BERT variants, GPT, Seq2Seq models, etc.
3
Cross-reference slides with notes. Slides often contain figures, bullet-point summaries, and high-level structure. Notes contain the mathematical detail and prose explanations. You need both — the structure from slides, the depth from notes.
4
Extract every equation. Identify all mathematical formulations — loss functions, objective functions, model definitions, combination formulas. These must appear in the summary.
Common Mistake
Stopping after one search pass and missing entire subsections. Always check: did I cover every model mentioned in the lecture outline? Every equation in the notes? Every variant listed on the slides?
Phase 02
Structuring the Summary
A good summary mirrors the logical flow of the lecture but reorganizes for clarity and self-containedness.
Structural Principles
Follow the lecture's own outline. The slides usually have an explicit "Lecture Outline" slide — use that as your section skeleton. Don't invent a new order unless the original is confusing.
One section per major concept or model. Each model (CoVe, ELMo, BERT, GPT, etc.) should be its own visually distinct section. Don't merge unrelated models.
Within each section, follow this sub-structure:
a
Motivation / Context — Why was this model created? What problem does it solve that the previous model didn't?
b
Architecture — What is the model's structure? (encoder, decoder, layers, dimensions)
c
Mathematics — Training objectives, loss functions, key equations with full explanation of every symbol.
d
Key Innovations — What's new compared to predecessors? (bullet points work well here)
e
Usage / Fine-tuning — How is this model applied to downstream tasks?
f
Results / Impact — What benchmarks did it beat? Why does it matter?
Completeness Check
The summary must be self-contained. A student who has never seen the slides should be able to understand every concept from the summary alone. Define all terms. Explain all notation. Provide context for every equation.
Phase 03
Writing Mathematics Well
Math is the hardest part to get right. The summary must include every equation from the source material, rendered clearly and explained thoroughly.
Rules for Math in HTML Summaries
Use monospace code blocks for equations. Since we're generating raw HTML (no LaTeX renderer), use <div class="math-block"> with a monospace font. Use Unicode symbols (Σ, θ, ∈, →, ≤, ∏, etc.) and HTML subscripts/superscripts.
Always define every symbol immediately after the equation. Use a "where:" block inside the math block or as a follow-up paragraph. Never assume the reader knows what θ, γ, or sl represent.
Explain the intuition before the formula. State in plain English what the equation computes, then show the formula, then define symbols. Example: "The ELMo representation is a task-specific weighted average over all LSTM layers:" → [equation] → "where sl are softmax weights learned per task..."
Preserve all loss functions exactly. Training objectives (ℒMLM, ℒNSP, ℒELMo, etc.) are the most important equations. Never paraphrase or simplify them — reproduce them faithfully.
Here is the HTML pattern to use:
<div class="math-block">
ℒ<sub>ELMo</sub>(θ) = Σ<sub>n=1</sub><sup>N</sup>
Σ<sub>t=1</sub><sup>T</sup> [ log p<sub>LM</sub>(...)
+ log p<sub>LM<sup>B</sup></sub>(...) ]
<span style="color:var(--accent-purple)">where:</span>
• →θ, ←θ = forward/backward LSTM parameters
• θ′ = shared token & softmax parameters
</div>
Phase 04
Visual Design & Styling
The summary should be visually polished enough that a student prefers reading it over the original slides. Here's how to achieve that.
Color System
Assign a unique accent color to each major section. Use 5–7 colors from a harmonious palette. Each section's heading, strong text, bullet dots, side-bar stripe, and callout borders should all use that section's accent color.
Use CSS variables for all colors so the palette is easy to change. Define them in :root.
Light mode palette guidance: Use a warm off-white background (not pure #fff), deep but not black text (#2c2a26), and medium-saturation accent colors that are readable against white.
Component Library
Build these reusable CSS classes and use them consistently:
Section cards — White background, subtle border, rounded corners (12–16px), left accent stripe (4px), light box-shadow. Each section gets a color class (.blue, .teal, etc.).
Math blocks — Slightly tinted background, monospace font, generous padding, rounded corners.
Callout / definition boxes — Left-border accent (4px), faint tinted background, uppercase monospace label.
Key-term grids — 2-column CSS grid of small cards for terminology definitions.
Bullet items — Custom colored dots (8px circles via ::before pseudo-element) matching the section color, with left padding.
Numbered steps — Flexbox row with a colored circle number + content. Good for procedures and architectures.
Sub-badges — Small inline pill labels for sub-topics (e.g., "5.1 — RoBERTa").
Comparison tables — Bordered, zebra-free, with monospace header row and model names highlighted in color.
Typography
Headings: Use a serif display font (e.g., Playfair Display) for h1/h2/h3. Set heading color to the section's accent.
Body: Use a clean sans-serif (e.g., Source Sans 3). 16–17px, line-height 1.7–1.8.
Code / math: Use a monospace font (e.g., JetBrains Mono). Slightly smaller than body text.
Import fonts via Google Fonts in the <style> block.
Layout
Max-width container: 860–900px, centered.
Hero header with gradient background, large title, subtitle.
Sections stacked vertically with 40–50px margin between them.
All CSS inline in a single <style> tag — no external files.
Phase 05
Content Quality Rules
What to Include
Every model mentioned in the lecture materials.
Every equation — loss functions, objectives, architectural formulas, combination rules.
Model sizes and configurations — number of layers, hidden dimensions, parameter counts, training data sizes.
Comparisons between models — what each new model improved over its predecessor.
Key results — which benchmarks were beaten, by how much, what the takeaway is.
Formal definitions — if the notes provide a boxed definition, include it in a callout box.
What to Exclude
Figure descriptions without the figures — don't say "as shown in Figure 2.3" since the reader won't have the figure. Either describe what the figure shows in prose or omit the reference.
Reference lists — a brief "References" line at the end is fine, but don't reproduce full bibliographies.
"TODO" notes from the source — some lecture notes have author TODOs; skip these.
Tone & Voice
Write in clear, explanatory prose — not bullet-point outlines. The summary should read like a well-written textbook section.
Use bullet points (styled as colored items) only for lists of discrete items (model features, training details, results).
Be precise with technical claims — if the notes say "state-of-the-art at the time," say that, not just "state-of-the-art."
Phase 06
Assembly & Output
The HTML Template
The output should be a single .html file with this structure:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=...');
:root { --bg: ...; --accent-blue: ...; ... }
/* All CSS here */
</style>
</head>
<body>
<div class="hero">
<h1>Topic Title</h1>
<div class="subtitle">Course info</div>
</div>
<div class="container">
<div class="section blue">
<span class="section-number">Section 01</span>
<h2>Section Title</h2>
<p>Content...</p>
<div class="math-block">equation...</div>
<div class="callout">
<span class="callout-label">Definition</span>
<p>...</p>
</div>
</div>
<!-- more sections with different color classes -->
</div>
</body>
</html>
Color Class Assignment
Cycle through colors in a visually pleasing order. Avoid placing two sections with the same color adjacent to each other. A good rotation for 8+ sections:
blue → teal → purple → orange → rose → green → blue → teal → ...
Final Checklist
Does every section from the lecture outline appear?
Is every equation from the notes included and explained?
Are model sizes / training details included?
Does each section have its own accent color?
Is the HTML self-contained (no external CSS/JS files)?
Is the document readable without prior knowledge of the slides?
Does it render well on mobile (check max-width, font sizes, grid responsiveness)?
Reference
Example Prompt to Use
Here is an example prompt you can give to an LLM along with this instruction document and the source materials:
User Prompt
Create a detailed summary of all the content on "[TOPIC]" from the materials I provided (slides and lecture notes). Please explain the math well and put it in the summary. Output it as a styled HTML file following the instruction guide I provided — use light mode, color-coded sections, math blocks, callout boxes, and make it complete enough to replace the original materials for studying.
Tip
Attach both this instruction file and the lecture PDFs to the conversation. The LLM should read this guide first (to understand the format and style), then read the source materials thoroughly (with multiple search passes), and only then begin writing the HTML.