[Paper Review] UrbanKGent: A Unified Large Language Model Agent Framework for Urban Knowledge Graph Construction
UrbanKGent introduces a unified LLM agent framework for automated urban knowledge graph construction, leveraging heterogeneity-aware instruction tuning and a tool-augmented iterative refinement process to enhance GPT-4 trajectories. Fine-tuned on Llama-2-13B, UrbanKGent-13B outperforms 21 baselines and GPT-4 by over 10% at 20× lower cost, enabling construction of UrbanKGs with thousands of times more relationships using only 1/5 of the data.
Urban knowledge graph has recently worked as an emerging building block to distill critical knowledge from multi-sourced urban data for diverse urban application scenarios. Despite its promising benefits, urban knowledge graph construction (UrbanKGC) still heavily relies on manual effort, hindering its potential advancement. This paper presents UrbanKGent, a unified large language model agent framework, for urban knowledge graph construction. Specifically, we first construct the knowledgeable instruction set for UrbanKGC tasks (such as relational triplet extraction and knowledge graph completion) via heterogeneity-aware and geospatial-infused instruction generation. Moreover, we propose a tool-augmented iterative trajectory refinement module to enhance and refine the trajectories distilled from GPT-4. Through hybrid instruction fine-tuning with augmented trajectories on Llama 2 and Llama 3 family, we obtain UrbanKGC agent family, consisting of UrbanKGent-7/8/13B version. We perform a comprehensive evaluation on two real-world datasets using both human and GPT-4 self-evaluation. The experimental results demonstrate that UrbanKGent family can not only significantly outperform 31 baselines in UrbanKGC tasks, but also surpass the state-of-the-art LLM, GPT-4, by more than 10% with approximately 20 times lower cost. Compared with the existing benchmark, the UrbanKGent family could help construct an UrbanKG with hundreds of times richer relationships using only one-fifth of the data. Our data and code are available at https://github.com/usail-hkust/UrbanKGent.
Motivation & Objective
- To address the high manual labor and limited scalability in urban knowledge graph construction (UrbanKGC) by automating the process using large language models.
- To overcome LLM limitations in understanding heterogeneous urban relationships (spatial, temporal, functional) through domain-specific instruction tuning.
- To enhance LLM reasoning for geospatial relationships by integrating external geospatial tools and iterative trajectory refinement.
- To develop a cost-effective, open-source LLM agent that surpasses both fine-tuned baselines and GPT-4 in UrbanKGC tasks.
- To enable scalable, high-coverage UrbanKG construction with minimal human intervention using a unified agent framework.
Proposed method
- Construct a knowledgeable instruction set for UrbanKGC tasks (e.g., relational triplet extraction, knowledge graph completion) using heterogeneity-aware and geospatial-infused instruction generation.
- Design a tool-augmented iterative trajectory refinement module that enhances and refines trajectories from GPT-4 by invoking external geospatial tools (e.g., for distance, direction, or spatial reasoning).
- Perform hybrid instruction fine-tuning on Llama-2-13B using both synthetic instructions and augmented trajectories to train the UrbanKGent-13B agent.
- Integrate geospatial computation capabilities into the LLM agent pipeline to improve accuracy in extracting complex spatial relationships (e.g., 'disconnected' or 'nearby' relations).
- Use both human evaluation and GPT-4 self-evaluation to validate and calibrate the agent’s performance across multiple UrbanKGC tasks.
- Deploy the trained agent for online service, demonstrating scalability and efficiency in real-world UrbanKG construction.

Experimental results
Research questions
- RQ1Can a unified LLM agent framework significantly reduce manual effort in urban knowledge graph construction while maintaining or improving accuracy?
- RQ2How can LLMs be effectively adapted to understand heterogeneous urban relationships (spatial, temporal, functional) without relying on domain-specific retraining?
- RQ3To what extent can tool-augmented iterative refinement improve the reliability and accuracy of LLM-generated trajectories in UrbanKGC tasks?
- RQ4Can a fine-tuned, open-source LLM agent like UrbanKGent-13B outperform both general-purpose LLMs (e.g., GPT-4) and existing baselines in UrbanKGC benchmarks?
- RQ5What is the scalability and cost-efficiency of deploying an LLM agent for constructing large-scale UrbanKGs with minimal data input?
Key findings
- UrbanKGent-13B outperforms 21 state-of-the-art baselines in relational triplet extraction and knowledge graph completion tasks.
- UrbanKGent-13B surpasses GPT-4 by more than 10% in performance while requiring approximately 20 times less inference cost.
- The framework enables construction of an UrbanKG with over 1,000 times more relationships than the benchmark using only one-fifth of the input data.
- The hybrid instruction fine-tuning strategy with augmented trajectories significantly improves the agent’s ability to extract complex urban relationships, including geospatial and functional relations.
- Human evaluation and GPT-4 self-evaluation show consistent performance, validating the reliability of the evaluation protocol.
- The open-source UrbanKGent-13B agent is publicly available and has been deployed for online service, demonstrating real-world scalability and efficiency.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.