Skip to content

Balancing Richness and Reliability: An Explore-Construct-Verify Framework for API Knowledge Graph Construction

Aug 2026 · ACM Transactions on Software Engineering and Methodology · 0 citations · 45 references

TL;DR

This work proposes Explore-Construct-Verify (ECV), a three-stage framework for API KG construction using large language models (LLMs), which preserves LLMs’ ability to discover domain-specific knowledge while enabling efficient post-hoc validation.

Abstract

Application Programming Interfaces (APIs) are central to modern software development, yet the growing scale and semantic complexity of APIs present significant challenges for developers in learning and using them effectively. API knowledge graphs (KGs) offer a structured solution by organizing API entities and their relations, but existing construction methods face a trade-off: schema-guided methods ensure precision but suffer from limited richness, while schema-free methods capture richer semantics but often lack reliability. To address this challenge, we propose Explore-Construct-Verify (ECV), a three-stage framework for API KG construction using large language models (LLMs). The framework first explores candidate schema in a bottom-up manner, then constructs the KG with schema-guided extraction, and finally applies human-AI collaborative verification based on association rule mining. This design preserves LLMs’ ability to discover domain-specific knowledge while enabling efficient post-hoc validation. We conduct extensive experiments to evaluate the effectiveness of our method. Compared to the state-of-the-art method EDC, ECV improves KG construction F1 score by 31.3%. Component analysis shows that the exploration module improves KG richness (recall) by 267.9%, the fully connected schema strategy increases richness by 50.0%, and the verification module improves KG reliability (precision) by 47.1%. ECV maintains an average F1 around 0.69 both across six programming languages and across five LLMs, demonstrating strong cross-language and cross-model generalizability. We further validate the practical utility of the constructed KG through an API recommendation task, where KG-enhanced LLMs outperform LLM-only baselines by 26.3% in accuracy.

View source

Similar papers

Conference Jul 2026

Architecture Recovery Revisited: A Hybrid Knowledge Graph and LLM-Based Approach

Software architecture recovery has long been central to research in program understanding and reengineering. Understanding and modernizing large-scale legacy software requires accurate reconstruction of its architectural structure. Traditional recovery approaches based on code clustering or template matching struggle to deliver semantically meaningful decompositions, especially in the face of architectural drift and inadequate documentation. We present a hybrid architecture recovery method that integrates Large Language Models (LLMs) with a property-based Knowledge Graph derived directly from source code. Our approach iteratively explores, proposes, and refines component boundaries through a three-phase process: Explore, Allocate, and Shift. This process combines structural analysis with semantic reasoning and prompt engineering to produce coherent component hierarchies. We evaluate our system on three real-world C codebases (cJSON, SQLite, and Bash), and compare the recovered architectures against established reference architectures and gold standards.

Syed Quadri, K. Kontogiannis, Derek Truong · 0 citations
Preprint Jul 2026

Addressing Predicate Redundancy in Research Knowledge Graphs: Duplicate Detection, Resolution, and Prevention

Research Knowledge Graphs (RKGs) enable the structured representation of scientific knowledge, but their weakly enforced schemas make them prone to inconsistencies, particularly in how predicates are defined and used. Duplicate predicates, i.e., distinct identifiers expressing the same or highly similar relationships, introduce semantic redundancy, hinder reuse, and reduce RKG quality. While prior work has addressed duplicate detection for downstream tasks such as query answering or schema alignment, predicate redundancy as a data quality challenge, remains underexplored, particularly in terms of resolution, prevention, and semi-automated curator support. In this paper, we propose a framework for managing duplicate predicates in RKGs that covers detection, resolution, and prevention. The framework combines automated similarity-based methods with human validation and is designed for integration into the lifecycle of evolving, crowdsourced RKGs. We implement the framework in the context of the Open Research Knowledge Graph (ORKG) by extending its existing curation dashboard SciKGDash with embedding-based clustering, interactive inspection, and resolution actions such as merging and deleting. We evaluate the framework on the ORKG, where clustering reveals that up to 30% of predicates are potentially redundant. The analysis also shows recurring modeling patterns that lead to predicate redundancy, user-induced duplication, inconsistent identifier usage, and a lack of standardization in predicate naming and usage. Our findings demonstrate that duplicate predicates arise from user behavior and interface design. Addressing this, requires combining automated methods with human-centered curation and preventive mechanisms. This work positions predicate redundancy as a central data quality challenge and provides a foundation for more systematic and proactive RKG curation.

