flybrain · week 3 · closing the fly ↔ LLM loop · days 1–2 of 7 done · in progress

Can the fly talk to a language model?

Week 3 rebuilds the rest of the "fly brain to ChatGPT" demo on the calibrated male brain. Words play into the simulated fly, a readout turns its spikes back into words, a language model reads them and picks an action, and (from Day 3) that action is fed back into the fly. This page grows as each day finishes.

Day 2: the fly's words become a prompt

Each episode plays its words back to back (0.5 s each, 150 Hz) into one continuous simulation of the calibrated MaleCNS brain with presynaptic inhibition. The readout decodes each window, the decoded words become first-person sentences, and the language model must answer with one of five actions.

words in→simulated fly brain→word readout→prompt→language model→action→action back into the fly (Days 3–4)

Tell the fly what it senses

Try:
Words the fly knows
The fly only has 17 sensory words (5 tastes, 5 smells, hot, cold, dry, humid, sound, wind, looming). Whatever you type is matched to the closest of them, and anything with no close match is crossed out.

System

Prompt, built from the fly's decoded words

Reply

What Day 2 found

The fly → LLM half works. The demo episode from the plan (vinegar, ripe fruit, sugar, warm, bright → vinegar · fruit · sugar · hot · looming) decodes 50 of 50 words over 10 noise seeds, with every top probability at least 0.998. Six short scenarios decode 12 of 12. The readout was trained once, on isolated words, and needs no retraining for episodes on this brain model.

The logged replies are placeholders. The project has no API key yet, so the logged replies come from an offline rule-based stand-in (danger → turn away or stop, food → eat, attractive smells → go forward). It is there for testing and says nothing about the fly. Only the decoding is a result. With ✦ Ask a real LLM you can send the same prompts to Claude or GPT with your own key and see what a real model picks.

Your own words are replayed, not simulated. The site has no server, and one live run takes about 1.5 minutes of computing, so Tell the fly what it senses plays back recorded responses instead: 262 word windows from the Day 1 episodes and the Day 2 runs, every one decoded correctly. Your text is first matched to the fly's 17 words, by a real LLM with your key or by the project's keyword table without one.

Carried into Day 3. Looming leaves 400–1,200 neurons firing after the episode, so the action code will start with that state present. The action readout has to be trained with that history.

Let a real LLM answer

The fly's decoded words go to the model you pick, which must answer with one of the five actions. Your key stays in this browser and is sent only to that provider. This site has no server.