| --- |
| language: |
| - en |
| license: mit |
| tags: |
| - knowledge-graph |
| - rdf |
| - information-extraction |
| - uk-government-contracts |
| - procurement |
| - text-to-kg |
| - nlp |
| - trustworthy-ai |
| task_categories: |
| - text-generation |
| - token-classification |
| size_categories: |
| - 10K<n<100K |
| --- |
| |
| # Text-to-KG Construction Dataset (UK Government Contracts) |
|
|
| ## Dataset Summary |
|
|
| This dataset contains **9,244 verified UK government procurement contracts** paired with structured **RDF knowledge graph triples**, constructed for the task of automated Text-to-KG extraction. It was developed as part of a UEL–Depixen industrial placement research project focused on building **trustworthy, hallucination-free domain-specific SLMs**. |
|
|
| This dataset was used to fine-tune: |
| - 👉 [BSVGK/phi35-mini-lora-text2kg-merged](https://huggingface.co/BSVGK/phi35-mini-lora-text2kg-merged) — Zero hallucination across 1,387 unseen contracts |
| - 👉 [BSVGK/phi35-mini-lora-text2kg-adapter](https://huggingface.co/BSVGK/phi35-mini-lora-text2kg-adapter) — LoRA adapter |
|
|
| ## Dataset Details |
|
|
| | Property | Value | |
| |----------|-------| |
| | Domain | UK Government Procurement Contracts | |
| | Total Samples | 9,244 training + 1,387 test | |
| | Format | Contract text → RDF Triples | |
| | Language | English | |
| | Source | UK Government procurement data | |
| | License | MIT | |
|
|
| ## Dataset Structure |
|
|
| Each sample contains: |
|
|
| { |
| "input": "Raw UK government contract text...", |
| "output": [ |
| {"subject": "entity_1", "predicate": "relation", "object": "entity_2"}, |
| {"subject": "entity_1", "predicate": "relation", "object": "entity_3"} |
| ] |
| } |
| |
| ## Construction Process |
|
|
| 1. **Data Collection** — UK government procurement contracts collected from public sources |
| 2. **Preprocessing** — Cleaning, deduplication, and normalisation of contract text |
| 3. **Triple Extraction** — Manual and automated RDF triple annotation |
| 4. **Verification** — Each triple verified against source contract text |
| 5. **Quality Control** — Dual-level hallucination check (L1: relation validity, L2: entity grounding) |
|
|
| ## Hallucination Evaluation Framework |
|
|
| This dataset was evaluated using a **novel dual-level hallucination framework**: |
|
|
| - **L1 — Relation Validity:** All relations verified against a predefined ontology |
| - **L2 — Entity Grounding:** All entities grounded in the source contract text |
|
|
| This ensured **zero hallucination** in the fine-tuned Phi-3.5 model across 1,387 unseen test contracts. |
|
|
| ## Models Trained on This Dataset |
|
|
| | Model | F1 | BERTScore | Hallucination Rate | |
| |-------|----|-----------|--------------------| |
| | Phi-3.5 Mini Instruct (LoRA) | **0.9954** | **0.9997** | **0.00%** | |
| | Gemma 2 2B IT (QLoRA) | competitive | competitive | higher | |
|
|
| ## Intended Use |
|
|
| - Training SLMs for knowledge graph construction |
| - Research in trustworthy and hallucination-free NLP |
| - Information extraction from legal and procurement documents |
| - RDF triple generation for semantic web applications |
|
|
| ## Out of Scope |
|
|
| - Non-English contracts |
| - Contracts outside UK government procurement domain |
| - General purpose NLP tasks |
|
|
| ## Citation |
|
|
| @misc{bubathula2026texttokg_dataset, |
| author = {Sai Venkata Gopala Krishna Bubathula}, |
| title = {Text-to-KG Construction Dataset: UK Government Procurement Contracts for RDF Triple Extraction}, |
| year = {2026}, |
| publisher = {HuggingFace}, |
| url = {https://huggingface.co/datasets/BSVGK/Text_to_KG_Construction_Dataset}, |
| institution = {University of East London & Depixen} |
| } |
| |
| ## Developer |
| |
| **Sai Venkata Gopala Krishna Bubathula** |
| - 🎓 MSc Big Data Technologies, University of East London |
| - 🏢 AI Engineer — UEL–Depixen Industrial Placement |
| - 🔗 [GitHub](https://github.com/BSVGK1919) |
| - 🔗 [LinkedIn](https://www.linkedin.com/in/sai-venkata-gopala-krishna-bubathula-a05a26283/) |
| - 🔗 [HuggingFace](https://huggingface.co/BSVGK) |
| |