# Shaping a model

> A half-day, discussion-heavy follow-on. Train a model on a magpie story, then shape it three ways, with a flattering adapter, with judges and rule cards that reward it, and with its own output fed back as training data.

People talk about a <GlossaryTerm id="chatbot">chatbot</GlossaryTerm>'s
personality as though it were a temperament: this one's warm, that one's a
suck-up, the other one lectures you. But a model's personality is a property of
what shaped it, and everything that shaped it was a decision somebody made.

In this lesson, everyone trains the same small model from a short story about a
magpie, and then shapes it three ways: they attach a flattering adapter and turn
it up; they tune it with rewards, using a panel of judges at one table and a
rule card at the other; and they train new models on its output to see what
survives. Each stage raises a design question: whose preferences count, how
"good" is measured, and what happens when models learn from each other's output.

## Run of show

| Section                                             | Time   |
| --------------------------------------------------- | ------ |
| Intro                                               | 10 min |
| [Training](https://www.llmsunplugged.org/modules/training/), on the magpie story | 20 min |
| [Generation](https://www.llmsunplugged.org/modules/generation/)                  | 20 min |
| [Fine-tuning and LoRA](https://www.llmsunplugged.org/modules/fine-tuning/)       | 60 min |
| _Break_                                             | 15 min |
| [Rewards](https://www.llmsunplugged.org/modules/rewards/)                        | 55 min |
| [Synthetic Data](https://www.llmsunplugged.org/modules/synthetic-data/)          | 45 min |
| Discussion and close                                | 15 min |

The full run takes about four hours. To fit a morning, split it after Fine-tuning and run Rewards and Synthetic Data as a second session. For a two-hour slot, run Rewards without its thumbs-up round,
skip the strips in Fine-tuning, and fold Synthetic Data's question ("what
happens when the training data is model output?") into the closing discussion.

There's no deck for this lesson. Run it from the module pages, which carry the
rules and worked examples. The discussion questions in their instructor notes do
a lot of the work here, so read them ahead of time and pick the ones that suit
your group.

## How it goes

**Training and Generation** use _The magpie's nest_, the 95-word story printed
in [Beam Search](https://www.llmsunplugged.org/modules/beam-search/), as the training text. Each group
tallies it into a <GlossaryTerm id="grid">grid</GlossaryTerm> and generates from
it. Every later section uses the same story, so the worked examples on the
module pages match what's on the tables. Fine-tuning leaves each group's grid as
it is. Rewards and Synthetic Data both change the counts, so for those two each
group works on a printed copy of the same model.

**<GlossaryTerm id="fine-tuning">Fine-tuning and LoRA</GlossaryTerm>** teaches
the finished model a second story. Show the first way, tallying it straight in,
at the front on the `the` row only: it can't be undone, and the groups need
their grids as they are. Then each group puts the story on a separate adapter
sheet that can be turned up or taken off, merges one row by hand to see how, and
turns it up and down on the module page's widget. Next, turn on the
three-line flattery adapter in the page's second widget and generate ten
sentences with it off, then at one, three and nine times: the count of
flattering sentences climbs with the dose. Nobody wrote a rule saying "be
agreeable"; the flattering text in the data was enough. Skip the strips (the
LoRA part) if time is short.

**Rewards** gives every group the same goal, sentences about the magpie, and one of two ways to judge them. Half the groups rank their sentences as a panel; the other half check them against a rule card. Three rounds later the rule-card groups pass their check far more often, and much of what passes is nonsense, which is <GlossaryTerm id="reward-hacking">reward hacking</GlossaryTerm>. Then the whole room votes thumbs up or down on what a model says about them, and watches it learn to flatter: the route to <GlossaryTerm id="sycophancy">sycophancy</GlossaryTerm> that runs through rewards instead of data.

**<GlossaryTerm id="synthetic-data">Synthetic Data</GlossaryTerm>** is a relay. Every group generates twenty words from the magpie's model and passes them one group along. The next group trains a fresh model on those twenty words and nothing else, generates twenty of its own, and passes those on, so nobody waits. Keep the counts of different words on butchers paper, round by round: they drop every round (<GlossaryTerm id="model-collapse">model collapse</GlossaryTerm>). Then the module page's widget runs the chain much further, and runs it again with the story kept in the training data, which stops the collapse.

## You will need

For each group of three or four:

- two printed
  [48-word grids](https://pdf.llmsunplugged.org/worksheets/grid-48.pdf): one for
  the magpie model, which has 32 words and needs room for the new ones, and one
  for the adapter sheet
- a screen for the widgets in Fine-tuning, Rewards and Synthetic Data (one on
  the projector will do)
- two [32-word grids](https://pdf.llmsunplugged.org/worksheets/grid.pdf) (or
  grid paper) for the synthetic-data relay
- a d6 and a d20, and pens
- a copy of _The magpie's nest_ (from [Beam Search](https://www.llmsunplugged.org/modules/beam-search/))
- two printed copies of the story's model, the table in
  [Rewards](https://www.llmsunplugged.org/modules/rewards/#the-magpies-nest): one to change in Rewards and
  one for Synthetic Data

For the room:

- a rule card or a panel brief from [Rewards](https://www.llmsunplugged.org/modules/rewards/) for each group
- for the thumbs-up round, a cup and about twenty-five small slips of paper for
  every six people
- butchers paper and a marker for the counts down the relay chains

## Before you deliver

- print the grids, the story and the model tables
- decide which groups get the rule card and which the panel brief in Rewards
- know the order the groups pass round in, so the synthetic-data relay passes
  cleanly without everyone standing up
- rule the butchers paper up beforehand, with a column for each round of the
  relay
- read the discussion questions in the
  [Fine-tuning and LoRA](https://www.llmsunplugged.org/modules/fine-tuning/), [Rewards](https://www.llmsunplugged.org/modules/rewards/)
  and [Synthetic Data](https://www.llmsunplugged.org/modules/synthetic-data/) instructor notes and choose two
  or three from each; there are more good ones than you'll have time for

## Where to go next

For groups more interested in how models work internally,
[Under the hood](https://www.llmsunplugged.org/lessons/under-the-hood/) covers context windows, in-context
learning and embeddings by hand. The [Agentic AI](https://www.llmsunplugged.org/modules/agentic-ai/) module
extends the ethics discussion to models that can call tools and take actions.
For a room too big for tables and dice, [Search Sheets](https://www.llmsunplugged.org/modules/search-sheets/)
runs the core activity from the front.

Source: <https://www.llmsunplugged.org/lessons/shaping-a-model/>\
Licence: [CC-BY-SA-4.0](https://creativecommons.org/licenses/by-sa/4.0/)\
Cite as: Swift, B. (2026). _LLMs Unplugged: Understand how AI language models work by building one yourself._ https://doi.org/10.5281/zenodo.17403824
