Automated extraction of genealogical relationships from Wikipedia presents significant challenges due to the semantic complexity and structural variability of family information across articles. While structured knowledge bases such as Wikidata provide explicit relationship triples, they often suffer from incompleteness and lack contextual nuance. This paper presents a hybrid approach that combines structured SPARQL queries of Wikidata with Large Language Model (LLM)-based semantic enrichment for comprehensive genealogical tree construction. Our two-phase system first extracts explicit relationships through bidirectional graph traversal of family properties in Wikidata, then conditionally activates LLM-based enrichment using retrieval-augmented generation (RAG) techniques on Wikipedia article text. The system employs embedding-based semantic chunking with text-embedding-004 model by Google to identify family-related content, followed by Gemini 2.0 Flash for relationship extraction via few-shot prompting. Additionally, we implement an LLM-powered classification mechanism to distinguish biological from adoptive parent-child relationships. Evaluation demonstrates that the hybrid approach achieves superior completeness compared to pure structured approaches while maintaining high precision through systematic duplicate detection and validation mechanisms. The system successfully constructs multi-generational family trees with an average processing time under 60 seconds per expansion operation.
@inproceedings{jayaratne2026hybrid,
title={{Hybrid Genealogical Relationship Extraction from Wikipedia}},
author={Jayaratne, Tharani and de Silva, Nisansa},
booktitle={Applied Data Science \& Artificial Intelligence Conference},
year={2026},
abstract={Automated extraction of genealogical relationships from Wikipedia presents significant challenges due to the semantic complexity and structural variability of family information across articles. While structured knowledge bases such as Wikidata provide explicit relationship triples, they often suffer from incompleteness and lack contextual nuance. This paper presents a hybrid approach that combines structured SPARQL queries of Wikidata with Large Language Model (LLM)-based semantic enrichment for comprehensive genealogical tree construction. Our two-phase system first extracts explicit relationships through bidirectional graph traversal of family properties in Wikidata, then conditionally activates LLM-based enrichment using retrieval-augmented generation (RAG) techniques on Wikipedia article text. The system employs embedding-based semantic chunking with text-embedding-004 model by Google to identify family-related content, followed by Gemini 2.0 Flash for relationship extraction via few-shot prompting. Additionally, we implement an LLM-powered classification mechanism to distinguish biological from adoptive parent-child relationships. Evaluation demonstrates that the hybrid approach achieves superior completeness compared to pure structured approaches while maintaining high precision through systematic duplicate detection and validation mechanisms. The system successfully constructs multi-generational family trees with an average processing time under 60 seconds per expansion operation.},
misc={https://openreview.net/pdf?id=c0qfhNdF4l,NLP:ML,https://goo.gl/iY6aTr}
}