A Hybrid LLM Based Relationship Extraction Algorithm for Unstructured Data
Unstructured text data such as crime reports and witness statements often contain essential connections between crime entities such as suspects, weapons, locations, and crime types. However, it can be difficult to extract and analyze these linkages because they are often inserted within unstructured narratives. This paper presents a hybrid framework that combines crime-specific entity recognition with fine-tuned large language models (LLMs) to extract relationships from crime data. The pipeline initially employs a BERT-based model to identify crime-related entities, followed by a Tiny LLAMA and LoRA-optimized LLM to discern and structure relationships as subject–predicate–object triplets which helps in criminal analytics. Experiments conducted on selected crime dataset showed significant improvements in 85.8 % accuracy with F1-score, recall, and precision over baseline models, especially when handling complicated relationship types. The results show that transformer-based NER combined with targeted LLM fine-tuning offers an effective hybrid approach for extracting useful relations from unstructured crime texts, which is helpful to criminal justice analytics and law enforcement.