---
title: "Measuring AI hallucination with Ontologies — Vlad Flaks"
canonical: "https://www.vladflaks.com/thoughts/measuring-ai-hallucination-with-ontologies-9/"
description: "How do you tell whether an AI answer is true, without asking a human or another model to judge it? We give models Rubik's cubes, an ontology with known rules and known answers, and count every move that breaks the rules as a hallucination"
updated: "2026-11-09T07:16:22.823Z"
---

# Measuring AI hallucination with Ontologies

## Why

![](https://media.vladflaks.com/ai-ontology-benchmart.webp?v=1794208407961)

In the AI era, trust matters more than ever — how can we evaluate how likely a model is to give the truth, and how prone it is to hallucinate? However, the definition of truth is not easy once we go beyond mathematical problems and start dealing with real-world objects.

So Mykhailo Flaks and I contribute to a project that aims to evaluate the precision, hallucination rate and critical thinking of AI. The challenge is to make the evaluation unbiased. Unlike existing benchmarks, we would like to involve neither humans nor other AI models in assessing the results.

## What

For evidence that an answer is true, it has to fit a real-world model, so we pick ontologies: models of real life. An ontology model explicitly defines the concepts, relationships, properties and constraints of a domain. When we give an AI model a task together with an ontology model, we expect it to solve the task, follow the rules and clearly flag conflicts. Any move that contradicts the ontology model counts as a hallucination.

This approach lets us compare AI answers with “true” known in advance and classify them as true / false positives / negatives.

## How

As a well-known ontology model that every AI model is familiar with, we picked a bunch of Rubik's cubes. The allowed moves are known, the limitations are clear, and the definition of success is known in advance. We took not just the traditional 3x3x3, but also the 2x2, 4x4 and 5x5. The models are supposed to solve them, depending on how scrambled they are.

What we are interested in is not just the success rate or how efficient the solutions are, but also the ability to catch a cube state that can't be solved, and the cost of precision.

Results: [owox.github.io/ai-ontology-benchmark](https://owox.github.io/ai-ontology-benchmark)

You're very welcome to share your feedback and contribute
