Feedback-Guided Prompt Injection Defense in Retrieval-Augmented Text-to-Cypher Generation

Szlobodnyik Gergely: Feedback-Guided Prompt Injection Defense in Retrieval-Augmented Text-to-Cypher Generation.
ANALYTICS, 5 (3). ISSN 2813-2203 (2026)

[thumbnail of analytics-05-00025.pdf] Szöveg
analytics-05-00025.pdf - Megjelent verzió

Download (17MB)
Mű típusa: Folyóiratcikk
Szerző azonosítók:
NévORCIDMTMT szerző azonosító
Szlobodnyik Gergely10066518
Absztrakt (kivonat): Text-to-Cypher generator systems translate natural language questions into Cypher queries, enabling intuitive interactions with graph databases such as Neo4j and Amazon Neptune. Despite recent advancements in LLM-based Cypher query generation, the vulnerabilities of the known methods—such as prompt injection attacks—are not discussed in detail. In this paper, we employ a robust Retrieval-Augmented Generation (RAG) architecture tailored specifically for text-to-Cypher tasks, leveraging dense vector retrieval to enhance query generation accuracy. We propose a dynamic and self-corrective procedure with feedback-loop-based AI architecture with Large Language Models (LLMs) for near real-time validation and correction of generated queries. We create a systematic procedure for generating datasets specifically designed to assess prompt injection robustness. Comprehensive evaluations are conducted using a diverse set of LLMs, including GPT-4o, DeepSeek R1, Claude 3.5 Sonnet and Qwen 2.5 Coder 32B Instruct. Our evaluation results indicate substantial improvements in resiliency against prompt injection attacks compared to various benchmarks. It is demonstrated that the proposed solution outperforms various training-free prompt injection defense methods.
Folyóirat címe: ANALYTICS
Megjelenés éve: 2026
Kötet: 5
Szám: 3
ISSN: 2813-2203
Intézmény: Pázmány Péter Katolikus Egyetem
Kar: Információs Technológiai és Bionikai Kar (2013.07.-)
Nyelv: angol
MTMT rekordazonosító: 37409716
DOI azonosító: 10.3390/analytics5030025
Scopus azonosító: 105051528034
Dátum: 2026. Okt. 06. 11:04
Utolsó módosítás: 2026. Okt. 06. 11:04
URI: https://publikacio.ppke.hu/id/eprint/3783

Actions (login required)

Tétel nézet Tétel nézet