Graph Me Up Scottie – Automated RDF Triple Extraction from Unstructured Text Using Finetuned Small-Scale Large Language Models
The automated extraction of Resource Description Framework (RDF) triples from unstructured text is crucial for transforming raw information into structured, machine-readable knowledge. RDF triples provide a standardized method for encoding relationships between entities, enabling the creation of interoperable and extensible knowledge graphs. These graphs are essential for improving metadata management, resource discovery, and semantic search capabilities in library systems and digital repositories. This research explores fine-tuning the Qwen2.5-7B-Instruct model, a compact large language model (LLM), to achieve cost-efficient and high-accuracy RDF triple extraction without reliance on expensive, proprietary systems. By employing state-of-the-art techniques such as Low-Rank Adaptation (LoRA) and Unsloth, the model was fine-tuned on a diverse dataset combining TinyButMighty and WebNLG. These datasets span multiple domains, ensuring that the model learns a wide variety of relational patterns applicable to diverse collections typically managed in library contexts. The methodology integrated advanced parameter-efficient fine-tuning processes designed to optimize computational resources while maintaining semantic accuracy. This would allow libraries, often constrained by limited budgets, to adopt scalable solutions for metadata enrichment and integration of heterogeneous data sources. Evaluation centred on semantic similarity, assessing the alignment of extracted triples with ground-truth annotations using BERT-based cosine similarity and numerical distance metrics. This approach ensures the extracted knowledge can be effectively linked to existing ontologies and metadata standards in practice. Results revealed a 20% improvement in semantic similarity scores for the fine-tuned Qwen2.5-7B-Instruct model compared to its baseline, underscoring its capability to extract RDF triples with high precision and consistency. Additionally, the fine-tuned model outperformed larger LLMs, including OpenAI’s GPT-4o and GPT-3.5-Turbo, proving that smaller, cost-efficient models can meet the demands of knowledge organization in libraries and information systems. This research demonstrates the transformative potential of small-scale LLMs for RDF triple extraction in information sciences. Future work should focus on incorporating datasets with greater contextual coherence, enabling the construction of domain-specific knowledge graphs tailored to library collections.
Institutions
- IQVIA (United Kingdom) (GB)
- University of Applied Sciences of the Grisons (CH)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-07-15
- DOI
- https://doi.org/10.5281/zenodo.15911080
- Primary Topic
- Semantic Web and Ontologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00