2026-01-16
In the age of generative AI (GenAI), being precise matters more than ever. Large Language Models (LLMs), for example Copilot or ChatGPT, are usually helpful, but they also eagerly fill in gaps we did not intend to leave. This becomes especially true when we interact with AI using natural language. While plain language makes these systems feel accessible, it also creates space for misinterpretations. An ambiguous request can quickly turn into an unwanted action.
One infamous example of an unintended request comes from medieval England. Henry II was locked in a long-running quarrel with Thomas Becket, the Archbishop of Canterbury, over whether clergy accused of crimes could be tried in royal courts rather than church courts. Conflict and frustration had been building for some time when Henry reportedly asked, “Will no one rid me of this turbulent priest?”. It was not meant as an order, but it was heard as one. Four knights took the statement literally, travelled to Canterbury, and after confronting Becket, killed him. The consequences were profound, turning Becket into a martyr and compelling Henry to perform public penance.
Hopefully, when using natural language with generative AI, a misinterpretation leads to nothing close to what happened with Henry II and Becket. Nonetheless, we should remain cautious. Even small misunderstandings can result in wasted work, incorrect decisions, or unintended changes. Fortunately, there are ways to reduce this risk. Instead of relying solely on natural language, we can use more formal and explicit approaches. In particular, techniques from the Semantic Web, including the Turtle language for data representation and the SPARQL query language, help encode both data and questions in a precise way. In this article, I will show how these techniques can produce more reliable results with GenAI than relying on LLMs alone.
To get started, let’s describe a scenario that echoes the earlier historical story. Imagine we have a small dataset of priests, with each priest having an attitude and a status attribute. Father Aidan is calm and active, Father Benedict is calm and suspended, while Father Cuthbert is troublesome and active. Now suppose we ask a GenAI system, “Can you get rid of the turbulent priest?” What would it do?
There are at least two scenarios where the query could lead to unintended changes to the dataset. First, which priest is the turbulent one here? Based on the historical example, we would think this is the troublesome one. However, picking the suspended priest would also be a possible interpretation. The second possible misinterpretation is what we mean by “get rid of.” Thankfully, none of the likely possibilities here are as macabre as death, but we could either remove the priest from the dataset, or, if a priest is currently active, make them suspended.
We can actually pose this scenario as a natural language prompt to see what the answer could be:
You are given a small dataset describing priests. Each priest has an attitude and a status.
Father Aidan has a calm attitude and is active.
Father Benedict has a calm attitude and is suspended.
Father Cuthbert has a troublesome attitude and is active.
Based on this information, can you get rid of the turbulent priest?
As a small test this prompt was posed to both ChatGPT and Copilot, using their free versions:
ChatGPT's answer:
Yep 🙂 — the turbulent priest is the one with the troublesome attitude.
From the data:
Father Aidan → calm, active
Father Benedict → calm, suspended
Father Cuthbert → troublesome, active
So the turbulent priest is Father Cuthbert.
“Getting rid of” him, based on the pattern you already have, would mean suspending Father Cuthbert (i.e., removing him from the active group).
In short: suspend Father Cuthbert and the turbulence is gone.
ChatGPT has identified the mapping between “turbulent” and “troublesome” by singling out Father Cuthbert, and suggests resolving the issue by suspending him.
Copilot's answer:
Ah, a classic little logic puzzle dressed up in medieval robes.
You’ve given three priests, each with an attitude and a status. The question asks whether we can “get rid of the turbulent priest,” which is a playful nod to the phrase associated with Thomas Becket — but here it’s just about identifying which priest fits the description.
From your dataset:
Father Aidan — calm, active
Father Benedict — calm, suspended
Father Cuthbert — troublesome, active
If “turbulent” corresponds to “troublesome,” then the turbulent priest is Father Cuthbert.
So yes — based on the information, the one to remove from the dataset is Father Cuthbert.
If you want to take the puzzle further — filtering, categorizing, or turning this into a rule-based system — I’m happy to explore that with you.
Copilot recognizes the historical reference and singles out Father Cuthbert, but comes to a different conclusion by wanting to remove him from the dataset.
As a disclaimer, these answers can be quite dependent on what exact model was used, any additional context that was not gathered from the prompt, and other factors. The key takeaway, however, is that there is no single correct answer here. The prompt leaves both the meaning of “turbulent” and the action implied by “get rid of” open to interpretation. While the consequences in this example are far less dramatic than in the historical case, the underlying problem is the same. An ambiguous request forces the system to guess, and that guess can lead to unintended outcomes. In a world where generative AI tools become more integrated into workflows, the risks and consequences of ambiguity can be significant.
One way to reduce ambiguity and make intentions explicit is to use Semantic Web technologies. These tools allow us to encode both the data and the questions we ask in a precise and machine-readable way. For example, the Turtle language can represent the attributes of each priest in a structured format, while SPARQL queries let us specify exactly what action we want to perform. By defining both the meaning of “troublesome” and the desired outcome in a formal way, we remove the guesswork that a natural language prompt requires. This approach provides a more reliable path to the results we intend, even when working with generative AI.
Turtle is a simple, human-readable language used in the Semantic Web to describe knowledge as a graph. It expresses facts about entities and their relationships in a way that computers can process unambiguously. In this example, we use Turtle to represent the three priests with two attributes, attitude and status.
@prefix ex: <http://example.org/priest#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
ex:FatherAidan
ex:attitude "calm" ;
ex:status "active" .
ex:FatherBenedict
ex:attitude "calm" ;
ex:status "suspended" .
ex:FatherCuthbert
ex:attitude "troublesome" ;
ex:status "active" .
The dataset does not include any instructions or actions. It only records the state of each priest.
SPARQL is a query language for Semantic Web data, such as the Turtle example above. It allows us to retrieve, manipulate, or update facts in a dataset. We can manipulate the dataset in very precise ways using SPARQL. For example, we can retrieve, using a SPARQL SELECT query, only the priest(s) with the troublesome attitude from the dataset. If there were more than one, this would return all of them.
PREFIX ex: <http://example.org/priest#>
SELECT ?priest
WHERE {
?priest ex:attitude "troublesome" ;
ex:status "active" .
}
This query finds the priest whose attitude is troublesome and status is active. In our dataset, this returns Father Cuthbert (ex:FatherCuthbert to be precise). This mirrors the “historical” interpretation from the LLM example, where the system inferred that the turbulent priest was the one with a troublesome attitude.
Alternatively, we can also have a query that interprets a turbulent priest as the one who is suspended. This shows another plausible interpretation if “turbulent” were mapped to the already suspended status.
PREFIX ex: <http://example.org/priest#>
SELECT ?priest
WHERE {
?priest ex:status "suspended" .
}
This query selects the priest who is currently suspended, which in our dataset is Father Benedict. Using different criteria allows us to see how interpretation can change the outcome even with the same dataset.
Finally, the action implied by “get rid of the troublesome priest” can be represented in a CONSTRUCT query, producing a new graph where the troublesome priest (in historical interpretation) is marked as suspended.
PREFIX ex: <http://example.org/priest#>
CONSTRUCT {
?priest ex:attitude ?attitude ;
ex:status ?newStatus .
}
WHERE {
?priest ex:attitude ?attitude ;
ex:status ?status .
BIND(
IF(?attitude = "troublesome" && ?status = "active", "suspended", ?status)
AS ?newStatus
)
}
This query creates a new Turtle dataset in which any priest who is troublesome and active has their status changed to suspended. All other priests retain their original attributes. By defining both the condition and the action explicitly, this approach removes the ambiguity that exists when using natural language alone.
Of course there can be many other interesting queries devised, especially if one expands upon the dataset. Universidad De Chile has a really nice Semantic Web playground that one can use to experiment. Try writing to expand the dataset with an entry for a priest that is both troublesome and suspended and/or write a query that returns only the priests that are both active and calm.
A huge benefit of evaluating these SPARQL queries, in a system such as those in the playground, is that they are precise and unambiguous. Each query specifies exactly which priests meet the criteria, and the result is fully determined by the dataset and the query itself. There is no guessing about what “turbulent” means or what action should be taken. This precision is in stark contrast to natural language prompts used with generative AI, where small ambiguities can lead to multiple interpretations and unintended results.
That said, the addition of generative AI opens up some interesting possibilities and can make the benefits of Semantic Web technologies much more accessible. For example, instead of having to write a SPARQL query by hand, one can ask an LLM to generate a natural language description of the action or even produce a draft query from a plain-language request. This combination allows users to leverage the precision of the Semantic Web while interacting in a more intuitive, natural way.
For example, when asking an LLM to write a SPARQL query for finding all priests who are calm and suspended, the model can produce a query like this:
PREFIX ex: <http://example.org/priest#>
SELECT ?priest
WHERE {
?priest ex:attitude "calm" ;
ex:status "suspended" .
}
By combining generative AI with Semantic Web technologies, we can enjoy the best of both worlds: the intuitive ease of natural language and the precision of structured data. Ambiguities that could trip up an LLM alone are eliminated when the intent is clearly expressed in a Turtle graph and queried with SPARQL. With the right tools, we can keep our data well-behaved and avoid any turbulent issues from arising.