Large language models (LLMs) have shown great potential in scientific and professional applications, but their tendency to generate hallucinations remains a major challenge, especially in forensic genetics, where evidential integrity and conclusion reliability are essential. Retrieval-augmented generation (RAG) can reduce hallucinations by incorporating external knowledge sources, while knowledge graphs represented as triplets (entity-relation-entity) provide structured, computable, and traceable domain knowledge. Their integration offers a reliable technical foundation for forensic applications requiring strong evidence linkage and interpretability. In this study, we propose a structured knowledge graph construction method based on literature mining and collaborative validation by domain experts, and use it to constrain LLM outputs. The framework was preliminarily applied to the microhaplotype (MH) field of forensic genetics, and a domain-specific benchmark was established to evaluate system performance and fidelity to the knowledge base in comparison with unconstrained LLMs.
This study developed a complete technical workflow including a RAG framework, triplet-structured knowledge graph construction, AI-based factual consistency verification, double-blind expert evaluation, and an interactive question-answering system for research scenarios. A triplet-based knowledge base was constructed from all retrievable and downloadable publications on microhaplotypes since the concept was first introduced in 2012. To evaluate the constraining effect of the knowledge base, we designed an MH benchmark covering conceptual questions, experimental design workflows, data analysis recommendations, logical reasoning, and overall AI-assisted support for scientific inquiry. System performance was assessed in terms of effectiveness, abstention correctness, hallucination rate, and over-claiming rate, together with user perceptions. The questions were randomly assigned to 24 participants with different levels of domain knowledge, and the answers were manually evaluated by domain experts, including doctors and professors. Existing unconstrained LLMs were employed as baseline models and compared with our system across the aforementioned evaluation metrics.
The MH knowledge base included 219 English-language publications, and the resulting knowledge graph contained 25,459 nodes and 24,230 edges. The proposed knowledge-constrained RAG framework almost eliminated hallucinations observed in unconstrained LLMs and enabled source-level traceability of generated content, thereby providing researchers with evidence-supported and traceable answers.