02 · LLM Security and Evals
Confidently wrong, or quietly compromised?
An AI system fails in two different ways. It gives an answer that sounds right and isn't, because nobody defined what "correct" means here. Or it does exactly what an attacker wanted, because nobody told it what not to trust. Different questions, different testing, and most teams have only budgeted for one of them, if either.
Amdahl's law: a system speeds up only as much as the part you accelerated. AI accelerated typing. It did not accelerate specifying what correct means, or testing that the system delivers it. That is where the work went, and where the constraint now lives. Write the spec properly, make it executable, and you move the constraint instead of queueing behind it.
This is what AI evaluation is for. Not because AI is unreliable, often it is excellent. Because black-box, non-deterministic behaviour needs far more rigorous checking than code a human wrote and can explain, and most teams have not adjusted their QA to match.
For any regulated or high-stakes deployment, you need the failure rate empirically, before you go live. Not the vendor's benchmark. Yours. Tested in your environment, against your data, on your tasks.
LLM security
Security asks a different question to evaluation. Not whether the system performs well, but whether it can be made to misbehave. Prompt injection and sensitive information disclosure top the current OWASP Top 10 for LLM Applications, alongside excessive agency, data and model poisoning, and improper output handling, and each is a live attack surface wherever a model reads untrusted input or acts with delegated authority.
We test by adversarial example: crafted inputs and hidden instructions in retrieved content, attempts to extract system prompts or training data, and requests that push an agent beyond its intended scope. Findings are reproducible and mapped to the OWASP category they sit under.
AI evals: the method
The method is black-box testing applied to non-deterministic systems. Define the inputs. Define what correct looks like. Run at scale. Record pass and fail. Characterise the failure patterns. The AI-specific challenge is the oracle problem, deciding what "correct" means when outputs vary, which we handle through structured output evaluation, LLM-as-judge protocols, and human review sampling.
| Task category | Runs | Pass | Fail | Rate |
|---|---|---|---|---|
| Contract clause extraction | 500 | 471 | 29 | 94.2% |
| Risk flag classification | 500 | 443 | 57 | 88.6% |
| Multi-step reasoning | 200 | 154 | 46 | 77.0% |
| Numerical extraction | 500 | 489 | 11 | 97.8% |
| Edge case handling | 300 | 201 | 99 | 67.0% |
Illustrative figures, not client data.
You get: failure rates by task category with confidence intervals, characterised failure modes (hallucination, silent omission, misclassification, compounding), and recommendations for guardrails, monitoring and human-in-the-loop design. Written for your CISO or Head of Risk, not just your engineers.
Typical initial engagement: two to four weeks.