xavier-ramirez.com
← Writing

Your own lesson pipeline · 00 · 25 Aug 2026 · 10 min read

How a standard becomes a lesson someone learned from

The chain from a curriculum code to a measured mastery gain.

Only a small fraction of what an AI lesson generator produces reaches a student unedited. The obvious read is that the edits are the failure — a quality gap to close with a better prompt. That read is backwards. The edits are the most valuable signal the system produces, and everything a lesson pipeline does is one long attempt to earn enough trust to keep receiving them. This post walks the whole chain end to end, names the link everything else hangs on, and says what the six posts after it build.
01 · Spine02 · Alignment03 · Appropriateness04 · Guardrails & deletion05 · Publishing & fidelity06 · Efficacy

This post is the map. Every stage below is a post.

Worked exampleThis series uses a K–8 supplemental curriculum publisher as its running example — standards frameworks from three states, generated interactive lessons, the teachers who edit them, and the learning-management courses in two districts the platform publishes into. The pipeline itself is domain-agnostic; the content just happens to belong to third graders.

The chain

One lesson, six hops, and every hop can corrupt it

It is a Tuesday. A curriculum designer asks for a lesson on one third-grade standard, for a section reading roughly two years below level. By Friday it is an assignment in a real course. Six weeks later it is a row in a readout that says whether it taught anything. Step through every hop it makes.

one lesson, six hops
01 / 6 · Tue

A contract, not a prompt

A curriculum designer asks for a lesson on one third-grade standard, for a section reading roughly two years below level. The request carries the district, the environment, the adopted framework and its version, the grade band and the reading target.

What the platform knows now
req_5510framework 2019.1grade band 3reading target 0.6
How this hop loses them

Leave the framework version out and the artefact makes a claim nobody can date.

next: decomposition

Notice how little of that is generation. The model call is the easy part, and it gets easier every quarter. The hard part is the claim that this artefact teaches this standard, to this child, and that you can still prove it in March.

The squeeze

Writing the lesson stopped being the expensive part

Every argument about AI in education is still framed around whether the model can write a decent lesson. It can. That question closed, and closing it moved the bottleneck somewhere much less comfortable.

a thousand lessons, one review team
The batch arrives…

↳ The capacity slider is the same in both modes. Only what it is aimed at changes.

Found in week one
6 / 100
All 100 seen after
16.7 wks
Effort the batch demands
1000 reads
Versus unsorted
Nothing is sorted, so every lesson costs a full read and a reviewer hits a real problem at the base rate — 10 in every 100. The queue depth is also a lie about your throughput: lessons nobody reached either ship unreviewed or never ship, and from the outside you cannot tell which.

The constraint is real and the panic is not. You are not competing on whether the model writes well. You are competing on whether a curriculum director can defend using you — and the gate is not there to catch a model that writes badly. It is there so that the scarce hours of the people who can catch things get spent on the lessons that need them.

The spine

Every downstream claim is a bet that this artefact teaches what it is labelled

This is the sentence to carry through all six posts. Coverage, mastery, pass rates, “aligned to 100% of the third-grade standards” — none of them are measurements of learning. They are measurements of labels, and a label is whatever your alignment logic decided. Get that decision wrong and the arithmetic downstream is perfect and meaningless.

The silent version is the one to fear. Nobody files a ticket saying “the alignment layer is over-tagging.” They say the third-grade unit feels hard this year, and it feels hard for a year.

The leak

You can generate perfectly and still lose half of it at the importer

Suppose the alignment is right. The content is right. Gated, reviewed, approved, packaged and pushed into a district’s learning-management system. The importer accepts it and reports success. Then a teacher opens it and the equations are broken images, the interactive sort is a dead link, and two of the six question types came in as multiple choice.

Fidelity rate — elements submitted versus elements that render correctly in the student view — is the number that tells you whether the entire pipeline was worth building. Everything upstream is invisible to a classroom until it survives an importer you do not control.

Post 5 owns the mechanics. For now, know the name of the number.

Wrong turns

Two reasonable answers that give away the thing you are trying to own

Governance

The gate belongs at publish, and deletion reaches the model too

A guardrail that runs only at generation is not a guardrail — it is a default. The moment a teacher can edit a block, swap an image, add her own text or regenerate one section, every path around the generation-time check is open, and none of them is malicious. She is doing exactly what your product told her to do. Enforce at the narrowest point every path shares, which is publish, and model publishability as a join rather than a check.

Why a join, and not four checks?
Membership in the publishable set becomes the result of a query that cannot execute without the review receipt and the asset-rights record. There is no code path that produces a publishable lesson without them, because there is no code path at all — and the join fails closed. Four checks are four things to forget, and the one somebody deletes at six on a Friday is the one that keeps returning more rows, which looks like the fix.

Deletion is the mirror image, and it is worse here than in any other domain. A student-data deletion that stops at your database is not a deletion — the lesson is live in three courses, a grade passback wrote a score into a gradebook you do not own, and the child’s free-text answer is sitting in the evaluation set you used to benchmark last quarter’s model. That last one cannot be undone, which is why the design decision — student text never enters a training corpus or a retained eval set, ever — has to be made before the first fine-tune exists rather than after the first request arrives. Post 4 owns this, and it is a data-model decision, not a compliance chapter.

What the series builds

Six posts, one stage each, each with a runnable tag on the same open-source repo.

The honest framing

This is a teaching-grade reference implementation, not a product. The parts it shows you are the tractable parts: a queue consumer, a component solver, a rubric in a file, a diff engine, a hash-based assignment. The hard part in any real company is the organisational agreement about what “covered” means — whether an inferred alignment counts, whether a teacher’s edit means the content was wrong or that she has a strong voice, whether a photograph of a classroom is a resource or a child’s data. Every one of those is a curriculum decision wearing an engineering costume. Build the pipeline so that when the answers change, you can change them in one place.

Explain it back

Your team ships an unambiguous improvement: the generator now retrieves from each district’s adopted framework instead of a generic national one. Two weeks later, coverage reports show 12% more standards covered, the teacher edit rate has fallen, and a curriculum director says the third-grade unit “feels thinner this year.” Nothing errored. What happened?
Reveal a model answer

The retrieval change altered which codes the generator asserts alignment against, and the district’s local codes had never been mapped to anything. With no authored mapping available, the alignment layer fell back to embedding similarity — an inference — and wrote those claims into the same field as human tags, so the coverage report counted a guess and a certainty as the same thing. Coverage went up because the denominator changed, not because more was taught.

The falling edit rate is the trap. Teachers edit what looks wrong, and content that is shallow but plausible does not look wrong; it reads fine and skips the hard part. A drop in edit rate is therefore ambiguous by construction — it means either that quality improved or that the errors got harder to see, and nothing in that metric alone distinguishes them. “Feels thinner” is the more reliable instrument, because the director is reporting the absence of something, which is exactly what a metric built from present artefacts cannot see.

The fix is structural rather than a better embedding: alignment class is a separate field from confidence, coverage is reported per class so an inferred claim can never be counted as a covered standard, and a framework is not adoptable until its mapping has been authored and reviewed. The second-order consequence is the one to flag before anyone reads the dashboard — every historical coverage number was computed under the old framework, so any trend line spanning the change is measuring your own migration.

Next in the series · 01
Your own lesson pipeline: the spine

The request envelope, the queue, and the immutable blocks everything else reads from — every stage at its thinnest honest version, so the later posts have somewhere to land.

Clone it and run it