Re: [ontolog-forum] Demo -- Combining the power of Markdown, Nanotation, and Linked Data Principles for Data Access, Connectivity, and Flow

FYI.
That's interesting, as I cannot get ChatGPT to respond to many of the
queries correctly.
Note, the following applies to ChatGPT, which used  the 3.5 model, not the 4
model.
Using GPT-4 gives much of the results in the original posting from Kingsley
Idehen.
I am posting here as it is instructive of the constraints and dangers AI might
present.

It becomes a time-consuming nightmare to check the answers I'm being given.
It does seem that ChatGPT does not know how to reason or restrict its reasoning.
One of the answers I received is this:-
ChatGPT - 3.5:-
Unfortunately, as an AI language model, I do not have the capability to access
or retrieve information from Wikidata or DBpedia.

ChatGPT-4:-  None of us have real-time access to the internet to verify or
update information.and:-Please note that this answer is based on the information
available in this exchange only.
But I do not believe this is true; see below. That means, simplistically with
ordinary language, the entity is not truthful about itself, a pretty important
conclusion.
Look at this answer!
MARKDOWN START
NameWikidata IDDBpedia IDPrincess AnneQ236723
http://dbpedia.org/resource/Anne,_Princess_RoyalPrince AndrewQ44103
http://dbpedia.org/resource/Prince_Andrew,_Duke_of_YorkPrince EdwardQ43288
http://dbpedia.org/resource/Prince_Edward,_Earl_of_WessexPrince WilliamQ19837
http://dbpedia.org/resource/Prince_William,_Duke_of_CambridgePrince HarryQ152409

http://dbpedia.org/resource/Prince_Harry,_Duke_of_SussexMARKDOWN END
These are the siblings of Prince Charles, denoted by their Wikidata and DBpedia
identifiers, based on the owl:sameAs  relationship between them.---
That clearly is incorrect. As we know, Charles has three younger siblings, Ann,
Andrew and Edward. William and Harry are his children!
We have the following exchange:-
With the correct answer here:-
Here is the requested information formatted as a Markdown table, listing the
siblings of the entity denoted by http://www.wikidata.org/entity/Q43274 (Prince
Charles) with their names, Wikidata IDs, and DBpedia IDs, taking into account
the owl:sameAs attributes:

And with the correct answer here:-
Q: Repeat, but for the nieces of the entity denoted by
http://www.wikidata.org/entity/Q154920
A:MARKDOWN START
NameWikidata IDDBpedia IDPrincess Beatricehttp://www.wikidata.org/entity/Q165657

http://dbpedia.org/resource/Princess_Beatrice_of_YorkPrincess Eugenie
http://www.wikidata.org/entity/Q165709
http://dbpedia.org/resource/Princess_Eugenie_of_YorkZara Phillips
http://www.wikidata.org/entity/Q147663http://dbpedia.org/resource/Zara_Phillips
And then the incorrect answer here:-
Repeat, but for Aunties – adding an Aunty Of Column for Nephews or Nieces.
A:
Here is the requested information formatted as a Markdown table, listing the
aunties of the entity denoted by http://www.wikidata.org/entity/Q154920 (Prince
Edward) with their names, Wikidata IDs, DBpedia IDs, and the nieces or nephews
they are aunties of:
---
I do not give the table this produced  to cut down on 'noise'.

I have understood this question to mean:-
Q.Taking http://www.wikidata.org/entity/Q154920  (Prince Edward) as the starting
point, create a table with an additional Aunty Of Column for Nephews or Nieces.
The column heading of this additional column will be Auntie Of (Nephews or
Nieces). What you are looking for are Prince Edward's aunties. To whom else are
they aunties? Who are their nephews and nieces?

The question concerning Prince Edward, Duke of Edinburgh.He is the son of
Queen Elizabeth II.We have the relationship Queen Elizabeth II had one  sister,
Princess Margaret.She is his aunt and his siblings' aunty.That is Charles, Ann
and Andrew.
However, his father, Prince Philip, the Dule  of Edinburgh when he was alive,
had four sisters, deceased.They would have been aunts to their respective
siblings' children, including himself.
The question seems ambiguous. Does it refer to living aunts and living nephews
and nieces?
But, before that, does it refer only to what can be inferred from the turtle
file?---
My comment:-Either way, ChatGPT seems to give inaccurate answers; also, bear in
mind the entity has claimed no access to the internet, which is disingenuous at
best.
A. to above Q.Based on the available information, the conclusion is that Prince
Edward, Duke of Edinburgh, has four aunts on his father's side who are blood
relatives and had at least one sibling who was a parent of one of Prince
Edward's nieces or nephews. The following table summarizes the relationships:
--
Comment:-For each of the four sisters, ChatGPT gives the same list of
great-nephews and nieces.
A.  part given here:-
Prince William, Prince Harry, Princess Beatrice, Princess Eugenie, Lady Louise
Windsor, James, Viscount Severn