Lena John, Sushant Aggarwal, Sören Auer et al. · 0 citations
Preprint Aug 2026

Evidence-Carrying Validation for Knowledge Graphs

Programs that consume a knowledge graph they do not maintain, such as applications, authoring platforms, and LLM agents, need to know whether the graph contains the information their task requires. Validating the graph against a schema can answer this question, but existing validation interfaces usually return a conformance bit or failure-oriented report without identifying why checks pass or the partial matches behind failures. We present an evidence-carrying validation interface: every selected node-shape check returns either a satisfaction trace or failure witness. These are mutually recursive objects that retain constraints, cardinality decisions, paths, and supporting triples. We implement this interface in Shifty, an experimental SHACL validator. Against two real-world shape graph corpora, materializing all-pair evidence costs a median 1.54-2.07X conformance-only validation. A case study then shows how programs combine passing and failing evidence to diagnose missing information and guide repair.

Gabe Fierro · 0 citations
Conference Open access 2026

Graph-Assisted Large Language Models: A Perspective on Mitigating Intrinsic Limitations

Large language models (LLMs) have made progress in knowledge-intensive tasks, reasoning and planning, and collaborative problem solving, yet they exhibit intrinsic limitations such as knowledge cutoff, single-threaded reasoning that hinders finer-grained branch and aggregation, and rigid collaboration mechanisms that struggle to coordinate specialized capabilities. Graphs, with their ability to represent relational knowledge and complex dependencies, offer a natural means to address these limitations: they provide structured, high-density knowledge for augmenting or correcting LLMs’ generation; enable revisitable inference by organizing intermediate steps as graphs; and support dynamic coordination among experts or agents in collaborative settings. Motivated by these developments, we present the first systematic survey of graph-assisted LLMs from the perspective of how graph structures mitigate LLMs’ limitations. We introduce a taxonomy spanning Graph-Assisted Knowledge Augmentation, Graph-Assisted Reasoning and Planning, and Graph-Assisted LLM Collaboration , and analyze representative methods, summarize common design patterns, and outline open challenges and future directions for advancing LLMs with graph-based enhancements. The collected papers are available in link here.

Haitong Luo, Fali Wang, Weiyao Zhang et al. · 2 citations
Open access Aug 2026

A Software Repository Tag Method Based on Hybrid Search and Graph Enhancement

Software repositories play an essential role in modern software engineering by enabling code sharing, collaboration, and reuse. Repository tag recommendation is a key technique for improving the discoverability and organization of software repositories. However, existing methods still suffer from noisy annotations, incomplete tag coverage, long-tailed label distributions, and limited adaptability to emerging technical terms. To address these issues, this paper proposes ReG-TG, a retrieval-augmented framework for repository tag recommendation. ReG-TG integrates hybrid retrieval, a tag co-occurrence knowledge graph, and Chain-of-Thought (CoT) reasoning within a large language model (LLM)-based architecture. Specifically, the hybrid retrieval module combines dense semantic embeddings and sparse lexical matching to retrieve relevant reference repositories, followed by a reranking mechanism to refine candidate results. A tag co-occurrence graph is further constructed to model structural relationships among tags and provide graph-enhanced tag knowledge. The retrieved context and graph-enhanced information are then incorporated into structured prompts to guide LLM-based tag generation. Experimental results on multiple GitHub repository datasets show that ReG-TG consistently outperforms representative baselines, including TF-IDF+LR, ZestXML, and LEGION, in terms of Precision@5, Recall@5, and F1-score@5. Further ablation studies demonstrate that retrieval augmentation, hybrid retrieval, reranking, graph enhancement, and structured reasoning each contribute to performance improvement. In addition, long-tail analysis shows that ReG-TG maintains better robustness on low-frequency labels, indicating its effectiveness in alleviating the sparsity and long-tail challenges in repository tag recommendation.

Min Wang, Shanshan Wu, Wanjia Lv et al. · 0 citations