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

A framework for managing duplicate predicates in RKGs that covers detection, resolution, and prevention that combines automated similarity-based methods with human validation and is designed for integration into the lifecycle of evolving, crowdsourced RKGs.

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

Evidence-Carrying Validation for Knowledge Graphs

This work presents an evidence-carrying validation interface: every selected node-shape check returns either a satisfaction trace or failure witness, and 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

This work presents the first systematic survey of graph-assisted LLMs from the perspective of how graph structures mitigate LLMs’ limitations, and introduces a taxonomy spanning Graph-Assisted Knowledge Augmentation, Graph-Assisted Reasoning and Planning, and Graph-Assisted LLM Collaboration.

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