LLMAE: Automated LLM Prompt Attack Evaluation

Austin Shen · August 20, 2025 · LLM, security, django, docker

At BotSmart, I spent the summer building LLMAE, an automated platform for evaluating LLM robustness against adversarial prompts. Here's what I built and what I learned.

The Problem

As LLMs get deployed in production, adversarial prompting becomes a real security concern. Red-teaming by hand doesn't scale. LLMAE automates the process: generate attacks, run them against a target model, evaluate success, aggregate results.

Architecture

The system is built on Django with a PostgreSQL backend and a Redis task queue:

Attack Generation

A library of attack templates (jailbreaks, prompt injections, indirect attacks) is parameterized and expanded combinatorially. Novel attacks are generated by a mutation engine that applies transformations (paraphrasing, encoding, context injection) to known attacks.

Evaluation Pipeline

Each attack/model pair is evaluated by an independent judge model that scores the response on a rubric: Did the model comply? Did it leak information? Was the refusal appropriate?

Result Aggregation

Pass rates, attack success rates by category, and model comparison dashboards are computed and stored. The frontend (React) lets analysts drill into individual failures.

Docker + CI/CD

The entire stack runs in Docker Compose for local development and deploys to a single EC2 instance via a GitHub Actions pipeline. Multi-stage Docker builds kept the images lean. The Django container is under 200MB.

Key Findings

  • Encoding tricks (Base64, Unicode obfuscation) remain highly effective against models without explicit training on encoded inputs
  • Context injection attacks succeed more often when the injected context is semantically related to the user's stated intent
  • Judge model quality is the biggest bottleneck. A weak evaluator produces noisy data that hides real attack success

What I'd Do Differently

Build the judge evaluation framework first. I spent too long on attack generation and had to rebuild the evaluation layer when the judge model outputs turned out to be inconsistent.

← All posts