IDEAS home Printed from https://ideas.repec.org/a/gam/jftint/v18y2026i7p376-d1994843.html

PromptSentinel-X: A Leakage-Aware and Context-Aware Framework for Prompt-Injection Detection in Large Language Model-Powered Web Agents

Author

Listed:
  • Lily Popova Zhuhadar

    (Department of Analytics & Information Systems, Center for Applied Data Analytics, Western Kentucky University, 410 Regents Avenue, CHAN Building, Room 3049, Bowling Green, KY 42101, USA)

Abstract

Large language model (LLM)-powered web agents combine privileged instructions with user requests, webpages, retrieved documents, tool outputs, memory, and conversation history, creating prompt-injection risks that static text classification may not capture. This study presents PromptSentinel-X, a leakage-aware and context-aware screening framework. The primary benchmark contained 1581 English records from the Prompt Injection Malignant dataset; 30,015 external prompt-injection, jailbreak, and benign hard-negative records were reserved for transfer and stress testing. The framework uses prompt-family-aware partitioning, trusted–untrusted context segmentation, calibrated risk prediction, robustness analysis, and deployment-oriented routing. On a 465-record group-aware test set, PromptSentinel-X achieved 0.9849 accuracy, 0.8887 macro-F1, 0.9851 attack recall, a 0.0050 benign false-positive rate, 0.9971 area under the receiver operating characteristic curve (AUROC), 0.9836 area under the precision-recall curve (AUPRC), and 0.0153 expected calibration error. Random splitting produced a higher baseline macro-F1 but 144 leakage warnings. Context-aware macro-F1 declined from 0.8301 for static prompts to 0.6306 for multi-turn, 0.3844 for retrieval-augmented generation, and 0.3200 for memory scenarios. PromptSentinel-X is positioned as a calibrated screening and escalation component, not a stand-alone authorization mechanism. Broader tool, memory, multimodal browser, multilingual, and end-to-end agent studies remain necessary.

Suggested Citation

  • Lily Popova Zhuhadar, 2026. "PromptSentinel-X: A Leakage-Aware and Context-Aware Framework for Prompt-Injection Detection in Large Language Model-Powered Web Agents," Future Internet, MDPI, vol. 18(7), pages 1-52, July.
  • Handle: RePEc:gam:jftint:v:18:y:2026:i:7:p:376-:d:1994843
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1999-5903/18/7/376/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1999-5903/18/7/376/
    Download Restriction: no
    ---><---

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jftint:v:18:y:2026:i:7:p:376-:d:1994843. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager The email address of this maintainer does not seem to be valid anymore. Please ask MDPI Indexing Manager to update the entry or send us the correct address (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.