Automatic Prompt Optimization for Knowledge Graph Construction: Insights from an Empirical Study
Not on the map. Why?
Abstract (arXiv)
A KG represents a network of entities and illustrates relationships between them. KGs are used for various applications, including semantic search and discovery, reasoning, decision-making, natural language processing, machine learning, and recommendation systems. Triple (subject-relation-object) extraction from text is the fundamental building block of KG construction and has been widely studied, for example, in early benchmarks such as ACE 2002 to more recent ones, such as WebNLG 2020, REBEL and SynthIE. While the use of LLMs is explored for KG construction, handcrafting reasonable task-specific prompts for LLMs is a labour-intensive exercise and can be brittle due to subtle changes in the LLM models employed. Recent work in NLP tasks (e.g. autonomy generation) uses automatic prompt optimization/engineering to address this challenge by generating optimal or near-optimal task-specific prompts given input-output examples. This empirical study explores the application of automatic prompt optimization for the triple extraction task using experimental benchmarking. We evaluate different settings by changing (a) the prompting strategy, (b) the LLM being used for prompt optimization and task execution, (c) the number of canonical relations in the schema (schema complexity), (d) the length and diversity of input text, (e) the metric used to drive the prompt optimization, and (f) the dataset being used for training and testing. We evaluate three different automatic prompt optimizers, namely, DSPy, APE, and TextGrad and use two different triple extraction datasets, SynthIE and REBEL. Through rigorous empirical evaluation, our main contribution highlights that automatic prompt optimization techniques can generate reasonable prompts similar to humans for triple extraction. In turn, these optimized prompts achieve improved results, particularly with increasing schema complexity and text size.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 39 of its 48 references that are in the map. First posted on arXiv 24 Jun 2025.
Builds on
39 of 48 references.
References · 39
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2017Deep reinforcement learning from human preferencescited by 3,912
- 2020Learning to summarize from human feedbackcited by 2,588
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
- 2019Language Models as Knowledge Bases?cited by 1,936
- 2024From Local to Global: A Graph RAG Approach to Query-Focused Summarizationcited by 1,453
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
27 more
- 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 832
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2020Knowledge Graphscited by 621
- 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 336
- 2024Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programscited by 291
- 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 226
- 2023EvoPrompt: Connecting LLMs with Evolutionary Algorithms Yields Powerful Prompt Optimizerscited by 193
- 2022Ask Me Anything: A simple strategy for prompting language modelscited by 155
- 2024Meta-Prompting: Enhancing Language Models with Task-Agnostic Scaffoldingcited by 117
- 2022Re2G: Retrieve, Rerank, Generatecited by 102
- 2023Cross-lingual Prompting: Improving Zero-shot Chain-of-Thought Reasoning across Languagescited by 97
- 2023Exploiting Asymmetry for Synthetic Training Data Generation: SynthIE and the Case of Information Extractioncited by 89
- 2023InstructZero: Efficient Instruction Optimization for Black-Box Large Language Modelscited by 68
- 2023A Comprehensive Survey on Automatic Knowledge Graph Constructioncited by 63
- 2025A Systematic Survey of Automatic Prompt Optimization Techniquescited by 63
- 2023Fairness-guided Few-shot Prompting for Large Language Modelscited by 53
- 2023Text2KGBench: A Benchmark for Ontology-Driven Knowledge Graph Generation from Textcited by 48
- 2025A Survey of Automatic Prompt Engineering: An Optimization Perspectivecited by 41
- 2023Query-Dependent Prompt Evaluation and Optimization with Offline Inverse RLcited by 37
- 2025Beyond English: The Impact of Prompt Translation Strategies across Languages and Tasks in Multilingual LLMscited by 22
- 2023Exploring In-Context Learning Capabilities of Foundation Models for Generating Knowledge Graphs from Textcited by 19
- 2022Knowledge Graph Generation From Textcited by 15
- 2024Research Trends for the Interplay between Large Language Models and Knowledge Graphscited by 15
- 2021Generative Relation Linking for Question Answering over Knowledge Basescited by 14
- 2022KnowGL: Knowledge Generation and Linking from Textcited by 13
- 2020Open Knowledge Graphs Canonicalization using Variational Autoencoderscited by 9
- 2024Introducing MAPO: Momentum-Aided Gradient Descent Prompt Optimizationcited by 9
Built on by
Citing papers per year: 2026: 6.
6 papers.
- 2026Automatic Prompt Engineering with No Task Cues and No Tuningcited by 0
- 2026LLM+Graph@VLDB'2025 Workshop Summarycited by 0
- 2026Why Prompt Optimization Works, and Why It Sometimes Doesn't: A Causal-Inspired Edit-Level Analysiscited by 0
- 2026Two-Stage Prompt Optimization for Few-Shot Relation Extraction: From Reasoning-Guided Search to Gradient-Guided Refinementcited by 0
- 2026Object Aligner: A Configurable JSON Schema Similarity Score for Graphs, Applied to LLM Prompt Optimizationcited by 0
- 2026APOLO: Automatic Prompt Optimization for Ontology Learningcited by 0
- 2026APOLO: Automatic Prompt Optimization for Ontology Learning28 Sep 2026
- 2026Object Aligner: A Configurable JSON Schema Similarity Score for Graphs, Applied to LLM Prompt Optimization2 Jul 2026
- 2026Two-Stage Prompt Optimization for Few-Shot Relation Extraction: From Reasoning-Guided Search to Gradient-Guided Refinement28 Jun 2026
- 2026Why Prompt Optimization Works, and Why It Sometimes Doesn't: A Causal-Inspired Edit-Level Analysis26 May 2026
- 2026LLM+Graph@VLDB'2025 Workshop Summary3 Apr 2026
- 2026Automatic Prompt Engineering with No Task Cues and No Tuning6 Jan 2026