Fast taxonomies with ChatGPT

Fast taxonomies with ChatGPT

SKOS Taxonomies

Rich taxonomies are the key to successfully harnessing Tridion’s Semantic Tagging and Search capabilities. But creating taxonomies can be time consuming and costly.

People use ChatGPT to write text. We can also use ChatGPT to build and visualise taxonomies. ChatGPT already knows SKOS (Simple Knowledge Organization System). For example:

Generate a taxonomy in SKOS format describing the relationship between concepts relating to Computer Hardware

ChatGPT responds with:

@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<http://example.org/ComputerHardware> a skos:ConceptScheme ;
  rdfs:label "Computer Hardware Taxonomy" .

<http://example.org/ComputerParts> a skos:Concept ;
  skos:prefLabel "Computer Parts" ;
  skos:broader <http://example.org/ComputerHardware> ;
  skos:narrower <http://example.org/InternalComponents>, <http://example.org/Peripherals> .

<http://example.org/InternalComponents> a skos:Concept ;
  skos:prefLabel "Internal Components" ;
  skos:broader <http://example.org/ComputerParts> ;
  skos:narrower <http://example.org/CPU>, <http://example.org/Motherboard>, <http://example.org/Memory>, <http://example.org/Storage> .

<http://example.org/CPU> a skos:Concept ;
  skos:prefLabel "Central Processing Unit (CPU)" ;
  skos:broader <http://example.org/InternalComponents> .

<http://example.org/Motherboard> a skos:Concept ;
  skos:prefLabel "Motherboard" ;
  skos:broader <http://example.org/InternalComponents> .

<http://example.org/Memory> a skos:Concept ;
  skos:prefLabel "Memory (RAM)" ;
  skos:broader <http://example.org/InternalComponents> .

<http://example.org/Storage> a skos:Concept ;
  skos:prefLabel "Storage (Hard Drive, SSD, etc.)" ;
  skos:broader <http

This can then be imported into Taxonomy Manger as the basis of a new taxonomy.

Visualisation

