PaperSwipe

Ask Safely: Privacy-Aware LLM Query Generation for Knowledge Graphs

Published 2 days agoVersion 1arXiv:2512.04852

Authors

Mauro Dalle Lucca Tosi, Jordi Cabot

Categories

cs.IR

Abstract

Large Language Models (LLMs) are increasingly used to query knowledge graphs (KGs) due to their strong semantic understanding and extrapolation capabilities compared to traditional approaches. However, these methods cannot be applied when the KG contains sensitive data and the user lacks the resources to deploy a local generative LLM. To address this issue, we propose a privacy-aware query generation approach for KGs. Our method identifies sensitive information in the graph based on its structure and omits such values before requesting the LLM to translate natural language questions into Cypher queries. Experimental results show that our approach preserves the quality of the generated queries while preventing sensitive data from being transmitted to third-party services.

Ask Safely: Privacy-Aware LLM Query Generation for Knowledge Graphs

2 days ago
v1
2 authors

Categories

cs.IR

Abstract

Large Language Models (LLMs) are increasingly used to query knowledge graphs (KGs) due to their strong semantic understanding and extrapolation capabilities compared to traditional approaches. However, these methods cannot be applied when the KG contains sensitive data and the user lacks the resources to deploy a local generative LLM. To address this issue, we propose a privacy-aware query generation approach for KGs. Our method identifies sensitive information in the graph based on its structure and omits such values before requesting the LLM to translate natural language questions into Cypher queries. Experimental results show that our approach preserves the quality of the generated queries while preventing sensitive data from being transmitted to third-party services.

Authors

Mauro Dalle Lucca Tosi, Jordi Cabot

arXiv ID: 2512.04852
Published Dec 4, 2025

Click to preview the PDF directly in your browser