| --- |
| license: cc-by-4.0 |
| language: |
| - en |
| tags: |
| - knowledge-graph |
| - rdf |
| - n-triples |
| - parquet |
| - llm-generated |
| pretty_name: GPTKB v2 |
| size_categories: |
| - 10M<n<100M |
| --- |
| |
| # GPTKB v2 |
|
|
| Browse, query or ask the full knowledge base at |
| **[gptkb.org](https://gptkb.org/)**. |
|
|
| Two artifact lines, one knowledge base (snapshot `gpt51_270226`, |
| 38,450,135 source facts): |
|
|
| | File | What it is | |
| | --- | --- | |
| | `gptkb_v2.0.1_rdf.nt.gz` | **Simplified RDF export. Use this one.** | |
| | `gptkb_v2.0.1_full_record/` | **The full six-term record**, as Parquet. | |
| | `gptkb_v2.0_rdf.nt.gz` | Superseded interim RDF export, kept for citability. | |
|
|
| ## Simplified RDF export (`gptkb_v2.0.1_rdf.nt.gz`) |
|
|
| | | | |
| | --- | --- | |
| | Format | N-Triples, gzipped (425 MB; 4.1 GB uncompressed) | |
| | Size | 42,327,043 lines → **41,511,580 distinct triples** once loaded | |
| | sha256 | `202d9e32f28548ae661b3f8cf9db83411fe18a063702f9c98df4b553d750e801` | |
| | License | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) | |
|
|
| The graph served by the SPARQL endpoint at |
| [gptkb.org/query](https://gptkb.org/query/). Entities, predicates and |
| concepts are ID-based IRIs: |
|
|
| ``` |
| <https://gptkb.org/entity/E0> a person, place, work, … |
| <https://gptkb.org/prop/P0> a predicate |
| <https://gptkb.org/concept/C0> a class |
| ``` |
|
|
| The vocabulary is deliberately three predicates and no more: |
|
|
| | Predicate | Meaning | |
| | --- | --- | |
| | `<https://gptkb.org/prop/P…>` | a disambiguated fact | |
| | `rdfs:label` | the canonical name of an entity, predicate or concept | |
| | `skos:altLabel` | **every surface form** observed for an entity | |
|
|
| Literals are plain RDF strings; typed literals (`xsd:date`, |
| `xsd:integer`) are deferred. Concepts carry no `rdfs:subClassOf`: the |
| source has no hierarchy to export. |
|
|
| **v2.0.1 vs the interim v2.0 file.** Same knowledge base, same |
| snapshot: the difference is how much of it the pipeline had |
| disambiguated at export time. The interim file was cut when roughly |
| half of the named-entity objects had been resolved to entity IDs; |
| facts whose object was still unresolved could mint no IRI and were |
| skipped. This re-export was cut after the disambiguation pipeline |
| completed: about one million further entities exist in the catalog, |
| named-entity coverage is ~99.8%, and only 62,600 of the 38,450,135 |
| source facts remain unexportable. Concretely: the loaded graph grows |
| from 32.8M to 41.5M triples, and `E14` (United States of America) now |
| carries 168 `skos:altLabel` surface forms where the interim file had |
| 127. |
|
|
| ### Loading |
|
|
| ```bash |
| # Virtuoso, QLever, Jena, rdflib: anything that reads N-Triples |
| gunzip -c gptkb_v2.0.1_rdf.nt.gz | head |
| ``` |
|
|
| Load into a named graph of `<https://gptkb.org/gptkb>` to match the |
| IRIs the file already carries. |
|
|
| ## The full record (`gptkb_v2.0.1_full_record/`) |
| |
| A fact in GPTKB v2 has **six** terms, not three: alongside the |
| disambiguated subject, predicate and object, it records the *wording* |
| each was stated with, and the provenance of how that wording was |
| resolved. A triple has nowhere to put either. In the RDF export, |
| `<E0> <P0> <C0>` appears five times because five differently worded |
| facts about Vannevar Bush resolve to it, and RDF set semantics keep |
| one. That collapse is the entire difference between the `.nt` file's |
| 42,327,043 lines and the 41,511,580 triples a store loads from it. |
| |
| This directory is the release the RDF export cannot be: the relational |
| tables themselves, streamed to Parquet (zstd) with every surface form, |
| pipeline status and batch id intact. |
| |
| | Table | Rows | Contents | |
| | --- | --- | --- | |
| | `triples-0000*.parquet` (8 shards) | 38,450,135 | one row per fact: ids **and** surface labels for subject/predicate/object, object type + statuses, `object_description`, the 7 pipeline batch ids, `created_at` | |
| | `instance_triples.parquet` | 2,528,556 | the instanceOf specialization (entity → concept, + CD/CDG batch ids) | |
| | `entities.parquet` | 2,297,995 | entity catalog: id, canonical label, description, status, provenance | |
| | `predicates.parquet` | 207,633 | predicate catalog | |
| | `concepts.parquet` | 66,523 | concept catalog | |
| | `batches.parquet` | 123,444 | the provenance containers the batch-id columns point into | |
| | `manifest.json` | — | row counts, shard list, source snapshot | |
|
|
| Surface-form variation is preserved as distinct rows: "John Smith, |
| bornIn, NYC" and "Jane Smith, bornIn, Big Apple" are two rows even |
| when both objects resolve to the same `E…` id. The wording is the |
| disambiguation evidence, and it is the point of the project. |
|
|
| ### Loading |
|
|
| ```python |
| import duckdb |
| con = duckdb.connect() |
| con.sql("SELECT subject_label, predicate_label, object_label, object_id " |
| "FROM 'gptkb_v2.0.1_full_record/triples-*.parquet' " |
| "WHERE object_id = 'E14' LIMIT 10") |
| ``` |
|
|
| ```python |
| import pandas as pd |
| entities = pd.read_parquet("gptkb_v2.0.1_full_record/entities.parquet") |
| ``` |
|
|
| All columns are nullable strings, faithful to the source; `created_at` |
| is the raw pipeline timestamp text. |
|
|
| ## Earlier versions |
|
|
| The v1 line is archived separately and stays downloadable permanently: |
| [GPTKB_v1.5](https://huggingface.co/datasets/Knowledge-aware-AI/GPTKB_v1.5) |
| and [GPTKB_v1](https://huggingface.co/datasets/Knowledge-aware-AI/GPTKB_v1). |
| Note that v1 used label-based IRIs (`/entity/Vannevar_Bush`) where v2 |
| uses ID-based ones (`/entity/E0`); the two are not interchangeable. |
|
|
| ## Citation |
|
|
| The knowledge base is described in |
| [arXiv:2608.03729](https://arxiv.org/abs/2608.03729) and its web |
| interface in [arXiv:2608.06992](https://arxiv.org/abs/2608.06992); |
| see [gptkb.org/publications](https://gptkb.org/publications/) for the |
| current references and BibTeX. |
|
|