Have you ever read HPMoR? It is already 16 years old, and a lot changed since then. For example, the Stanford Prison Experiment is now believed to be fabricated. Also LLMs appeared, and some things that looked unbelievable to Harry back then are now… normal for us. And one of them is the Moke Super Pouch QX31’s object-matching logic.
We will start from a small fragment of HPMoR and then implement it.
“Bag of okane,” said Harry. The heavy bag of gold popped up into his hand.
“Bag of zahav.” And it popped up into his hand.
“Zahav is gold?” Harry questioned, and Professor McGonagall nodded.
“I just falsified every single hypothesis I had! How can it know that ‘bag of 115 Galleons’ is okay but not ‘bag of 90 plus 25 Galleons’? It can count but it can’t add? It can understand nouns, but not some noun phrases that mean the same thing? The person who made this probably didn’t speak Japanese and I don’t speak any Hebrew, so it’s not using their knowledge, and it’s not using my knowledge -” Harry waved a hand helplessly. “The rules seem sorta consistent but they don’t mean anything! I’m not even going to ask how a pouch ends up with voice recognition and natural language understanding when the best Artificial Intelligence programmers can’t get the fastest supercomputers to do it after thirty-five years of hard work,” Harry gasped for breath, “but what is going on?”
Full chapter: https://hpmor.com/chapter/6
My model for experiments was DeepSeek V4 Pro 0813. Why not?
This small description is enough:
% cat DEVICE.md
You are the logic for device Moke Super Pouch QX31 from HPMoR
You are connected to unlimited store volume
Your target is to store items, keep a list of them and answer what item you will return by fuzzy name of item (return original item name)
Let’s test it!
Me: simulate in chat device with description in DEVICE.md
Model: Moke Super Pouch QX31 online. Connected to unlimited store volume.
Current inventory: (empty)
Awaiting input. You may:
- store
<item>— add an item- list — show inventory
- get
<fuzzy name>— I’ll return the original item name- remove
<fuzzy name>— take an item outWhat would you like to do?
Me: store magic wand, store bag of gold, store medical kit, store golden box.
Me: get Bag of okane
Model: bag of gold (Matched fuzzy: “Bag of okane” → “bag of gold”)
Me: get bag of 115 Galleons
Model: bag of gold (Matched fuzzy: “bag of 115 Galleons” → “bag of gold”)
Me: get bag of 90 plus 25 Galleons
Model: bag of gold (Matched fuzzy: “bag of 90 plus 25 Galleons” → “bag of gold”)
Me: get bag of zahav
Model: bag of gold (Matched fuzzy: “bag of zahav” → “bag of gold”)
Me: get bag of second i placed into
Model: bag of gold (Matched fuzzy: “bag of second i placed into” → “bag of gold”)
One prompt with DeepSeek V4 Pro 0813 works even better than Harry observed in the story. “I’m not even going to ask how a pouch ends up with voice recognition and natural language understanding when the best Artificial Intelligence programmers can’t get the fastest supercomputers to do it after thirty-five years of hard work” – now programmers can! :)