Can AI Settle the Cube Rule? Testing TypeSafe AI
Like many others, I got access to TypeSafe AI (also known as Jev AI) and wanted to give it a spin.
One of the three examples in the TypeSafe AI playground is “Is a hotdog a sandwich?” — a more difficult question than some might think.
One of the strong selling points of TypeSafe AI is that it returns structured responses. In this case, it returned a JSON payload stating, with 81% confidence, that a hotdog is a sandwich. My question was purely: given the food “hotdog,” does it meet the criteria to be a sandwich?
TypeSafe AI states that the underlying model is trained like other models but doesn’t have niche knowledge. Thankfully, what we’re discussing here isn’t a niche topic, just a generally understood one.
Bringing In the Cube Rule
I wanted to take it a bit further and test it against one of my favorite team-building activities: classifying foods into cube rule types. If you don’t know what that is, you can read up on it at cuberule.com — in short, it classifies foods into different groups of cube-like types: quiche, cake, toast, and so on. It’s a fun game to play, one that can either bond or destroy your group.
Thankfully, we have AI now to give us answers.
So, given the food “ravioli,” what’s the answer? I’d expect it to land under calzone or nachos, depending on how liberal you are with the definitions.
The results? Every question came back with a confidence level of roughly less than 5%. The reason: the cube rule is a niche topic.
Here’s the shape of what actually went in, since the playground share link needs a TypeSafe AI account to open. The state — the input being classified:
{
"food": "Ravioli"
}
And the questions — one per cube-rule category, with no criteria defined yet:
{
"is_salad": {
"type": "noul",
"instructions": "Is `food` a salad?",
"criteria": {
"true": "",
"false": ""
}
},
"is_toast": {
"type": "noul",
"instructions": "Is `food` toast?",
"criteria": {
"true": "",
"false": ""
}
}
// ...one entry like this per cube-rule category
}
With criteria.true and criteria.false left blank, the model has nothing to reason against beyond its own training — which is why confidence came back near zero.
Giving It Better Definitions
Now, you can imagine that if this were the end of the exercise, this approach would never work for a ticket classifier, a decision-tree assistant, or anything similar — but we can provide more context.
Each question has a true/false outcome, and the statements of what counts as true or false can actually be defined. So, using the concept of the cube rule, I filled in definitions of what’s true and false for each question. The state stayed the same — still just { "food": "Ravioli" } — only the questions changed:
{
"is_salad": {
"type": "noul",
"instructions": "Is `food` a salad?",
"criteria": {
"true": "The food has no structural starch on any face at all — it is pure filling with nothing enclosing or supporting it, as with a steak, mashed potatoes, or flan.",
"false": "The food has structural starch on at least one face."
}
},
"is_calzone": {
"type": "noul",
"instructions": "Is `food` a calzone?",
"criteria": {
"true": "Structural starch fully encloses the food on all six faces with no opening at all, as with a burrito, a corn dog, a whole pie, dumplings, or a Pop-Tart.",
"false": "The food has at least one open, unenclosed face."
}
}
// ...same treatment for the rest of the categories
}
The results shifted. Ravioli came back with 40% confidence as a calzone-type food. If we tweak the definitions further, we can keep improving this result, as long as we genuinely believe it’s of type calzone — and that’s really powerful.
This way, you’re still relying on the model’s underlying knowledge, but you can steer the result significantly by providing your own definition of what’s true and false.
If you have access to the playground, you can open it here and swap in your own favorite food to see which category it lands in.
Speed and Where This Fits
Lastly, yes, it’s fast: 105ms of reasoning and 207ms of latency, which means you can easily drop it into any of your pipelines with minimal cost.
We can expect to see a model like this used to police chats with agents, secure conversations, classify tickets, trigger threshold alarms, and so on.