ChatGPT and Generative AI have become, seemingly overnight, two of the hottest topics being discussed in tech circles. Some of it is hype, much akin to topics such as Big Data, Blockchain and bitcoin, data science, autonomous vehicles, and similar “explosive” technology. Still, I sense that much more of it is worry. Does generative AI herald the end of writers and writing? No, not really, though it might down the road. Artists? Eh, probably not. What about programming? Yeah, sorta kinda, maybe. Then what about startup companies? No, and yes.
If this sounds like the responses you might expect from a Magic 8 Ball, then you likely have a good idea about what the state of the IT community itself looks like right now. Generative AI has the potential to transform how people create art and writing, but, to be honest, that process usually occurs about once a generation. Tools like Stable Diffusion are great for prototyping. They can produce a lot of bad art very quickly. Still, producing good-quality artwork generally takes a fair amount of skill, very specialized (and rather expensive) equipment, and a lot of experimentation.
As with 3D animation tools, Photoshop (which has been quietly adding AI tools for decades now), and even digital art in general, there is a vocal minority that considers it not to be art – if it is not produced with a sable brush or a Crowquill nib, it’s not worthy of the name. In reality, artists will use the best tools to create art to sell because the art and animation world is highly competitive, and an individual piece of art has relatively little value in the market. As such, the need to produce reasonable quality in volume will mean that Generative Art is here to stay.
The same can be said for ChatGPT. It is certainly possible to write reasonably good articles with the tool, but that has also been true of tools such as Grammarly for some years now. The difference with Grammarly is primarily that it suggests changes but does not explicitly make them unless those changes are accepted. Both cases require intent – prompts – to discern what the user expects to get out. This typically is an iterative process as the user refines the responses with more significant details.
In this case, it is worth considering ChatGPT (and any generative AI) as something akin to a genie. The genie will grant your wish, but only if you are very precise and have in mind precisely what you need in the first place. This is often seen by people who have only made a cursory use of ChatGPT as if it is unreliable, and this is admittedly a healthy attitude to take. Still, it’s also often a very anthropocentric view. Operator errors – ambiguous statements, misinformation going into the prompts, a lack of specificity, and unrealistic expectations- will generate bad results.
Where things get interesting is in the realm of coding and semantics. Before getting into specifics, most of these samples made use of ChatGPT+ for experimentation and the DaVince OpenAI Playground for generating more complex output.
Example 1. Generating scientific (known) data as an ordered table.
This example illustrates the ability to get selected information as a table.
Prompt:
Generate the first ten elements of the periodic table, including atomic weight, atomic number, atomic symbol, density, periodic table group as instances, melting temperature, boiling temperature, orbitals, and isotopes for the first ten elements in the periodic table.
Partial Output:
Element | Atomic Weight | Atomic Number | Atomic Symbol | Density (g/cm³) | Group Symbol | Melting Point (°C) | Boiling Point (°C) | Detailed Orbitals | Isotopes (Atomic Weight) |
---|---|---|---|---|---|---|---|---|---|
Hydrogen | 1.008 | 1 | H | 0.0899 | 1A | -259.14 | -252.87 | 1s1 | 1 (1.008), 2 (2.014) |
Helium | 4.003 | 2 | He | 0.1785 | 8A | -272.2 | -268.93 | 1s2 | 3 (3.016) |
Lithium | 6.941 | 3 | Li | 0.534 | 1A | 180.54 | 1347 | [He] 2s1 | 6 (6.015), 7 (7.016) |
Beryllium | 9.012 | 4 | Be | 1.85 | 2A | 1287 | 2468 | [He] 2s2 | 9 (9.012) |
Boron | 10.81 | 5 | B | 2.46 | 3A | 2075 | 4000 | [He] 2s2 2p1 | 10 (10.012), 11 (11.009) |
Carbon | 12.01 | 6 | C | 2.267 | 4A | 3500 | 4827 | [He] 2s2 2p2 | 12 (12.000), 13 (13.003) |
Nitrogen | 14.01 | 7 | N | 1.251 | 5A | -210.01 | -195.79 | [He] 2s2 2p3 | 14 (14.003), 15 (15.000) |
Oxygen | 16.00 | 8 | O | 1.429 | 6A | -218.79 | -182.96 | [He] 2s2 2p4 | 16 (15.995), 17 (16.999), 18 (17.999) |
Fluorine | 19.00 | 9 | F | 1.696 | 7A | -219.67 | -188.11 | [He] 2s2 2p5 | 19 (18.998) |
Neon | 20.18 | 10 | Ne | 0.9 | 8A | -248.59 | -246.08 | [He] 2s2 2p6 | 20 (19.992), 21 (20.993), 22 (21.991) |
It’s worth noting that ChatGPT uses Markdown as a collapsed form of HTML if the format is not otherwise specified. By specifying “as HTML” in the prompt, you can copy and paste the output into an HTML page.
Additionally, there are usually a limited number of taken accessible in ChatGPT per request, which means that if the content is more significant than that amount (around 4000 characters), Chat will often end before everything has been published. Typing “continue” after this picks up where the stream ended. You may need to do this a few times.
The new API uses a cost-per-token approach, so may not have this limit (editorial note: it doesn’t).
Example 2. Generating scientific (known) data to a given schema.
In this example, the intent is to create RDF Turtle containing the first ten elements in the periodic table, along with detailed information at the element and it’s associated group.
Prompt:
Generate the periodic table as Turtle RDF using QUDT, including atomic weight, atomic number, atomic symbol, density, periodic table group as instances, melting temperature, boiling temperature, orbitals, and isotopes for the first ten elements in the periodic table. Use the element symbol name as the local name for each element, with the element prefix and namespace being @prefix element: <http://qudt.org/schema/qudt/Element#>. Include declarations for periodic table groups using the namespace @group element: <http://qudt.org/schema/qudt/Group#>, including the name and symbol for these groups.
Incorporate @prefix qudt: <http://qudt.org/schema/qudt#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
Partial Output:
@prefix element: <http://qudt.org/schema/qudt/Element#> .
@prefix group: <http://qudt.org/schema/qudt/Group#> .
@prefix qudt: <http://qudt.org/schema/qudt#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
element:H a qudt:Element;
qudt:atomicNumber "1"^^xsd:string;
qudt:atomicWeight "1.008"^^xsd:string;
qudt:atomicSymbol "H";
qudt:density "0.0000899"^^xsd:string;
qudt:meltingPoint "14.01"^^xsd:string;
qudt:boilingPoint "20.28"^^xsd:string;
qudt:group "1"^^xsd:string;
qudt:orbitals "1s1"^^xsd:string;
qudt:isotopes "1, 2"^^xsd:string.
# .....
element:Ne a qudt:Element;
qudt:atomicNumber "10"^^xsd:string;
qudt:atomicWeight "20.180"^^xsd:string;
qudt:atomicSymbol "Ne";
qudt:density "0.0008999"^^xsd:string;
qudt:meltingPoint "-248.59"^^xsd:string;
qudt:boilingPoint "-246.08"^^xsd:string;
qudt:group "18"^^xsd:string;
qudt:orbitals "1s2, 2s2, 2p6"^^xsd:string;
qudt:isotopes "20, 21, 22"^^xsd:string.
group:Group1 a qudt:Group;
qudt:name "Alkali metals";
qudt:symbol "1".
# ......
group:Group18 a qudt:Group;
qudt:name "Noble gases";
qudt:symbol "18".
QUDT (Quantities, Units and Data Types), is a remarkably comprehensive RDF system for encoding scientific information. Note in this case that two additional namespaces (element and group) were declared to identify specific elements and groups respectively.
The prompt is very specific, and took a few tries to make right.
Example 3. Converting a plain text report into a complex schema.
This takes a police report written in plain text and converts it into the new NIEM 5.0 RDF format in Turtle (note could be JSON-LD or XML as well).
Prompt:
Generate, for the following report, the NIEM 5.0 representation as RDF Turtle.
Case Number 45221
Reporting Officer: James Gordon
Gotham City Police Department, Gotham, Massachusetts
Suspects: Selina Kyle
Female, Latino, Age 28, Dark Hair, Slim Build, Wearing a purple bodysuit, domino mask and cat ears.
Selina Kyle may be known as Catwoman
Suspects: Harleen Quinzel
Female, White, Age 25, Blonde hair, part colored red, Slim Build, Wearing a harlequin body suit, domino mask, and wielding a large carnival hammer.
Harleen Quinzel may also be known as Harley Quinn
Victim: Bruce Wayne
Male, White, Age 32, Dark Hair, Muscular Build, Wearing gray and black body armor, cowl with bat ears, and black cape
Crime:
Theft of the Batmobile, Vehicular theft, Black exterior, Black interior, V10, 1000cc from Batcave, Wayne Manor, Gotham, Massachusetts, Feb 2, 2022.
Possible related Crime:
Case Number 45218
Reporting Officer: James Gordon
Gotham City Police Department, Gotham, Massachusetts
Crime: Theft of the Cat's Eye Gem at Gotham City Museum of Art by Catwoman, Feb 2, 2022.
Include any additional information known about the Suspects, Victims, or reporting officers.
Output:
@prefix niem-core: <http://release.niem.gov/niem/niem-core/> .
@prefix niem-fbi: <http://release.niem.gov/niem/domains/jxdm/5.0/fbi/codes/> .
@prefix niem-police: <http://release.niem.gov/niem/domains/police/4.0/> .
<http://example.org/45221> a niem-core:Case ;
niem-core:caseStatus niem-fbi:CaseStatusOpen ;
niem-core:caseTrackingID niem-core:CaseTrackingIDValue "45221" ;
niem-core:caseActivity niem-police:CaseActivityTheft ;
niem-core:caseActivityLocation niem-core:LocationValue "Batcave, Wayne Manor, Gotham, Massachusetts" ;
niem-core:caseActivityDate niem-core:DateValue "2022-02-02"^^niem-core:Date ;
niem-core:caseReportedBy niem-core:PersonRoleValue [
a niem-core:PersonRole ;
niem-core:personRoleOf niem-core:Person [
a niem-core:Person ;
niem-core:personGivenName "James" ;
niem-core:personFamilyName "Gordon" ;
niem-core:personEmploymentOrganization niem-core:OrganizationValue [
a niem-core:Organization ;
niem-core:organizationName "Gotham City Police Department" ;
niem-core:organizationLocation niem-core:LocationValue "Gotham, Massachusetts"
]
]
] ;
niem-core:caseRelatedCase niem-core:CaseValue [
a niem-core:Case ;
niem-core:caseTrackingID niem-core:CaseTrackingIDValue "45218" ;
niem-core:caseActivity niem-police:CaseActivityTheft ;
niem-core:caseActivityLocation niem-core:LocationValue "Gotham City Museum of Art" ;
niem-core:caseActivityDate niem-core:DateValue "2022-02-02"^^niem-core:Date
] ;
niem-core:caseSubject niem-core:SubjectValue [
a niem-core:Subject ;
niem-core:subjectPerson niem-core:PersonValue [
a niem-core:Person ;
niem-core:personGivenName "Bruce" ;
niem-core:personFamilyName "Wayne" ;
niem-core:personBirthDate niem-core:DateValue "1989-07-14"^^niem-core:Date ;
niem-core:personRace niem-core:RaceWhite ;
niem-core:personHairColor niem-core:HairColorDark ;
niem-core:personBodyBuild niem-core:BodyBuildMuscular ;
niem-core:personClothingItem niem-core:ClothingItemValue [
a niem-core:ClothingItem ;
niem-core:clothingItemType niem-core:ClothingItemTypeBodyArmor ;
niem-core:clothingItemColor niem-core:ColorValue [
a niem-core:Color ;
niem-core:colorPrimaryName niem-core:ColorPrimaryNameGray
] ;
niem-core:clothingItemColor niem-core:ColorValue [
a niem-core:Color ;
niem-core:colorPrimaryName niem-core:ColorPrimaryNameBlack
]
] ;
niem-core:personClothingItem niem-core:ClothingItemValue [
a niem-core:ClothingItem ;
niem-core:clothingItemType niem-core:ClothingItemTypeCowlWithBatEars
] ;
niem-core:personClothingItem niem-core:ClothingItemValue [
a niem-core:ClothingItem ;
niem-core:clothingItemType niem-core:ClothingItemTypeBlackCape
]
] ;
] ;
niem-core:caseSubject niem-core:SubjectValue [
a niem-core:Subject ;
niem-core:subjectPerson niem-core:PersonValue [
a niem-core:Person ;
niem-core:personGivenName "Selina" ;
niem-core:personFamilyName "Kyle" ;
niem-core:personBirthDate niem-core:DateValue "1993-07-14"^^niem-core:Date ;
niem-core:personRace niem-core:RaceLatino ;
niem-core:personHairColor niem-core:HairColorDark ;
niem-core:personBodyBuild niem-core:BodyBuildSlim ;
niem-core:personClothingItem niem-core:ClothingItemValue [
a niem-core:ClothingItem ;
niem-core:clothingItemType niem-core:ClothingItemTypeBodysuit ;
niem-core:clothingItemColor niem-core:ColorValue [
a niem-core:Color ;
niem-core:colorPrimaryName niem-core:ColorPrimaryNamePurple
]
] ;
niem-core:personClothingItem niem-core:ClothingItemValue [
a niem-core:ClothingItem ;
niem-core:clothingItemType niem-core:ClothingItemTypeDominoMask
] ;
niem-core:personClothingItem niem-core:ClothingItemValue [
a niem-core:ClothingItem ;
niem-core:clothingItemType niem-core:ClothingItemTypeCatEars
] ;
niem-core:personAlias niem-core:PersonAliasValue [
a niem-core:PersonAlias ;
niem-core:personAliasText "Catwoman"
]
] ;
] ;
niem-core:caseSubject niem-core:SubjectValue [
a niem-core:Subject ;
niem-core:subjectPerson niem-core:PersonValue [
a niem-core:Person ;
niem-core:personGivenName "Harleen" ;
niem-core:personFamilyName "Quinzel" ;
niem-core:personBirthDate niem-core:DateValue "1996-07-14"^^niem-core:Date ;
niem-core:personRace niem-core:RaceWhite ;
niem-core:personHairColor niem-core:HairColorBlonde ;
niem-core:personHairHighlight niem-core:HairHighlightValue [
a niem-core:HairHighlight ;
niem-core:hairHighlightColor niem-core:HairColorRed
] ;
niem-core:personBodyBuild niem-core:BodyBuildSlim ;
niem-core:personClothingItem niem-core:ClothingItemValue [
a niem-core:ClothingItem ;
niem-core:clothingItemType niem-core:ClothingItemTypeHarlequinBodysuit
] ;
niem-core:personClothingItem niem-core:ClothingItemValue [
a niem-core:ClothingItem ;
niem-core:clothingItemType niem-core:ClothingItemTypeDominoMask
] ;
niem-core:personWeapon niem-core:WeaponValue [
a niem-core:Weapon ;
niem-core:weaponType niem-core:WeaponTypeLargeCarnivalHammer
] ;
niem-core:personAlias niem-core:PersonAliasValue [
a niem-core:PersonAlias ;
niem-core:personAliasText "Harley Quinn"
]
] ;
] ;
niem-core:caseProperty niem-core:ItemValue [
a niem-core:Item ;
niem-core:itemName "Batmobile" ;
niem-core:itemDescription "V10, 1000cc" ;
niem-core:itemColor niem-core:ColorValue [
a niem-core:Color ;
niem-core:colorPrimaryName niem-core:ColorPrimaryNameBlack
] ;
niem-core:itemColor niem-core:ColorValue [
a niem-core:Color ;
niem-core:colorPrimaryName niem-core:ColorPrimaryNameBlack
]
] .
This, to me, illustrates the power of ChatGPT. NIEM, the National Information Exchange Model, is very complex. With very little in the way of semantic cues in the prompt, this generated names, and addressed what people were wearing, crime activities, aliases, and even weapons.
Example 4. Generating Information Graphics From Plain Text
This takes a police report written in plain text and converts it into the new NIEM 5.0 RDF format in Turtle (note could be JSON-LD or XML).
This was then extended with a request to generate a graph in the diagram language mermaid.js:
Prompt:
use it to generate a network diagram of the graph in Mermaid.js notation.
Output:
graph LR;
45221[Case Number 45221];
JamesGordon[Reporting Officer: James Gordon];
GCPD[Gotham City Police Department, Gotham, MA];
Selina[Suspect: Selina Kyle];
Harley[Suspect: Harleen Quinzel];
Bruce[Victim: Bruce Wayne];
VehTheft[Theft of the Batmobile];
45218[Case Number 45218];
GemTheft[Theft of the Cat's Eye Gem];
GCMA[Gotham City Museum of Art];
45221 --> JamesGordon;
45221 --> GCPD;
45221 --> Selina;
45221 --> Harley;
45221 --> Bruce;
45221 --> VehTheft;
45218 --> JamesGordon;
45218 --> GemTheft;
45218 --> GCMA;
Selina --> GemTheft;
This can be retrieved as an image URL that looks like the following:

One of the most significant aspects of this is that there is no formal ontology work here – Chat GPT was able to make inferences based upon a remarkably minimal data structure, including names, classes, and, importantly, what wasn’t relevant. This could also have incorporated hyperlinks to detailed Niem files or perhaps Wikipedia pages if retrieved as SVG.
Example 5. Getting Supplemental Information
The Chat GPT 3.5 model contains a great deal of information about, well … a lot of different things. The above characters are all from the DC Universe, and not surprisingly, there are several summaries of the characters that can be referenced either as sequential text or as data in various formats:
Prompt:
Can you give me descriptions of Selina Kyle, Bruce Wayne, Harleen Quinzel, and Commissioner James Gordon in Schema.org format Turtle?
Output:
# Selina Kyle
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://example.com/selina-kyle>
a schema:Person;
schema:name "Selina Kyle";
schema:description "Selina Kyle, also known as Catwoman, is a fictional character associated with DC Comics' Batman franchise and created by Bill Finger and Bob Kane.";
schema:sameAs <https://en.wikipedia.org/wiki/Selina_Kyle>.
# Bruce Wayne
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://example.com/bruce-wayne>
a schema:Person;
schema:name "Bruce Wayne";
schema:description "Bruce Wayne is a fictional character created by Bill Finger and Bob Kane, appearing in comic books published by DC Comics and is the secret identity of the superhero Batman.";
schema:sameAs <https://en.wikipedia.org/wiki/Bruce_Wayne>.
#H arleen Quinzel
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://example.com/harleen-quinzel>
a schema:Person;
schema:name "Harleen Quinzel";
schema:description "Harleen Quinzel, also known as Harley Quinn, is a fictional character appearing in media published by DC Comics and is a frequent accomplice and lover of the Joker.";
schema:sameAs <https://en.wikipedia.org/wiki/Harley_Quinn>.
# Commissioner James Gordon
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://example.com/james-gordon>
a schema:Person;
schema:name "James Gordon";
schema:description "Commissioner James Gordon is a fictional character appearing in media published by DC Comics, most commonly in association with Batman. The character has been featured in various media adaptations.";
schema:sameAs <https://en.wikipedia.org/wiki/James_Gordon_(comics)>.
Example 7. Entity Extraction
One of the more intriguing aspects of ChatGPT is that you can use it to do entity extraction (and content enrichment) of articles.
Prompt:
Given the following article, extract people, places, organizations, legal acts, and similar information from this content, as RDF Turtle, including links to relevant dbpedia articles.
President Biden signs executive order aimed at legal reboot of EU-US data flows Natasha Lomas@riptari / 9:19 AM PDT•October 7, 2022 Comment biden buy american electric vehicles Image Credits: Drew Angerer / Getty Images U.S. president Joe Biden has signed an executive order attached to reupping a flagship data transfer agreement with the European Union — with the goal of making life easier for businesses that need to export EU user-data to the U.S. for processing. The White House announced the development in a statement today — saying that the “Executive Order on Enhancing Safeguards for United States Signals Intelligence Activities” would “direct the steps” that the U.S. will take to implement its commitments under the EU-U.S. Data Privacy Framework (EU-U.S. DPF), as the new arrangement is being called. The new framework is intended to replace the defunct EU-U.S. Privacy Shield (which was invalidated by the bloc’s top court back in July 2020); and its much longer-lived predecessor, Safe Harbor (struck down by the CJEU in October 2015, following the 2013 disclosures of U.S. government surveillance programs by NSA whistleblower, Edward Snowden). So this is yet another (third time lucky?) attempt to bridge the gap between two very different legal frameworks in order to ensure that EU users’ personal data can keep flowing over the pond. Thousands of businesses, large and small, had relied upon earlier EU-U.S. data transfer deals to authorize their data exports — greasing the pipes of what the White House refers to as a $7.1TR EU-U.S. “economic relationship”. But for the last two years there’s essentially been no risk-free legal route. And there still isn’t. Although the EU responded to Biden signing the EO by saying it will now move to draft an adequacy decision and initiate the adoption process. (TechCrunch, https://techcrunch.com/2022/10/07/eu-us-data-privacy-framework-executive-order-signed/?guccounter=1)
Output:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix dbp: <http://dbpedia.org/property/> .
@prefix dbr: <http://dbpedia.org/resource/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://dbpedia.org/resource/Joe_Biden> a dbo:Person ;
rdfs:label "Joe Biden"@en ;
foaf:name "Joe Biden"@en ;
foaf:isPrimaryTopicOf <https://en.wikipedia.org/wiki/Joe_Biden> .
<https://en.wikipedia.org/wiki/Executive_order_(United_States)> a dbo:LegalAct ;
rdfs:label "Executive order"@en ;
foaf:isPrimaryTopicOf <https://en.wikipedia.org/wiki/Executive_order_(United_States)> .
<http://dbpedia.org/resource/European_Union–United_States_relations> a dbo:Organisation ;
rdfs:label "European Union–United States relations"@en ;
foaf:name "European Union–United States relations"@en ;
foaf:isPrimaryTopicOf <https://en.wikipedia.org/wiki/European_Union%E2%80%93United_States_relations> .
<http://dbpedia.org/resource/Privacy_Shield> a dbo:LegalAct ;
rdfs:label "Privacy Shield"@en ;
foaf:name "Privacy Shield"@en ;
foaf:isPrimaryTopicOf <https://en.wikipedia.org/wiki/Privacy_Shield> .
<http://dbpedia.org/resource/Safe_Harbor_(law)> a dbo:LegalAct ;
rdfs:label "Safe Harbor (law)"@en ;
foaf:name "Safe Harbor (law)"@en ;
foaf:isPrimaryTopicOf <https://en.wikipedia.org/wiki/Safe_Harbor_(law)> .
<http://dbpedia.org/resource/NSA_whistleblower_disclosures> a dbo:Event ;
rdfs:label "NSA whistleblower disclosures"@en ;
foaf:name "NSA whistleblower disclosures"@en ;
foaf:isPrimaryTopicOf <https://en.wikipedia.org/wiki/Global_surveillance_disclosures_(2013%E2%80%93present)> .
<http://dbpedia.org/resource/The_White_House> a dbo:Place ;
rdfs:label "The White House"@en ;
foaf:name "The White House"@en ;
foaf:isPrimaryTopicOf <https://en.wikipedia.org/wiki/White_House> .
# With much more information included.
One of the central problems with entity extraction is that you generally need extensive corpora to make it work effectively. This extraction makes use of dbpedia to provide relevant connections, making it far easier to then bind URIs within a knowledge graph with minimal processing.
Example 8. Taxonomy Construction
Taxonomies are outlines, where each level of the outline represents a narrowing of a topic. ChatGPT makes building such taxonomies simple.
Prompt:
Given an outline of the form:
Animals
Vertebrates
Mammals
Carnivores
Felines
Lions
Tigers
Panthers
Canines
Wolves
Coyotes
Ursines
Bears
Badgers
Insectivores
Primates
Apes
Chimpanzees
Humans
generate a skos taxonomy of all of the concepts in SKOS Turtle, including definitions for each concept, as well as the accepted latin name and singular name for each concept. Create a URI for each concept in the ex: namespace using a TitleCase version of the concept name as the local name.
Output:
@prefix ex: http://example.com/animals/ .
@prefix skos: http://www.w3.org/2004/02/skos/core# .
@prefix rdfs: http://www.w3.org/2000/01/rdf-schema# .
#Top Concepts
ex:Animals a skos:Concept ;
rdfs:label "Animals"@en ;
rdfs:comment "Organisms that belong to the kingdom Animalia."@en ;
skos:prefLabel "Animal"@en ;
skos:altLabel "Animals"@en ;
skos:altLabel "Kingdom Animalia"@en ;
skos:notation "ANM" .
#Vertebrates
ex:Vertebrates a skos:Concept ;
rdfs:label "Vertebrates"@en ;
rdfs:comment "Animals that have a backbone or spinal column."@en ;
skos:prefLabel "Vertebrate"@en ;
skos:altLabel "Vertebrates"@en ;
skos:notation "VRT" ;
skos:broader ex:Animals .
#Mammals
ex:Mammals a skos:Concept ;
rdfs:label "Mammals"@en ;
rdfs:comment "Warm-blooded animals that have hair or fur, produce milk for their young, and usually give birth to live offspring."@en ;
skos:prefLabel "Mammal"@en ;
skos:altLabel "Mammals"@en ;
skos:notation "MML" ;
skos:broader ex:Vertebrates .
#Carnivores
ex:Carnivores a skos:Concept ;
rdfs:label "Carnivores"@en ;
rdfs:comment "Meat-eating mammals."@en ;
skos:prefLabel "Carnivore"@en ;
skos:altLabel "Carnivores"@en ;
skos:notation "CRN" ;
skos:broader ex:Mammals .
#Felines
ex:Felines a skos:Concept ;
rdfs:label "Felines"@en ;
rdfs:comment "Carnivorous mammals of the family Felidae."@en ;
skos:prefLabel "Feline"@en ;
skos:altLabel "Felines"@en ;
skos:notation "FEL" ;
skos:broader ex:Carnivores .
#Lions
ex:Lions a skos:Concept ;
rdfs:label "Lions"@en ;
rdfs:comment "Large, carnivorous felines of the species Panthera leo."@en ;
skos:prefLabel "Lion"@en ;
skos:altLabel "Panthera leo"@en ;
skos:notation "LIO" ;
skos:broader ex:Felines .
#Tigers
ex:Tigers a skos:Concept ;
rdfs:label "Tigers"@en ;
rdfs:comment "Large, carnivorous felines of the species Panthera tigris."@en ;
skos:prefLabel "Tiger"@en ;
skos:altLabel "Panthera tigris"@en ;
skos:notation "TGR" ;
skos:broader ex:Felines .
#Panthers
ex:Panthers a skos:Concept ;
rdfs:label "Panthers"@en ;
rdfs:comment "Large, carnivorous felines of the genus Panthera that include leopards, jaguars, and panthers."@en ;
skos:prefLabel "Panther"@en ;
skos:altLabel "Panthers"@en ;
skos:notation "PAN" ;
skos:broader ex:Felines .
#Canines
ex:Canines a skos:Concept ;
rdfs:label "Canines"@en ;
rdfs:comment "Carnivorous mammals of the family Canidae."@en ;
skos:prefLabel "Canine"@en ;
skos:altLabel "Canines"@en ;
skos:notation "CAN" ;
skos:broader ex:Carnivores .
#Wolves
ex:Wolves a skos:Concept ;
rdfs:label "Wolves"@en ;
rdfs:comment "Large, carnivorous canids of the genus Canis."@en ;
skos:prefLabel "Wolf"@en ;
skos:altLabel "Canis lupus"@en ;
skos:notation "WLF" ;
skos:broader ex:Canines .
#Coyotes
ex:Coyotes a skos:Concept ;
rdfs:label "Coyotes"@en ;
rdfs:comment "Small, carnivorous canids of the genus Canis."@en ;
skos:prefLabel "Coyote"@en ;
skos:altLabel "Canis latrans"@en ;
skos:notation "COY" ;
skos:broader ex:Canines .
#Ursines
ex:Ursines a skos:Concept ;
rdfs:label "Ursines"@en ;
rdfs:comment "Mammals of the family Ursidae that include bears, pandas, and koalas."@en ;
skos:prefLabel "Ursine"@en ;
skos:altLabel "Ursines"@en ;
skos:notation "URN" ;
skos:broader ex:Mammals .
#Bears
ex:Bears a skos:Concept ;
rdfs:label "Bears"@en ;
rdfs:comment "Large, carnivorous ursids of the subfamily Ursinae."@en ;
skos:prefLabel "Bear"@en ;
skos:altLabel "Ursinae"@en ;
skos:notation "BER" ;
skos:broader ex:Ursines .
#Badgers
ex:Badgers a skos:Concept ;
rdfs:label "Badgers"@en ;
rdfs:comment "Carnivorous ursids of the genus Meles."@en ;
skos:prefLabel "Badger"@en ;
skos:altLabel "Meles"@en ;
skos:notation "BDG" ;
skos:broader ex:Ursines .
#Insectivores
ex:Insectivores a skos:Concept ;
rdfs:label "Insectivores"@en ;
rdfs:comment "Mammals that primarily eat insects."@en ;
skos:prefLabel "Insectivore"@en ;
skos:altLabel "Insectivores"@en ;
skos:notation "INS" ;
skos:broader ex:Mammals ;
skos:broader ex:Vertebrates ;
skos:broader ex:Animals .
#Primates
ex:Primates a skos:Concept ;
rdfs:label "Primates"@en ;
rdfs:comment "Mammals that include lemurs, monkeys, and apes."@en ;
skos:prefLabel "Primate"@en ;
skos:altLabel "Primates"@en ;
skos:notation "PRT" ;
skos:broader ex:Mammals ;
skos:broader ex:Vertebrates ;
skos:broader ex:Animals .
#Apes
ex:Apes a skos:Concept ;
rdfs:label "Apes"@en ;
rdfs:comment "Primates that lack a tail and have larger brains than other primates."@en ;
skos:prefLabel "Ape"@en ;
skos:altLabel "Apes"@en ;
skos:notation "APE" ;
skos:broader ex:Primates .
#Chimpanzees
ex:Chimpanzees a skos:Concept ;
rdfs:label "Chimpanzees"@en ;
rdfs:comment "Great apes of the genus Pan."@en ;
skos:prefLabel "Chimpanzee"@en ;
skos:altLabel "Pan troglodytes"@en ;
skos:notation "CHP" ;
skos:broader ex:Apes .
#Humans
ex:Humans a skos:Concept ;
rdfs:label "Humans"@en ;
rdfs:comment "Homo sapiens, the only extant species of the genus Homo."@en ;
skos:prefLabel "Human"@en ;
skos:altLabel "Homo sapiens"@en ;
skos:notation "HUM" ;
skos:broader ex:Primates .
This is actually an extraordinary capability, as the system inferred that an outline could be mapped to a SKOS ontology, and that this ontology, while able to reference summary terms, is NOT a standard Linnaean taxonomy. One this is generated, you can even ask questions of it, as this dialog illustrates:
call this set of concepts myTaxonomy.
Sure, the set of concepts you have created can be called myTaxonomy.
How many concepts are in myTaxonomy?
There are 16 concepts in myTaxonomy.
What is the sixth concept in myTaxonomy?
The sixth concept in myTaxonomy is ex:Felines, which represents "Carnivorous mammals of the family Felidae."
What is the eight concept in my Taxonomy?
The eighth concept in myTaxonomy is ex:Canines, which represents "Carnivorous mammals of the family Canidae."
what ancestors do the sixth and eighth concepts in myTaxonomy have in common?
The sixth concept in myTaxonomy, ex:Felines, and the eighth concept in myTaxonomy, ex:Canines, have a common ancestor in the fourth concept, ex:Carnivores, which represents "Meat-eating mammals."
create a list from myTaxonomy in alphabetical order.
ex:Animals
ex:Apes
ex:Bears
ex:Badgers
ex:Canines
ex:Chimpanzees
ex:Carnivores
ex:Coyotes
ex:Felines
ex:Humans
ex:Insectivores
ex:Lions
ex:Mammals
ex:Panthers
ex:Primates
ex:Tigers
ex:Ursines
This capability is due to the fact that ChatGPT actually maintains a local context based upon what is previously asked, can have results saved under specific names, and can do at least very basic reasoning on these datasets within the local context. It is this memory that makes ChatGPT more than simply a mechanism for parotting information.
Note also the creation of a temporary variable called “MyTaxonomy” that could be referenced in later parts of the conversation, as well as the ability to retrieve a list as a series and grab to items from that list without having to call for the construction of that list explicitly. This ability to store and manipulate data sets is intriguing, and opens up the potential to a number of other operations, including comparisons of data sets, filtering, and iterations.
Example 9. Rudimentary Reasoning
There was one more query that I tried.
Prompt:
List every animal (leaf node in the myTaxonomy) that isn't a panther.
>>>>
Sure, here are all the animal concepts in myTaxonomy that are not panthers:
ex:Lions
ex:Tigers
ex:Bears
ex:Badgers
ex:Wolves
ex:Coyotes
ex:Panthera tigris
ex:Panthera leo
ex:Canis lupus
ex:Canis latrans
ex:Ursines
ex:Pandas
ex:Koalas
ex:Felines
ex:Lynx
ex:Ocelots
ex:Cheetahs
ex:Domestic cats
ex:Bobcats
ex:Jaguars
ex:Leopards
ex:Snow leopards
ex:Gorillas
ex:Baboons
ex:Mandrills
ex:Orangutans
ex:Gibbons
ex:Marmosets
ex:Tarsiers
ex:Lemurs
ex:Monkeys
ex:Humans
Note that some of these animals are not in the same category as panthers (e.g., primates, insectivores), but they are still leaf nodes in the myTaxonomy and therefore considered animals.
This is a non-trivial query – it identified the panther concept, added in many examples of animals that were not originally listed but that also fall into the various other groups (Insectivores, Carnivores), determined relevant leaf nodes, then excluded panthers from this list. It made a goof (it includes Felines and Ursines) but that was because I made a mistake in setting up the original outline. In other words, operator error caused an error in behavior.
Put another way, you could make the argument that ChatGPT is capable of reasoning. Let that sink in for a bit. Reasoning is not that hard to manage, and you can argue that the reasoning on a graph is not that hard to achieve because it involves the application of known set theoretic rules, but this is also the domain that differentiates knowledge graphs from relational or even noSQL databases.
What’s more, ChatGPT is still very much evolving. The ChatGPT 3.5 API has just been released to a limited audience, and GPT 4 is waiting in the wings. Vector Graph embeddings (which underlies much of this technology in ChatGPT) are becoming more sophisticated.
How ChatGPT will impact knowledge graphs
Knowledge graphs have an advantage (for now) because the core model is still primarily read-write – you can change state within sessions. Still, such state changes do not reflect on the underlying model because building that model is expensive. I expect that this state of affairs will not hold for much longer. The most likely business model to emerge will be one where the base model is licensed, with companies then being given the option to update the fork of the model dynamically (likely with a reinforcement process). At that point, the impact on the databasConclude industry will be profound.
There are several key features of transformational models such as ChatGPT that I believe point to the future of knowledge graphs:
- Queries will shift from SQL or SPARQL or GraphQL to natural language prompts because most people do not like to work with formal graph query languages. Inserting ChatGPT into the process to generate intermediate query language code (such as the prompt “Generate a SPARQL script that will retrieve a summary of victims and their properties from a NIEM RDF database.”) could go at least part of the way towards making this happen, using known schemas to drive the most likely queries.
- Conversational models serve as proxies for pipelines and workflows. I make a query and get a response, which I can then name. Taking that response, I can then ask for a transformation of the content into other forms, from JSON or XML code to spreadsheets, word documents, summaries, and diagrams. This essentially bypasses the ontologists or programmers at the potential loss of precision or detail.
- One of the more significant use cases is summarization – the ability to take a set of assertions and assemble them into a concise summary. This is not an easy task; humans are notoriously bad at summarization, and with the amount of information being generated daily worldwide, the ability to capture a short, meaningful summary has been on content managers’ wish lists for a long, long time.
- Most people should never need to know the structure of data internally. It’s easily surface-able if you do want it, but the reality is that in most cases, people are used to their data being stochastic in nature and synthesizable in practice.
- To that end, provenance does matter, but less so to some than others. Suppose a knowledge graph can produce an analysis with appropriate footnotes indicating the source. In that case, it will go a long way in assuring users of the reliability of the information so produced.
- Context is essential, as is the ability to store intermediate state temporarily.
- Finally, and most importantly, the knowledge graph needs to be able to learn from its inputs. Any information provided should be cached, evaluated based on reliability criteria, and then rolled into the model.
This is a bittersweet realization as someone who has been involved in RDF and semantics for decades. I had a mentor several years ago who told me the following story: He had met with a friend of his, a restauranteur, and, like anyone involved in sales and consulting, my mentor asked his friend what he wanted out of a database. The business owner thought for a bit and said, “Well, I want to ask this machine how well my business is doing and have it give me a meaningful answer so that I could run my business better. I don’t want to rely upon a team of developers to assemble dashboards; I don’t want to hire a team of data scientists to give me a set of probabilities. I just want an answer – do I invest more money?”
I think RDF knowledge graphs are an excellent intermediate solution today. Still, they are an interim one at best, primarily because such knowledge graphs can likely adapt more readily to the kind of solution that ChatGPT will eventually provide regarding learning from its environment and maintaining provenance information than any other form of data.
ChatGPT is still too unpredictable, too centralized, and too opaque for businesses to feel comfortable investing heavily there. However, that is changing. It’s not hard to see companies licensing existing models and then augmenting those models with relevant corporate information. Best practices will emerge for handling things like federation, where models talk to other models to synthesize information (ChatGPT currently is not exposed to the Internet, though if experiments with Bing are any indication, that may not necessarily be advisable anyway).
In many respects, it is clear that transformational large language models are the next iteration of knowledge graphs. Increasingly the role of existing knowledge graph-oriented companies should be to inform the next generation (of products and companies) about the power and pitfalls of knowledge management, champion good governance models and principles of data stewardship, and establish a bridge between existing data systems and what is emerging. I do not see knowledge graphs going away soon – they are well-positioned to maintain private ontologies and taxonomies. Still, their role is to highlight established canonical language, which most machine language systems struggle with, and then use that position to help train the LLM systems.
3 thoughts on “Nine ChatGPT Tricks for Knowledge Graph Workers”
You must log in to post a comment.