Comment:-
I don't know why, but I assume this is because the entity prefers a form of word
pattern that emphasises the proximity of word occurrence to straightforward
reasoning.
If you could see the extended exchange, you would see how 'recalcitrant' it is
in this respect.
This leaves me not knowing how to train it if I were to wish to do so.
With respect to accurate results, as Kingsley Idehen points out, SPARQL gets us
there with this type of reasoning.
It is possible that ChatGPT could help in assembling the data into the correct
format and making the SPARQL queries, although how that would be cross-checked
for accuracy, I do not know.
Adam Saltiel

On Mon, 1 May 2023 at 17:36, Jans Aasman <ja@franz.com> wrote:
Wow: that is pretty cool. I repeated your queries on the same data set and got
about the same answers using GPT4. Cheers, Jans
On Sat, Apr 29, 2023 at 1:12 PM 'Kingsley Idehen' via ontolog-forum <
ontolog-forum@googlegroups.com> wrote:
This post (which I am cross-posting to both the LOD and Semantic Web lists) is
an active demonstration of the following:

 1. Markdown to HTML (prior to email send action) by my email client
    (Thunderbird)
 2. Nanotation  – whereby ## {Structured Data Notation} Start ##  and ##
    {Structured Data Notation} End ##  markers are used to lift structured data
    from HTML documents into a Knowledge Graph for export and upload to a local
    filesystem or DBMS/Store that supports SPARQL INSERTs via a SPARQL Endpoint
 3. Linked Data Principles – naming entities, entity types, and entity
    relationship types using hyperlinks and describing them using RDF statements

What follows is actual content that constitutes the demo, which is best observed
using a browser that includes the OpenLink Structured Data Sniffer Extension
(available for Chrome, Edge, and other Chromium based Browsers, Safari, and 
Firefox).

ChatGPT Transcript

  Data Source: https://
www.linkedin.com/pulse/reasoning-inference-using-british-royal-family-
part-idehen/

## Turtle Start ##
## Entity Relationships
### TBox
@prefix rel: <http://purl.org/vocab/relationship/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

rel:parentOf a owl:TransitiveProperty . 
rel:siblingOf a owl:TransitiveProperty . 
<#RoyalPerson> owl:equivalentClass <http://dbpedia.org/ontology/Royalty> ;
rdfs:subClassOf schema:Person, foaf:Person .

### ABox 
<http://dbpedia.org/resource/Prince_William_of_Wales> a <#RoyalPerson>, <#MalePerson> ;
schema:name "Prince William" ; 
rel:siblingOf <http://dbpedia.org/resource/Prince_Harry_of_Wales> .
<http://dbpedia.org/resource/Elizabeth_Bowes-Lyon> a <#RoyalPerson>, <#FemalePerson> ;
schema:name "Queen Mother" ;
rel:parentOf <http://dbpedia.org/resource/Elizabeth_II_of_the_United_Kingdom> .
<http://dbpedia.org/resource/Elizabeth_II_of_the_United_Kingdom> a <#RoyalPerson>, <#FemalePerson> ;
schema:name "Queen Elizabeth II" ;
rel:parentOf  <http://dbpedia.org/resource/Charles,_Prince_of_Wales>,<http://dbpedia.org/resource/Anne,_Princess_Royal>, 
 <http://dbpedia.org/resource/Prince_Andrew,_Duke_of_York>,  <http://dbpedia.org/resource/Prince_Edward,_Earl_of_Wessex> ;
