Information Processing & Management · 2025 · 14 citations · 19 references
ComputingBiomedical InformaticsComputer ScienceBiomedical Text MiningKnowledge RepresentationNatural Language ProcessingBiomedical Document RetrievalGraph-based LearningInformation ExtractionKnowledge GraphsLanguage ModelingMachine TranslationAutomated Query GenerationBenchmark Dataset DesignBenchmark Dataset EvaluationBiomedical Knowledge GraphsKnowledge Graphs In BiomedicineLarge Language ModelsNatural Language InferenceNatural Language Interfaces
Knowledge Graphs (KGs) store structured information but typically require specialized query languages, such as Cypher for Neo4j, creating accessibility challenges for users unfamiliar with graph syntax. Large Language Models (LLMs) offer a solution by translating natural language into Cypher queries. However, existing models—including large-scale LLMs (e.g., ChatGPT) and smaller open-source models (e.g., Llama-7B, 8B) often struggle with accurately generating domain-specific queries due to inadequate alignment with KG schemas and limited domain-specific training data. To address these limitations, we propose a training pipeline tailored specifically for domain-aligned Cypher query generation, emphasizing usability for smaller-scale models. Our method integrates template-based synthetic data generation for diverse, high-quality training samples. We combine supervised fine-tuning with preference learning to enhance domain knowledge and Cypher syntax understanding. Additionally, our approach includes a context-aware retrieval mechanism that dynamically incorporates relevant schema elements at inference, improving alignment with domain-specific knowledge. We evaluated our method on the Hetionet biomedical KG using a benchmark dataset of 240 queries across three complexity levels. Our results show that our context-aware prompting achieves a substantial improvement, increasing component matching accuracy by 23.6% for ChatGPT-4o over the vanilla prompt baseline. When applying our full training pipeline to smaller-scale models, CodeLlama-13B* achieves an execution accuracy of 69.2%, nearly matching ChatGPT-4o’s 72.1%. Importantly, our approach significantly narrows the performance gap, enabling smaller models to effectively manage complex, domain-specific tasks previously dominated by larger models. These findings demonstrate that our method is scalable, computationally efficient, and robust for practical Cypher query generation applications.
19
A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT
Jules White, Quchen Fu, Sam Hays et al. · arXiv (Cornell University) · 2023 · 792 citations · Full text
Computing, Computer Science, Natural Language Processing +12
Systematic integration of biomedical knowledge prioritizes drugs for repurposing
Daniel Himmelstein, Antoine Lizée, Christine Hessler et al. · eLife · 2017 · 617 citations · Full text
Named Entity Extraction for Knowledge Graphs: A Literature Overview
Tareq Al-Moslmi, Marc Gallofré Ocaña, Andreas L. Opdahl et al. · IEEE Access · 2020 · 219 citations · Full text