What if you want to visualise this taxonomy quickly? The trick is to teach it how to format the text. Let’s take markmap (https://markmap.js.org) – a tool used to visualise mindmaps from markdown.

We can teach ChatGPT how markmap works, and then ask it to build a taxonomy on a subject in that format:

# Markmap syntax

In markmap each level of # becomes a separate branch. Example mind mapping a birthday event.

# Birthday
## Activities
### Pass the parcel
### Trampoline
## Food
### Cake
#### Sponge
#### Eccles
### Hot Dogs

Using markdown mind map diagram language markmap make a mind map to describe the relationship between the concepts used in Car Manufacturing.

ChatGPT will come back with an HTML formatted list:

Car Manufacturing

Parts

Engine

Chassis

Transmission

Brakes

Assembly

Body

Painting

Testing

Logistics

Shipping

Inventory Management

Suppliers

Raw Materials

Component Manufacturers

We can ask ChatGPT to format it as code:

Escape the mind map as a code block

Chat GPT will give us:

# Car Manufacturing
## Parts
### Engine
### Chassis
### Transmission
### Brakes
## Assembly
### Body
### Painting
### Testing
## Logistics
### Shipping
### Inventory Management
## Suppliers
### Raw Materials
### Component Manufacturers

This mind map isn’t very extensive, so we can ask ChatGPT for more and it will provide a more comprehensive result:

Generate a longer mindmap on Car Manufacturing

This results in the following:

# Car Manufacturing
## Parts
### Engine
#### Internal Combustion Engine
#### Electric Engine
### Chassis
#### Frame
#### Suspension
### Transmission
#### Manual
#### Automatic
### Brakes
#### Disc Brakes
#### Drum Brakes
#### ABS
## Assembly
### Body
#### Stamping
#### Welding
#### Assembly
### Painting
#### Prep Work
#### Primer
#### Final Coat
### Testing
#### Quality Control
#### Performance Testing
#### Emissions Testing
## Logistics
### Shipping
#### Raw Materials
#### Parts
#### Completed Vehicles
### Inventory Management
#### Raw Materials
#### Parts
#### Completed Vehicles
## Suppliers
### Raw Materials
#### Steel
#### Aluminum
#### Rubber
### Component Manufacturers
#### Engine Suppliers
#### Brake Suppliers
#### Transmission Suppliers
## Sales
### Domestic Sales
### International Sales
## Service
### Warranty Service
### Maintenance
## Recycling
### End of Life Vehicles
### Salvage
### Parts Reuse

We can also ask ChatGPT to translate this into other languages:

Translate the concepts to Dutch

Resulting in:

# Autofabricage
## Onderdelen
### Motor
#### Interne Verbrandingsmotor
#### Elektrische Motor
### Chassis
#### Frame
#### Vering
### Transmissie
#### Handgeschakeld
#### Automatisch
### Remmen
#### Schijfremmen
#### Trommelremmen
#### ABS
## Montage
### Carrosserie
#### Stansen
#### Lassen
#### Montage
### Schilderen
#### Voorbereidend Werk
#### Primer
#### Eindlaag
### Testen
#### Kwaliteitscontrole
#### Prestatietesten
#### Emissietesten
## Logistiek
### Verzending
#### Ruwe Materialen
#### Onderdelen
#### Voltooide Voertuigen
### Voorraadbeheer
#### Ruwe Materialen
#### Onderdelen
#### Voltooide Voertuigen
## Leveranciers
### Ruwe Materialen
#### Staal
#### Aluminium
#### Rubber
### Componentenfabrikanten
#### Motorleveranciers
#### Remleveranciers
#### Transmissieleveranciers
## Verkoop
### Binnenlandse Verkoop
### Internationale Verkoop
## Service
### Garantieservice
### Onderhoud
## Recycling
### Einde Leven Voertuigen
### Berging
### Onderdelen Hergebruik

Now, that ChatGPT knows what to do, you can generate a taxonomy for a different domain like this:

Using markdown mind map diagram language markmap make a mind map to describe the relationship between concepts used in Healthcare. Generate a larger number of concepts.

Resulting in:

# Healthcare
## Patients
### Diagnosis
#### Physical Exam
#### Lab Tests
#### Imaging
### Treatment
#### Medications
#### Therapies
#### Surgery
### Monitoring
#### Vital Signs
#### Symptoms
#### Progress
## Providers
### Physicians
#### Specialists
#### Primary Care
### Nurses
### Therapists
### Technologists
## Facilities
### Hospitals
### Clinics
### Laboratories
### Imaging Centers
## Insurance
### Coverage
#### Types of Plans
#### Claims
### Reimbursement
### Regulations
## Research
### Clinical Trials
### Studies
### Data Analysis
### Drug Development
## Public Health
### Epidemiology
### Disease Prevention
### Outbreaks
### Health Promotion
## Ethics
### Confidentiality
### Informed Consent
### Resource Allocation
### End of Life Care

The output can be visualised using https://markmap.js.org/repl

We can also make it look fancy using Mermaid:

Use the following example to format the mindmap into mermaid code

# Mermaid code example for a mindmap

mindmap
  root((mindmap))
    Origins
      Long history
        ::icon(fa fa-book)
      Popularisation
        British popular psychology author Tony Buzan
    Research
      On effectiveness<br/>and features
      On Automatic creation
        Uses
          Creative techniques
          Strategic planning
          Argument mapping
    Tools
      Pen and paper
      Mermaid

Rewrite the Car Manufacturing mindmap replacing # with space, starting with mindmap and root((title) and adding icons.

Which results in:

mindmap
  root((Car Manufacturing))
    Design
      Concept
        ::icon(fa fa-lightbulb)
      Engineering
        ::icon(fa fa-cog)
      Prototyping
        ::icon(fa fa-object-group)
    Production
      Assembly
        ::icon(fa fa-industry)
      Quality Control
        ::icon(fa fa-check-circle)
      Supply Chain
        ::icon(fa fa-truck)
    Marketing
      Branding
        ::icon(fa fa-bold)
      Advertising
        ::icon(fa fa-bullhorn)
      Sales
        ::icon(fa fa-dollar-sign)
    Technology
      Automation
        ::icon(fa fa-robot)
      Electrification
        ::icon(fa fa-bolt)
      Connectivity
        ::icon(fa fa-network-wired)
    Regulations
      Safety
        ::icon(fa fa-shield-alt)
      Emissions
        ::icon(fa fa-smog)
      Fuel Efficiency
        ::icon(fa fa-gas-pump)

Paste this into https://t.co/inHUSQcenB, which will result in the following diagram:

ChatGPT can be a valuable tool in creating taxonomies for a particular industry, and for visualising them quickly in different manners. Clearly some caution needs to be applied to the results, which may not always be accurate. A Knowledge Manager should be able to audit the results and correct those that do not make sense.

Couple this with Tridion’s auto-tagging capabilities, this allows customers to quickly get started in classifying their content based on their industry.

Credit to https://twitter.com/Claybight for ChatGPT prompt inspiration.