Ontotext GraphDB
Ontotext GraphDB is a graph database and knowledge discovery tool compliant with RDF and SPARQL.
This notebook shows how to use LLMs to provide natural language querying (NLQ to SPARQL, also called
text2sparql
) forOntotext GraphDB
.
GraphDB LLM Functionalitiesโ
GraphDB
supports some LLM integration functionalities as described here:
- magic predicates to ask an LLM for text, list or table using data from your knowledge graph (KG)
- query explanation
- result explanation, summarization, rephrasing, translation
- Indexing of KG entities in a vector database
- Supports any text embedding algorithm and vector database
- Uses the same powerful connector (indexing) language that GraphDB uses for Elastic, Solr, Lucene
- Automatic synchronization of changes in RDF data to the KG entity index
- Supports nested objects (no UI support in GraphDB version 10.5)
- Serializes KG entities to text like this (e.g. for a Wines dataset):
Franvino:
- is a RedWine.
- made from grape Merlo.
- made from grape Cabernet Franc.
- has sugar dry.
- has year 2012.
- A simple chatbot using a defined KG entity index
For this tutorial, we won't use the GraphDB LLM integration, but SPARQL
generation from NLQ. We'll use the Star Wars API
(SWAPI
) ontology and dataset that you can examine here.