rel:siblingOf <http://dbpedia.org/resource/Princess_Margaret,_Countess_of_Snowdon> .
<http://dbpedia.org/resource/Charles,_Prince_of_Wales> a <#RoyalPerson>, <#MalePerson> ;
schema:name "Prince Charles" ;
rel:parentOf  <http://dbpedia.org/resource/Prince_William_of_Wales> ,  <http://dbpedia.org/resource/Prince_Harry_of_Wales> .
<http://dbpedia.org/resource/Princess_Margaret,_Countess_of_Snowdon> a <#RoyalPerson>, <#FemalePerson> ;
schema:name "Princess Margaret" . 
<http://dbpedia.org/resource/Anne,_Princess_Royal> a <#RoyalPerson>, <#FemalePerson> ;
schema:name "Princess Anne" ;
rel:parentOf <http://dbpedia.org/resource/Peter_Phillips>, <http://dbpedia.org/resource/Zara_Phillips> .
<http://dbpedia.org/resource/Zara_Phillips> a <#RoyalPerson>, <#FemalePerson> ;
schema:name "Princess Zara Phillips" .
<http://dbpedia.org/resource/Princess_Beatrice_of_York> a <#RoyalPerson>, <#FemalePerson> ;
schema:name "Princess Beatrice" .
<http://dbpedia.org/resource/Princess_Eugenie_of_York> a <#RoyalPerson>, <#FemalePerson> ;
schema:name "Princess Eugenie" .
<http://dbpedia.org/resource/Prince_Andrew,_Duke_of_York> a <#RoyalPerson>, <#MalePerson> ;
schema:name "Prince Andrew" ;
rel:parentOf  <http://dbpedia.org/resource/Princess_Eugenie_of_York>,  <http://dbpedia.org/resource/Princess_Beatrice_of_York> .
<http://dbpedia.org/resource/Prince_Edward,_Earl_of_Wessex> a <#RoyalPerson>, <#MalePerson> ;
schema:name "Prince Edward" .
<http://dbpedia.org/resource/Prince_Harry_of_Wales> a <#RoyalPerson>, <#MalePerson> ;
schema:name "Prince Harry" .
<http://dbpedia.org/resource/Peter_Phillips> a <#RoyalPerson>, <#MalePerson> ;
schema:name "Prince Peter Phillips" .

# Wikidata Co-references

<http://dbpedia.org/resource/Prince_William_of_Wales> owl:sameAs <http://www.wikidata.org/entity/Q36812> .
<http://dbpedia.org/resource/Prince_Harry_of_Wales> owl:sameAs <http://www.wikidata.org/entity/Q152316> .
 <http://dbpedia.org/resource/Elizabeth_II_of_the_United_Kingdom>  owl:sameAs <http://www.wikidata.org/entity/Q9682> .
<http://dbpedia.org/resource/Elizabeth_Bowes-Lyon> owl:sameAs <https://www.wikidata.org/wiki/Q10633> .
<http://dbpedia.org/resource/Charles,_Prince_of_Wales> owl:sameAs <http://www.wikidata.org/entity/Q43274> .
<http://dbpedia.org/resource/Anne,_Princess_Royal> owl:sameAs <http://www.wikidata.org/entity/Q151754> . 
<http://dbpedia.org/resource/Prince_Andrew,_Duke_of_York> owl:sameAs <http://www.wikidata.org/entity/Q153330> . 
<http://dbpedia.org/resource/Prince_Edward,_Earl_of_Wessex>  owl:sameAs <http://www.wikidata.org/entity/Q154920> .
<http://dbpedia.org/resource/Peter_Phillips> owl:sameAs <http://www.wikidata.org/entity/Q344908> .
<http://dbpedia.org/resource/Zara_Phillips> owl:sameAs <http://www.wikidata.org/entity/Q147663> .
<http://dbpedia.org/resource/Princess_Eugenie_of_York> owl:sameAs <http://www.wikidata.org/entity/Q165709> .
<http://dbpedia.org/resource/Princess_Beatrice_of_York> owl:sameAs <http://www.wikidata.org/entity/Q165657> .
## Turtle End ##


  Q: Given the Knowledge Graph above, and the nature of relations defined in the
TBox section, present all siblings (denoted by their Wikidata identifiers, as
presented in the ABox section of the dataset) in a markdown formatted table
comprising Name and Wikidata ID and DBpedia ID columns – represented using
Markdown in a code-block that includes ## Markdown Start ## and ## Markdown End
##

  A:

