Computational modeling of cognitive processes · From words to models
Phonological Loop Workbook
From a behavioral effect to a simulated model, in five steps. Your text is kept in this browser as you type, and step 5 downloads everything as one report.
Step 1 · Ask an LLM to build the experiment
The effect: word length.People remember lists of short words (cat, sun, ship) better than lists of long words (refrigerator, university, hippopotamus), even when the number of words is the same (Baddeley, Thomson & Buchanan, 1975). Your task is to get an LLM to build a browser experiment that measures this effect.
An LLM will build something from almost any prompt. The question is whether it builds the experiment you intended. Fill in each part of the specification below. Anything you leave empty is marked in the prompt so the LLM asks you instead of guessing.
What do you want to find out, and what do you expect?
What do you manipulate, and at which levels?Questions to consider
How do you define "long": letters, syllables, or time to pronounce?
Two levels or more? What would more levels let you see?
Within or between participants?
What do you measure, and how is a response scored?Questions to consider
Does a word count only in the right position (serial recall), or anywhere (free recall)?
What about typos, plurals, or capital letters?
Which score matches what the theory talks about?
Which words? How are they chosen and matched?Questions to consider
What else differs between short and long words: frequency, concreteness, familiarity?
Can a word appear in more than one list?
Will you give the LLM the word lists, or let it choose them?
What happens on the screen in one trial, step by step, with durations?Questions to consider
How long is each word shown? Is the presentation time the same for short and long words?
Is there a delay before recall? What does the participant do during it?
How do participants respond: typing, clicking, speaking?
How many trials, in what order, with or without practice?
What exactly will participants be told?
What should the output file contain? One row per what?
How the LLM should work
Your prompt
Before you trust it, test it
Step 2 · Run the class experiment
Everyone runs this same version, so all the data can be combined. Compare it with what you specified in step 1: where does it differ, and why might that matter?
Your results
Words recalled (any position) by word length
Recall by position in the list (serial recall)
Class dataCollect the CSV files from your classmates (or the combined file from your lecturer) and load them here. The class averages will be added to your model prompt in step 4.
Step 3 · Tell the story, then make it mechanical
First, explain in plain words why short words are remembered better. Then turn the story into decisions a computer can execute. A simulation cannot run on "memory fades"; it needs to know how fast, how much, and what happens at zero.
What did you do while trying to remember the words? Was it different for long words?
In your own words: what happens to a word from the moment you see it until you recall it? What does rehearsal do? Why does word length matter?
From story to mechanismEvery story leaves these questions open. Your answers define your version of the model. Different answers give different models; Lewandowsky and Farrell count 144 of them from the same verbal theory.
Step 4 · Prompt an LLM to simulate your model
Keep the parts separate: the story, the mechanism, free parameters (what you will tune to fit the data), fixed parameters (what stays constant), the experimental settings, and the data. Mixing them is how mistakes hide.
Your story and decisions from step 3, and the class data from step 2, are already included below. Edit them here or go back.
Name, meaning, unit, starting value, and range for each.Questions to consider
Which numbers should change to fit the data, and which should not?
Each free parameter makes the model more flexible. What does that cost?
Constants of the model that you will not tune.
These should match the experiment the data came from.
Which plot, table, or numbers do you need to judge the model?
Write one test per line, before you see any output. Each test should say: if I set or change X, the simulation should show Y.Questions to consider
What should happen in extreme cases, where you know the answer without simulating?
What would convince you the code implements your story, and not a different one?
What would a wrong implementation look like?
How the LLM should work
Your model prompt
Step 5 · Validate, fit, and report
Run the simulation the LLM gave you. Check your tests first, then compare with the data. You will present this in class.
Your validation tests
Summarize the mechanism in the code. Does it match what you meant?
Best parameter values, predicted versus observed recall for each word length.
What does your model predict for a condition nobody ran (for example, 7-syllable words, or a 10-second delay)?
Clear all your text and checkboxes in this browser?