Offline Baseline Evaluation
Benchmark model behaviour before connecting tools or external systems.
Since the public release of ChatGPT in late 2022, LLMs have moved rapidly from research labs into mainstream products, internal tooling, and enterprise workflows. As these systems become embedded in decision-making, content generation, retrieval, and tool execution, their security properties matter just as much as their usefulness.
Prompt injection is a particularly important risk because it exploits how language models fundamentally work. Unlike traditional software, LLMs process trusted instructions and untrusted content through the same natural-language channel. This creates ambiguity between “instructions” and “data”, allowing attackers to manipulate behaviour through direct prompts, retrieved documents, tool outputs, or even multimodal inputs [12].
This matters even more in enterprise environments. Once a model is connected to retrieval pipelines, APIs, internal documents, or tool-calling systems, prompt injection is no longer just a chatbot failure: it becomes a route to data leakage, unsafe automation, and loss of control over downstream actions.
Because this is a wide and multi-layered project, we first needed substantial research to understand the true scope and depth of prompt injection risks before defining architecture, features, and evaluation.
To ground the project in evidence rather than assumptions, we produced a dedicated research report on prompt injection protection. This report became the basis of our internal knowledge base and informed how we framed the problem, compared existing approaches, and prioritised the features and evaluation criteria of the platform.
Research report: the full report is embedded below for in-page reading, with dedicated actions to open it in a separate tab or download a local copy.
Prompt injection is not one single attack pattern. It is a family of vulnerabilities caused by how LLM systems combine natural-language instructions, external context, memory, and tool access. Our taxonomy groups the main classes of risk that appear repeatedly in literature and real deployment scenarios [1].
A user explicitly attempts to override intended behaviour with adversarial instructions, for example by asking the model to ignore system guidance, reveal hidden instructions, or behave outside policy.
Malicious instructions are hidden inside external content such as emails, webpages, database entries, or documents that the model later reads and mistakenly treats as actionable.
Because system prompts, user input, retrieved text, and tool outputs are processed in a shared text context, the model may fail to maintain a strict distinction between “content” and “instructions”.
Attackers may disguise malicious instructions through Base64, Unicode homoglyphs, multilingual phrasing, emoji patterns, or fragmented prompts to bypass simple filters.
If an LLM can call tools or APIs, an injection attack may push it to generate unsafe arguments, perform unintended actions, or trust poisoned tool outputs.
Seemingly harmless prompts can accumulate across multiple turns, gradually steering the model’s behaviour and causing safety drift over time.
Hidden instructions can be embedded in images or other non-text modalities, creating attack paths that bypass text-only validation or filtering strategies.
In agentic systems, one compromised step can contaminate shared memory, planning outputs, or downstream agents, turning a local failure into a broader workflow failure.
Our research consistently showed that there is no single fix for prompt injection. Effective protection requires defence in depth: reducing exposure, checking behaviour, constraining actions, and continuously testing the system as it evolves. This layered approach is also reflected in OWASP guidance [1].
Defence in depth: the goal is not to assume that one layer will stop every attack, but to combine preventative, detective, and containment-focused safeguards.
Treating all user input and external content as untrusted, applying filtering, validation, schema checks, or auxiliary classification before the model sees it.
Structuring prompts so trusted instructions are clearly separated from untrusted data, rather than concatenating everything into one ambiguous block.
Validating outputs before they are shown to users or used in downstream actions, and adding secondary checks or human review for high-risk operations.
Splitting responsibilities across specialised stages such as review, sanitisation, execution, and output checking to reduce single-point compromise.
Analysing retrieved or long-context content before it enters the prompt, especially in RAG systems, browsers, and pipelines that consume untrusted documents.
Restricting what tools the model can call, validating arguments, and requiring approval for sensitive actions so successful injections have limited real-world impact.
Alignment, adversarial fine-tuning, and policy training improve baseline robustness, but should be treated as one layer of defence rather than a full solution.
Testing was one of the most important parts of our research because prompt injection cannot be understood from theory alone. The report showed that secure evaluation has to go beyond simple prompt examples and cover the full lifecycle of an LLM system: baseline benchmarking before deployment, integration testing once tools and external components are connected, automated adversarial testing to catch regressions, sandboxed testing for realistic risky scenarios, and continued monitoring as the system evolves.
Research takeaway: no single framework gives full coverage. The most effective approach is a layered testing strategy combining different approaches.
Benchmark model behaviour before connecting tools or external systems.
Test tools, APIs, retrieval pipelines, and agent workflows in realistic combinations.
Run repeatable hostile prompts continuously to catch regressions early.
Simulate risky multi-step interactions without exposing production systems.
Track safety drift and newly emerging threats as the system evolves.
A model that looks safe in isolated tests can fail once tools and external data are connected.
One-off results do not represent multi-turn workflows, chained actions, or real deployment pressure.
Reliable security comes from broad, repeated evaluation tied to real system behaviour.
Tooling review, implementation choices, and technical trade-offs behind the delivered system.
Before deciding what our platform should do, we reviewed both practical security tooling and broader enterprise-facing AI platforms. Our goal was not to copy an existing product, but to understand how current solutions approach prompt injection, red-teaming, evaluation, and operational safety [1], [2], [8], and [9].
Azure AI Foundry is a managed platform for accessing and orchestrating foundation models, provider integrations, and enterprise AI workflows. Our industry partner, Josh McDonald, introduced it early in the project as a practical enterprise reference point [3].
Garak was the most directly reflected external testing framework in the implemented platform. It demonstrated the value of repeatable adversarial probing and informed the framework-scan capability exposed through the Testing page [2].
PyRIT was relevant from a research and architecture perspective because it frames prompt injection testing as structured red-teaming. We ship a PyRIT runner in the backend framework layer alongside Garak; in practice users run Garak from the Testing UI as the default automated scan, with PyRIT available in the same architectural family for extension [8].
PromptBench informed the importance of adversarial benchmarking and comparing behaviour across prompt variants rather than relying on one or two examples [10].
PromptMe was useful because it connects testing to recognised OWASP threat scenarios and reinforces a developer-facing, application-security view of prompt injection [1].
OpenAI Evals, together with benchmark-oriented resources such as AgentHarm, AdvBench, and HarmBench, influenced the idea that testing should be reproducible, extensible, and suitable for regression workflows rather than one-off manual checks [9], [11].
The following ideas most directly shaped the platform that was actually delivered.
We used Foundry as the provider layer for model access and credential-managed API integration, which reinforced our multi-provider design instead of locking the system to a single model stack [3].
It shaped our framework-assisted testing workflow so evaluation is not only manual prompt demonstrations, but also repeatable scan-based security checks [2].
Although not directly integrated, it guided how we present risk in a developer-facing way and aligns with our OWASP Top 10 references and security-learning resources across the report [1].
We focused this comparison on major frontend framework options and then documented the stack we actually applied in the final implementation.
For the backend framework choice, we focused on a direct comparison between FastAPI and Django [6], [7].
We selected FastAPI because the platform is primarily API-driven and benefits from fast iteration, typed schemas, and straightforward integration with model orchestration and streaming endpoints [6].
The platform combines a React SPA frontend with a Python FastAPI backend, emphasizing flexibility, multi-provider support, and security-focused architecture [4], [5], [6].
Stack: React 18 + TypeScript, bundled with Vite, styled with Tailwind CSS v4 and shadcn/ui components. Includes mandatory dark mode, client-side routing, smooth animations, and PDF export capabilities.
Why: supports interactive multi-view workflows (Testing, Mitigations, Prompt Enhancer, Security Assistant) with responsive, accessible components and consistent design.
Stack: Python with FastAPI REST API. SQLite for persistence with SQLAlchemy ORM. httpx for HTTP calls to multiple model providers (OpenAI, Anthropic, OpenAI-compatible). Provider router abstraction keeps vendor-specific logic centralised.
Why: prioritises flexibility and integration speed. Multi-provider design avoids vendor lock-in. Lightweight database suitable for coursework scale.
Frameworks: Azure AI Foundry and NVIDIA Garak. Foundry supports managed model access and credential-based provider integration, while Garak provides repeatable adversarial probing through framework-style scan workflows [2], [3].
Why: together they support both operational model access and structured security evaluation, making testing more consistent than manual prompt checks alone.
The following sources were the main references used in our research report and knowledge base, numbered in IEEE style.
Note For references to information contained within the report, refer to content in this same report.