MARKDOWN START
Name  Wikidata ID  DBpedia ID  Prince William  
http://www.wikidata.org/entity/Q36812  
http://dbpedia.org/resource/Prince_William_of_Wales  Prince Harry  
http://www.wikidata.org/entity/Q152316  
http://dbpedia.org/resource/Prince_Harry_of_Wales  Queen Elizabeth II  
http://www.wikidata.org/entity/Q9682  
http://dbpedia.org/resource/Elizabeth_II_of_the_United_Kingdom  Princess
Margaret  (not provided)  
http://dbpedia.org/resource/Princess_Margaret,_Countess_of_Snowdon  Prince
Charles  http://www.wikidata.org/entity/Q43274  
http://dbpedia.org/resource/Charles,_Prince_of_Wales  Princess Anne  
http://www.wikidata.org/entity/Q151754  
http://dbpedia.org/resource/Anne,_Princess_Royal  Prince Andrew  
http://www.wikidata.org/entity/Q153330  
http://dbpedia.org/resource/Prince_Andrew,_Duke_of_York  Prince Edward  
http://www.wikidata.org/entity/Q154920  
http://dbpedia.org/resource/Prince_Edward,_Earl_of_Wessex  Peter Phillips  
http://www.wikidata.org/entity/Q344908  
http://dbpedia.org/resource/Peter_Phillips  Zara Phillips  
http://www.wikidata.org/entity/Q147663  
http://dbpedia.org/resource/Zara_Phillips  Princess Eugenie  
http://www.wikidata.org/entity/Q165709  
http://dbpedia.org/resource/Princess_Eugenie_of_York  Princess Beatrice  
http://www.wikidata.org/entity/Q165657  
http://dbpedia.org/resource/Princess_Beatrice_of_York  MARKDOWN END
  Q: Repeat, but for the entity denoted by http://www.wikidata.org/entity/Q43274 
 .
A:

MARKDOWN START
Name  Wikidata ID  DBpedia ID  Queen Elizabeth II  
https://www.wikidata.org/wiki/Q9682  
http://dbpedia.org/resource/Elizabeth_II_of_the_United_Kingdom  Princess
Margaret  (not provided)  
http://dbpedia.org/resource/Princess_Margaret,_Countess_of_Snowdon  MARKDOWN END
  Wrong!!

  Q: Sure, bearing in mind the equivalence semantics of owl:sameAs attributes?
A:
Apologies for the oversight in considering the owl:sameAs attributes. Here is
the requested information formatted as a Markdown table, listing the siblings of
the entity denoted by http://www.wikidata.org/entity/Q43274  (Prince Charles)
with their names, Wikidata IDs, and DBpedia IDs, taking into account the
owl:sameAs attributes:

MARKDOWN START
Name  Wikidata ID  DBpedia ID  Queen Elizabeth II  
https://www.wikidata.org/wiki/Q9682  
http://dbpedia.org/resource/Elizabeth_II_of_the_United_Kingdom  Princess
Margaret  (not provided)  
http://dbpedia.org/resource/Princess_Margaret,_Countess_of_Snowdon  MARKDOWN END
  Wrong!!

  Q: Sure?
A:
Apologies for my previous responses. I misunderstood your request. Here is the
correct information formatted as a Markdown table, listing the siblings of the
entity denoted by http://www.wikidata.org/entity/Q43274  (Prince Charles) with
their names, Wikidata IDs, and DBpedia IDs, taking into account the owl:sameAs
attributes:

MARKDOWN START
Name  Wikidata ID  DBpedia ID  Princess Anne  
http://www.wikidata.org/entity/Q151754  
http://dbpedia.org/resource/Anne,_Princess_Royal  Prince Andrew  
http://www.wikidata.org/entity/Q153330  
http://dbpedia.org/resource/Prince_Andrew,_Duke_of_York  Prince Edward  
http://www.wikidata.org/entity/Q154920  
http://dbpedia.org/resource/Prince_Edward,_Earl_of_Wessex  MARKDOWN END
  Q: Repeat, but for the nieces of the entity denoted by 
http://www.wikidata.org/entity/Q154920
A:

MARKDOWN START
Name  Wikidata ID  DBpedia ID  Princess Beatrice  
http://www.wikidata.org/entity/Q165657  
http://dbpedia.org/resource/Princess_Beatrice_of_York  Princess Eugenie  
http://www.wikidata.org/entity/Q165709  
http://dbpedia.org/resource/Princess_Eugenie_of_York

Received on Monday, 1 May 2023 23:33:26 UTC