CSE499 · FYDP Research Project

Making AI applications safer in Bengali & Banglish.

A lightweight prompt-injection detection and defense framework for LLM-integrated web applications, designed to recognize malicious instructions across Bengali, Banglish and English.

Tanzina RahmanResearch team
Gulam MurshedResearch team
Daffodil International UniversityDepartment of CSE
INPUT SECURITY PIPELINE● Framework overview
input = "untrusted user text"
normalize(input)
route(language, script)
detect(prompt_injection)
decision = pass / sanitize / block
01 Normalize02 Route03 Rules04 Classify05 Decide06 Log
Input-side middleware · Output filtering is out of scope
01 / Research overview

Why this research matters

Large language models can interpret malicious text as instructions instead of treating it as untrusted data. This creates a prompt-injection risk for applications that connect user content to an LLM.

⌕

The problem

Many prompt-injection defenses are English-centric. Bengali and Banglish inputs can therefore be missed by defenses that do not adequately cover them.

◎

The research gap

The project addresses the lack of a Bengali and Banglish-focused labelled resource for training and evaluating a per-input prompt-injection detector.

⬡

The proposed direction

A compact detector combines high-precision rules with a fine-tuned transformer and a sentence-level sanitisation step.

CORE CHALLENGE

“An attacker can express an instruction override in Bengali or Banglish while the model still understands it.”

The defense layer needs to understand the language of the input, not just the language most represented in existing datasets.

Research objectives

✓Build a labelled Bengali and Banglish prompt-injection dataset.
✓Develop a compact detector suitable for CPU-based inference.
✓Sanitise suspicious sentences instead of relying only on blocking.
✓Evaluate generalisation, false positives and adversarial perturbations.
02 / System methodology

Six stages. One defense layer.

The framework sits between an application and its language model. It inspects incoming untrusted text before the application forwards it to the model.

1
NormalizeUnicode NFC and zero-width character handling
2
RouteBengali script, Banglish or English
3
RulesHigh-precision patterns
4
ClassifyFine-tuned BanglishBERT
5
DecidePass, sanitise or block
6
LogRecord the decision
Decision thresholds: Pass below 0.55 · Sanitise from 0.55 to below 0.85 · Block at 0.85 and above.
MODEL

BanglishBERT

Backbone: csebuetnlp/banglishbert. Multi-task classification with a binary injection head and a seven-way category head. Maximum sequence length: 128.

SANITISATION

Sentence-level handling

The input is split into sentences. Each sentence is scored, the offending sentence is removed, and the remaining text is forwarded.

Attack categories

Override

Attempts to replace prior instructions.

Hijack

Attempts to redirect the model's task.

Extraction

Attempts to reveal protected information.

Escape

Attempts to bypass intended constraints.

Smuggling

Hides instructions inside other content.

Indirect

Instructions embedded in external or supplied content.

03 / Dataset

Three language slices

The dataset combines Bengali and Banglish generated examples with licence-screened public English sources. Hard negatives are included to test whether benign inputs are mistakenly flagged.

Language sliceInjectionBenignHard negatives
Bengali script59658725.3%
Banglish59657825.7%
English3,6542,837Approx. 2%

60 seed templates

Category-balanced templates expanded across formal Bengali, Dhaka colloquial and heavy code-mix registers.

Leakage-aware splits

Dataset splits are grouped by template ID to reduce template overlap between splits.

Important caveat

Bengali and Banglish rows are marked verified: false; independent native-speaker validation remains necessary.

04 / Experimental results

Measure performance honestly.

Selected figures from the project evaluation. Each metric should be read with its evaluation setting and limitations.

98.9%Script router accuracy · overall
0.33%Hard-negative false-positive rate · overall
15.2 msONNX int8 median latency · real length distribution
111 MBONNX int8 model size

English generalisation

Macro-F1
0.8035

Embeddings · leave-one-dataset-out (the honest English baseline)

Embeddings
0.8035
TF-IDF
0.5468

Same-source scores are shown for contrast, not as the headline generalisation result.

Router accuracy by language

Accuracy
Bengali
99.8%
Banglish
94.9%
English
99.5%

Overall script-router accuracy: 98.9%.

EvaluationResultInterpretation
Leave-one-dataset-out · embeddings0.8035Honest English baseline
Leave-one-dataset-out · TF-IDF0.5468Cross-dataset result
Source-origin probe96.5%Evidence of learnable source artifacts
Bengali macro-F11.000Caveat 111 template-derived rows; no measurement headroom
Character-perturbation evasion~0% bn / banglishEnglish: 1.7% or less
05 / Critical self-evaluation

What we learned by challenging our own results.

These findings are kept visible rather than hidden. They explain why evaluation design matters as much as a headline score.

0.9844 → 0.8035

Same-source inflation

A source-origin probe reached 96.5% accuracy. Under leave-one-dataset-out evaluation, the embeddings baseline scored 0.8035. The lower cross-dataset result is the figure reported as the honest baseline.

18.8 / 14 / 0%

A data-generation artifact

A doubled-verb ending correlated with injection labels in generated data. The artifact was identified and fixed to 0.0% before model training.

0.99

Over-defense remains

A benign Banglish Wi-Fi password request is incorrectly blocked at 0.99. The issue is linked to an imbalance in English hard negatives and is reported as not yet fixed.

LIMITATION 01

Human validation still needed

All Bengali and Banglish generated rows are unverified. A native-speaker holdout is the highest-priority remaining evaluation work.

LIMITATION 02

Not all figures are directly comparable

Per-source scores of 0.967 and 0.956 are not leave-one-dataset-out results. They must not be presented as LODO metrics.

06 / Interaction concept

Explore the security decision.

This is a UI prototype interaction to demonstrate the three possible outcomes. It is not connected to the trained model or live API.

Prompt inspection preview

Prototype · simulated

Enter a sample prompt, or try one of the preset examples.

Your prototype result will appear here.
Note: The actual project pipeline uses trained components and decision thresholds. This front-end example only illustrates the interaction pattern.
07 / Research positioning

Related work and distinction

The project is positioned as a labelled detection resource and a per-input detector, rather than a general jailbreak robustness benchmark.

IndicJR (EACL 2026 Industry Track)

IndicJR evaluates model behaviour under adversarial wrapping across South Asian languages. This project focuses on labelled prompt-injection detection data and a classifier that predicts each input's risk.

Scope of this framework

Input-side middleware only. Output filtering is explicitly out of scope. The novelty claim is carefully scoped: to the best of the team's knowledge, as of August 2026, no public dataset covers Bengali or Banglish prompt-injection detection.

08 / Project information

Research team & supervision

Daffodil International University · Department of Computer Science and Engineering

TR

Tanzina Rahman

Research team · Student ID: 232-15-296

GM

Gulam Murshed

Research team · Student ID: 232-15-336

Supervisor

Sharmin Akter
Assistant Professor

Co-supervisor

Dr. Sheak Rashed Haider Noori
Professor and Head

References

Selected research sources

OWASP. LLM Top 10 for LLM Applications 2025, LLM01:2025.
Srinivasan et al. (2026). “Detection and Analysis of Prompt Injection in Indian Multilingual Large Language Models.” Scientific Reports 16:16208. DOI: 10.1038/s41598-026-43883-0.
Pattnayak & Chowdhuri (2026). “IndicJR: A Judge-Free Benchmark of Jailbreak Robustness in South Asian Languages.” EACL 2026 Industry Track, pp. 649–668.
Ning et al. (2025). “LinguaSafe: A Comprehensive Multilingual Safety Benchmark for Large Language Models.” arXiv:2508.12733.